Skip to content

Fix crash when serializing default export in error #61582

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

Conversation

andrewbranch
Copy link
Member

@@ -6127,7 +6127,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
},
isOptionalParameter,
isUndefinedIdentifierExpression(node: Identifier) {
Debug.assert(isExpressionNode(node));
Copy link
Member Author

@andrewbranch andrewbranch Apr 15, 2025

Choose a reason for hiding this comment

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

The identifier being passed in was the foo of an export default foo, which is an expression, but doesn’t return true in this syntactic check because export default SomeType is also legal. I’m not sure if this assertion really needs to be here in any form. (cc @dragomirtitian)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ref #60692

@andrewbranch andrewbranch requested a review from weswigham April 15, 2025 22:01
@github-project-automation github-project-automation bot moved this from Not started to Needs merge in PR Backlog Apr 15, 2025
@andrewbranch andrewbranch merged commit 6afd0fb into microsoft:main Apr 16, 2025
32 checks passed
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Apr 16, 2025
@sandersn sandersn removed this from PR Backlog Apr 22, 2025
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.

Support importing types from a .mts file from within a CommonJS file.
3 participants