-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constructor code broken since npm version 4.3.0-dev.20210408
with --target ESNext
#45298
Comments
Most likely related to #45076 which is intended change to align with ES behavior related to class fields, although change in defaults for ESNext is not documented. Looks like playground uses its own defaults which override new default value of And if you execute compiled code in any supported browser, you will see that it logs |
Well I think, if the user does not change any settings, the version should user the default behavior and not requiring doing some research to figure out what flags to change to properly mimic the default behavior... |
Yes, it's unfortunately that this flag has different default depending on TS version and target which is hard to implement for playground, however I think it make sense to keep Playground defaults vs TS default in separate discussion - e.g. linked #45297 or Playground repo. And it doesn't change explanation in paragraphs 1 and 3. |
Where are y'all in every other issue where someone complains that the TS defaults aren't aligned with their personal preferences? 😅 Anyway see #34787; |
This issue has been marked as 'Question' and has seen no recent activity. It has been automatically closed for house-keeping purposes. If you're still waiting on a response, questions are usually better suited to stackoverflow. |
Bug Report
Compiling the code below compiled with the
--target ESNext
option, an error is thrown.🕗 Version & Regression Information
npm
version4.3.0-dev.20210407
npm
version4.3.0-dev.20210408
⏯ Playground Link
Cannot be reproduced in the playground (see #45297)
💻 Code
🙁 Actual behavior
throws
🙂 Expected behavior
The created javascript file should be
The text was updated successfully, but these errors were encountered: