You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So if you write private or public next to a constructor argument in typescript classes that apparently automatically makes it say this.argname = argname (how is this feature called??) however with a special concoction of config files that I happen to use, parcel breaks this feature.
It has something to do with babel as it doesn't happen when using swc with parcel, but I can't reproduce it with the babel REPL either which is why I put it here. Maybe it has to do with @parcel/babel-preset-env?
undefined and then undefined is logged to the console.
馃拋 Possible Solution
Make so that it works correctly.
馃敠 Context
Figured out that my compatibility builds of sentry.io have been broken for months. Dived into it and this seems to be the issue, since they use this syntax/typescript feature and the code relying on it breaks.
馃悰 bug report
So if you write
private
orpublic
next to a constructor argument in typescript classes that apparently automatically makes it saythis.argname = argname
(how is this feature called??) however with a special concoction of config files that I happen to use, parcel breaks this feature.It has something to do with babel as it doesn't happen when using swc with parcel, but I can't reproduce it with the babel REPL either which is why I put it here. Maybe it has to do with
@parcel/babel-preset-env
?馃帥 Configuration (.babelrc, package.json, cli command)
Pls see attached .zip file. Target needs to be
ie 11
and babel config file looks like this:馃 Expected Behavior
馃憖
and then4
is logged to the console.馃槸 Current Behavior
undefined
and thenundefined
is logged to the console.馃拋 Possible Solution
Make so that it works correctly.
馃敠 Context
Figured out that my compatibility builds of sentry.io have been broken for months. Dived into it and this seems to be the issue, since they use this syntax/typescript feature and the code relying on it breaks.
馃捇 Code Sample
Run
yarn install
and thenyarn build
:parcel_messed_up_classes.zip
The code:
馃實 Your Environment
The text was updated successfully, but these errors were encountered: