swc-project / swc

Rust-based platform for the Web
https://swc.rs
Apache License 2.0
31.3k stars 1.23k forks source link

TypeScript types omit target "esnext" #6904

Closed cspotcode closed 1 year ago

cspotcode commented 1 year ago

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-L686

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`

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 valid JscTarget value.

Actual behavior

No response

Version

1.3.32

Additional context

No response

swc-bot commented 1 year ago

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.