Skip to content

Conversation

@ahejlsberg
Copy link
Member

@ahejlsberg ahejlsberg commented Dec 7, 2025

This PR changes our reparsing logic to only create synthetic overload declarations when @overload tags occur on function, method, or constructor declarations outside object literals.

The PR also fixes incorrect parsingContexts flag setting logic that apparently wasn't breaking anything.

With this PR we're no longer dumping overload signatures into the global scope in declarations files as can be seen in the baseline changes for jsFileAlternativeUseOfOverloadTag.js.

This PR supersedes #2221, which BTW doesn't work because it relies on following parent pointers that aren't yet set.

Fixes #2218.

@ahejlsberg ahejlsberg added this pull request to the merge queue Dec 7, 2025
Merged via the queue into main with commit a568e20 Dec 7, 2025
29 checks passed
@ahejlsberg ahejlsberg deleted the fix-2218 branch December 7, 2025 20:36
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.

Panic on initial attempt of existing JavaScript + JSDoc project

3 participants