Skip to content
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

Allow an infer type node to resolve its own name #40483

Merged
merged 1 commit into from
Sep 23, 2020

Conversation

weswigham
Copy link
Member

infer X normally makes X available in an adjacent scope - namely the containing conditional's true branch. However, typically, a declaration should be capable of resolving to its own name. With this change, resolving X within the context of infer X, will actually result in X's symbol, rather than an undefined (or, more confusingly, an outer scope) result.

Fixes #40362

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Sep 10, 2020
@weswigham weswigham merged commit 10b240c into microsoft:master Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Resulting d.ts is invalid TS code: T_1 generic type argument
3 participants