Skip to content

🤖 Cherry-pick PR #33847 into release-3.6#33888

Closed
typescript-bot wants to merge 1 commit into
microsoft:release-3.6from
typescript-bot:pick/33847/release-3.6
Closed

🤖 Cherry-pick PR #33847 into release-3.6#33888
typescript-bot wants to merge 1 commit into
microsoft:release-3.6from
typescript-bot:pick/33847/release-3.6

Conversation

@typescript-bot
Copy link
Copy Markdown
Collaborator

This cherry-pick was triggerd by a request on #33847
Please review the diff and merge if no changes are unexpected.
You can view the cherry-pick log here.

cc @weswigham

Component commits:
dda7cd8 Avoid a crash with `@typedef` in a script file.
Scripts (as opposed to modules) do not have a symbol object. If a script
contains a `@typdef` defined on a namespace called `exports`, TypeScript
crashes because it attempts to create an exported symbol on the
(non-existent) symbol of the SourceFile.

This change avoids the crash by explicitly checking if the source file
has a symbol object, i.e. whether it is a module.
@sandersn
Copy link
Copy Markdown
Member

This ended up in 3.7, not 3.6.

@sandersn sandersn closed this Jan 30, 2020
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 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.

3 participants