After tsc converts the js file, it does not meet expectations #46256
Labels
Bug
A bug in TypeScript
Effort: Moderate
Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".
Help Wanted
You can do this
Milestone
Bug Report
For example, the js code below is saved in the test.js file
After executing the following command, the generated js code is as follows:
tsc test.js --allowJs --outFile test11.js --target es2015
The results of using node to execute two js files are as follows
node test.js
node test11.js
The results of the two files are different, but the result of test.js is in line with expectations.
I need your help, I want to know why the result of tsc conversion is not as expected
🔎 Search Terms
🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
🙂 Expected behavior
The text was updated successfully, but these errors were encountered: