Skip to content

Fix @param type parameter lookup #39532

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
merged 1 commit into from
Jul 10, 2020
Merged

Conversation

sandersn
Copy link
Member

@sandersn sandersn commented Jul 9, 2020

Previously, getObjectTypeInstantiation had special-case code to look up type parameters for @param as if they were in the parameter location.

This should occur in the main lookup loop of getOuterTypeParameters, however. The current code only runs once, which is not sufficient, and it also jumps to the parameter for any type contained in a @param, which skips type parameters that occur in the tag itself.

Fixes #38572

Previously, getObjectTypeInstantiation had special-case code to look up
type parameters for `@param` as if they were in the parameter location.

This should occur in the main lookup loop of `getOuterTypeParameters`,
however. The current code only runs once, which is not sufficient, and
it also jumps to the parameter for any type contained in a `@param`,
which skips type parameters that occur in the tag itself.
@sandersn sandersn merged commit 3b107fe into master Jul 10, 2020
@sandersn sandersn deleted the fix-param-tag-type-param-lookup branch July 10, 2020 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mapped types not instantiated when defined in JSDoc
3 participants