-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 narrowing properties retrieved from types with index signatures #17567
Labels
Committed
The team has roadmapped this issue
Fixed
A PR has been merged for this issue
Suggestion
An idea for TypeScript
Milestone
Comments
DanielRosenwasser
added
In Discussion
Not yet reached consensus
Suggestion
An idea for TypeScript
labels
Aug 2, 2017
This would require us to synthesize some sort of knowledge about a property that's never been declared on the type |
DanielRosenwasser
changed the title
null checks don't work for indexed types
Allow narrowing properties retrieved from types with index signatures
Aug 4, 2017
8 tasks
mhegazy
added
Committed
The team has roadmapped this issue
and removed
In Discussion
Not yet reached consensus
labels
Nov 6, 2017
Should be doable. |
ghost
mentioned this issue
Nov 8, 2017
Fix is up at #19838. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Committed
The team has roadmapped this issue
Fixed
A PR has been merged for this issue
Suggestion
An idea for TypeScript
TypeScript Version: 2.4.0
Code
Expected behavior:
Null check is correctly performed and the compiler allows for accessing
Actual behavior:
// Object is possibly 'null'.
The text was updated successfully, but these errors were encountered: