-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Error when compiling typescript in target es2022 #16330
Comments
There are also errors when compiling type scripts in target esnext. |
I found that replacing "this.Change" with "Theme.Change" would eliminate the above problems. https://github.com/tc39/proposal-class-static-block#semantics It's a strange phenomenon. |
I think related to #16054 |
Confirmed, this is bug, workaround (bad workaround):
Feel free to send a fix |
This issue had no activity for at least three months. It's subject to automatic issue closing if there is no activity in the next 15 days. |
Issue was closed because of inactivity. If you think this is still a valid issue, please file a new issue with additional information. |
Bumping this for relevance, and labelling into our backlog. This definitely should be addressed. Also is this related to #16763? |
@TheLarkInn Yeah, looks like the same, I think we can merge them just move example for future tests |
Weird should be fixed here 8bfcb69... |
Bug report
What is the current behavior?
Error when compiling typescript in target es2022
If the current behavior is a bug, please provide the steps to reproduce.
tsconfig.json
module1.ts
module2.ts
Compiling produces the following file:
the userId that is in the static block is renamed to module1_userId, and the userId that is in the Change function is not renamed
if you remove static, then all the same, userId will not be renamed inside the class.
In the global context it is renamed normally
What is the expected behavior?
userId must not be renamed to module1_userId. At least this behavior is observed with target = es2021
Other relevant information:
webpack version: 5.74.0
webpack cli version: 4.10.0
Node.js version: 14.19.0
Operating System: Mac Os Mojave 10.14.6
Additional tools:
The text was updated successfully, but these errors were encountered: