Closed cspotcode closed 1 year ago
In the same vein as #1746, #2633, and #4100
The type declarations omit "esnext" https://github.com/swc-project/swc/blob/c223113338e47979d37129abcaae560c0d8d7580/node-swc/src/types.ts#L676-L686
"esnext"
However, it is supported by swc: https://play.swc.rs/?version=1.3.32&code=H4sIAAAAAAAAA8vMLcgvKlFIy89XsFUoSi0szSxK1VAHctU1rXm5kvPziktgwkAFhkbGQNFEXi5errT8Ig2IdKJCfppCfklGapGmQjUvlwIQ8HLVAgAbqPJ%2FWQAAAA%3D%3D&config=H4sIAAAAAAAAA0WNOw6EMAxE7%2BKaegvuwCGirEFZ5SePkYii3J0EZUVnzzw%2FV%2FrB0lopGwHLmFCimotW0pIZVlxWWkjRo914cOuLkYO1I4zI16h9SuAJLBRcdHsZMptCFgbeysTD%2F8nWXSF9zxHU59%2Fj%2FFB7HfPOYZugysntBp32lHq4AAAA
I also double-checked that swc logs it as a valid option in this error message:
Error: unknown variant `intentionally-wrong-to-get-error`, expected one of `es3`, `es5`, `es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020`, `es2021`, `es2022`, `esnext`
No response
https://play.swc.rs/?version=1.3.32&code=H4sIAAAAAAAAA8vMLcgvKlFIy89XsFUoSi0szSxK1VAHctU1rXm5kvPziktgwkAFhkbGQNFEXi5errT8Ig2IdKJCfppCfklGapGmQjUvlwIQ8HLVAgAbqPJ%2FWQAAAA%3D%3D&config=H4sIAAAAAAAAA0WNOw6EMAxE7%2BKaegvuwCGirEFZ5SePkYii3J0EZUVnzzw%2FV%2FrB0lopGwHLmFCimotW0pIZVlxWWkjRo914cOuLkYO1I4zI16h9SuAJLBRcdHsZMptCFgbeysTD%2F8nWXSF9zxHU59%2Fj%2FFB7HfPOYZugysntBp32lHq4AAAA
TypeScript types declare "esnext" as a valid JscTarget value.
JscTarget
1.3.32
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Describe the bug
In the same vein as #1746, #2633, and #4100
The type declarations omit
"esnext"
https://github.com/swc-project/swc/blob/c223113338e47979d37129abcaae560c0d8d7580/node-swc/src/types.ts#L676-L686However, it is supported by swc: https://play.swc.rs/?version=1.3.32&code=H4sIAAAAAAAAA8vMLcgvKlFIy89XsFUoSi0szSxK1VAHctU1rXm5kvPziktgwkAFhkbGQNFEXi5errT8Ig2IdKJCfppCfklGapGmQjUvlwIQ8HLVAgAbqPJ%2FWQAAAA%3D%3D&config=H4sIAAAAAAAAA0WNOw6EMAxE7%2BKaegvuwCGirEFZ5SePkYii3J0EZUVnzzw%2FV%2FrB0lopGwHLmFCimotW0pIZVlxWWkjRo914cOuLkYO1I4zI16h9SuAJLBRcdHsZMptCFgbeysTD%2F8nWXSF9zxHU59%2Fj%2FFB7HfPOYZugysntBp32lHq4AAAA
I also double-checked that swc logs it as a valid option in this error message:
Input code
No response
Config
No response
Playground link
https://play.swc.rs/?version=1.3.32&code=H4sIAAAAAAAAA8vMLcgvKlFIy89XsFUoSi0szSxK1VAHctU1rXm5kvPziktgwkAFhkbGQNFEXi5errT8Ig2IdKJCfppCfklGapGmQjUvlwIQ8HLVAgAbqPJ%2FWQAAAA%3D%3D&config=H4sIAAAAAAAAA0WNOw6EMAxE7%2BKaegvuwCGirEFZ5SePkYii3J0EZUVnzzw%2FV%2FrB0lopGwHLmFCimotW0pIZVlxWWkjRo914cOuLkYO1I4zI16h9SuAJLBRcdHsZMptCFgbeysTD%2F8nWXSF9zxHU59%2Fj%2FFB7HfPOYZugysntBp32lHq4AAAA
Expected behavior
TypeScript types declare
"esnext"
as a validJscTarget
value.Actual behavior
No response
Version
1.3.32
Additional context
No response