-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Keep assert
and with
keywords as is
#8893
Comments
Closing as not planned. This require modification of AST, but it does not worth it without a concrete usecase. |
@kdy1 Then, could you add |
I'll accept a PR, but it should named differently so the default value can be false |
Ref #17944, swc-project/swc#8893 TypeScript removes the `assert` keywords in the transpile, so this PR only works for JavaScript files
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
V8 will remove support for the
assert
keywords, so Node.js and Chrome will follow suit.denoland/deno#17944 (comment)
I'm trying to implement this in Deno as well (denoland/deno#23541), but it doesn't work because swc commonizes the
assert
andwith
keywords. Please add a new option to pass those keywords as is to V8.Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.5.0&code=H4sIAAAAAAAAA8vMLcgvKlFIy89XSCvKz1VQ0tMHsvWyivPzlBTKM0syFKoVSioLUq0UlCBitdZcmRA9SYlFcD1ANlRPYnFxKlASU1dyfl5xfk6qXk5%2BugbQCk1UEaABmtYAe1o9F40AAAA%3D&config=H4sIAAAAAAAAA21QOw6DMAzdOQXy3KFi6NCtY4ceIqUGpU1IZBsJhLg7CSSUSt3i9%2FNzpqIs4c01XMspPMPgFTHSPgeEx07UEBCQ0SPXpL3AKbPCkWqUYVyheWNAFLUo0YVcnasqOcA4x5gdCbO608143Fk76wmZf4VRqrrW4N%2BNOHgkbTG0NcesD6K%2FW%2B9IbiKkn71gzBXqk79IGWDdq1%2FD01%2FEe7cLLvAV5bJ7MdD8yM41dV4AwZk7Q1cBAAA%3D
SWC Info output
No response
Expected behavior
Actual behavior
Version
1.5.0
Additional context
related options:
https://github.com/swc-project/swc/blob/c76cd9eccf080da67d1c8d75063f8286dfc4acc1/packages/types/index.ts#L607-L616C9
The text was updated successfully, but these errors were encountered: