Skip to content

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
@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

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