Skip to content
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

Support import-attributes and deprecate import-assertions #1513

Closed
IWANABETHATGUY opened this issue Nov 23, 2023 · 4 comments
Closed

Support import-attributes and deprecate import-assertions #1513

IWANABETHATGUY opened this issue Nov 23, 2023 · 4 comments

Comments

@IWANABETHATGUY
Copy link
Contributor

IWANABETHATGUY commented Nov 23, 2023

Recently, Typescript introduced a new syntax https://devblogs.microsoft.com/typescript/announcing-typescript-5-3/#import-attributes, and deprecated the old import-assertions, maybe we should follow.

Reference

@IWANABETHATGUY IWANABETHATGUY changed the title Support import-attributes and deprecate import-assertions Support import-attributes and deprecate import-assertions Nov 23, 2023
@magic-akari
Copy link
Collaborator

@IWANABETHATGUY
Copy link
Contributor Author

Sorry, I didn't notice that, also maybe we should deprecate the import-assertions rather than replace them directly, just like Typescript did?

@magic-akari
Copy link
Collaborator

magic-akari commented Nov 23, 2023

Sorry, I didn't notice that, also maybe we should deprecate the import-assertions rather than replace them directly, just like Typescript did?

This PR adds support for with and assert in the parse and codegen stages, including Formatter. Both of them are supported without deprecation or replacing the support for the previous syntax.
Perhaps we can consider adding assert checks during the linting stage.

@IWANABETHATGUY
Copy link
Contributor Author

Sorry, I didn't notice that, also maybe we should deprecate the import-assertions rather than replace them directly, just like Typescript did?

This PR adds support for with and assert in the parse and codegen stages, including Formatter. Both of them are supported without deprecation or replacing the support for the previous syntax. Perhaps we can consider adding assert checks during the linting stage.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants