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

[JavaScript] Clean up imports #3851

Merged
merged 5 commits into from
Oct 1, 2023

Conversation

Thom1729
Copy link
Collaborator

  • Consolidate import/export-brace and import/export-item. They're not identical in the grammar, but they're close enough and they don't conflict.
  • Handle import type from 'somewhere'; in TypeScript. (import type and export type cannot share an implementation because they have different corner cases.)
  • Use the new more-specific scope for wildcards.
  • Support the with keyword for import assertions. This is a breaking change in the import assertions proposal. Currently, TypeScript supports both, but assert is deprecated; this PR supports both.
  • Support import assertions in re-exports.

Thom1729 and others added 4 commits September 30, 2023 18:59
This commit...

1. adds a named context `import-export-from-name`
2. adds a bailout in case `from` source literal is missing, so following
   statements don't break highlighting.
This commit...

1. adds named context for optional object-literals in export/import statements.
2. adds a test case to verify bailout of incomplete statements.
This commit...

1. adds named context for export-default expressions.
2. adds a test case to verify bailout of incomplete statements.
michaelblyons
michaelblyons previously approved these changes Oct 1, 2023
@Thom1729 Thom1729 merged commit 92b4c0b into sublimehq:master Oct 1, 2023
@Thom1729 Thom1729 deleted the javascript-cleanup-imports branch October 1, 2023 19:17
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.

3 participants