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 "Arbitrary Module Namespace Identifiers" #1030

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

evanw
Copy link
Contributor

@evanw evanw commented May 24, 2024

This PR implements Arbitrary Module Namespace Identifiers, which is a JavaScript syntax feature that was added to JavaScript over two years ago (in ES2022). It allows import and export aliases to be strings instead of identifiers.

Before this PR:

Notice that the string content is incorrectly colored. In particular, the characters default in the middle of the string are confusingly highlighted as a keyword. The preceding type keyword is also not highlighted as a keyword when it should be.

After this PR:

All strings are highlighted as strings, and the type keyword is highlighted as a keyword.

@evanw
Copy link
Contributor Author

evanw commented Oct 10, 2024

Update: This syntax feature has now been added to TypeScript and shipped in VSCode. However, VSCode shipped it with broken syntax highlighting because this PR wasn't merged. Merging this PR would fix syntax highlighting for this feature.

@mjbvz mjbvz merged commit 48f6086 into microsoft:master Oct 24, 2024
10 checks passed
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

Successfully merging this pull request may close these issues.

4 participants