Skip to content

Conversation

nicolo-ribaudo
Copy link
Contributor

Fixes #61489.

The import attributes proposal added support for trailing commas in dynamic import calls. This PR's aligns TypeScript's type-level import() with JavaScript's value-level import().

@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Mar 27, 2025
@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Mar 27, 2025
@nicolo-ribaudo nicolo-ribaudo force-pushed the import-trailing-comma branch from dfe8cba to b70f094 Compare March 27, 2025 14:22
@github-project-automation github-project-automation bot moved this from Not started to Done in PR Backlog Apr 1, 2025
@nicolo-ribaudo nicolo-ribaudo reopened this Apr 1, 2025
@github-project-automation github-project-automation bot moved this from Done to Not started in PR Backlog Apr 1, 2025
@typescript-bot typescript-bot added For Backlog Bug PRs that fix a backlog bug and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Apr 1, 2025
type T2 = typeof import('./input.js', ,);
~
!!! error TS1005: '{' expected.
!!! related TS1007 main.ts:1:39: The parser expected to find a '}' to match the '{' token here.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error is... weird. There's no { in the file at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
Status: Not started
Development

Successfully merging this pull request may close these issues.

Trailing comma in dynamic import should be allowed also when used in a typeof type
3 participants