Skip to content

Add error when importing/exporting types in JS files #49580

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

Merged
merged 3 commits into from
Jun 17, 2022

Conversation

andrewbranch
Copy link
Member

Fixes #22159

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Jun 16, 2022
@andrewbranch andrewbranch added the Breaking Change Would introduce errors in existing code label Jun 16, 2022
isNamedDeclaration(node) ? node.name :
node;

Debug.assert(node.kind !== SyntaxKind.NamespaceExport);
Copy link
Member

Choose a reason for hiding this comment

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

Why can't it be?

Copy link
Member Author

Choose a reason for hiding this comment

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

A namespace export should always be an instantiated module (and therefore should have SymbolFlags.Value) just like a namespace import is.

@andrewbranch andrewbranch merged commit 1213c35 into microsoft:main Jun 17, 2022
@andrewbranch andrewbranch deleted the bug/22159 branch June 17, 2022 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team Breaking Change Would introduce errors in existing code For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Importing types doesn't trigger an error in checkJs
3 participants