Skip to content

Fix crash when serializing default export in error - #61582

Merged
Andrew Branch (andrewbranch) merged 2 commits into
microsoft:mainfrom
andrewbranch:bug/58195-issuecomment-2803655612
Apr 16, 2025
Merged

Andrew Branch (andrewbranch) merged 2 commits into
microsoft:mainfrom
andrewbranch:bug/58195-issuecomment-2803655612

Conversation

@andrewbranch

Copy link
Copy Markdown
Member

Comment thread src/compiler/checker.ts
},
isOptionalParameter,
isUndefinedIdentifierExpression(node: Identifier) {
Debug.assert(isExpressionNode(node));

@andrewbranch Andrew Branch (andrewbranch) Apr 15, 2025 •

Copy link
Copy Markdown
Member Author

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 Titian Cernicova-Dragomir (@dragomirtitian))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ref #60692

@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Apr 15, 2025
@andrewbranch
Andrew Branch (andrewbranch) merged commit 6afd0fb into microsoft:main Apr 16, 2025
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Apr 16, 2025
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

4 participants