typescript-go
typescript-go copied to clipboard
Process `@overload` tags only in limited contexts
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.