Open jsjzgy opened 3 years ago
Looks like a bug; maybe introduced when trying to fix this: https://github.com/microsoft/TypeScript/issues/12700
I haven't looked at the spec, but the behavior is consistent in SpiderMonkey. I think we are incorrectly assuming that \u{62}
is an invalid escape sequence.
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