-
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
Cannot assert Partial<T>[keyof T]
not to be undefined using !
(regression from 2.5)
#20673
Comments
I think this would essentially require us to have #14366 working so we could have a |
For the record, this used to succeed in 2.5, so this is a regression. |
Partial<T>[keyof T]
not to be undefined using !
Partial<T>[keyof T]
not to be undefined using !
(regression from 2.5)
OK, I must be wrong about a NonNull type being needed. |
This is caused by #18042. Previously we would immediately transform an indexed access applied to a mapped type |
duplicate of #14366 |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
TypeScript Version: 2.6.2
Code
See also in the playground example here.
Expected behavior:
parialVal!
should strip the|undefined
from value, and the assignment should succeed.Actual behavior:
The text was updated successfully, but these errors were encountered: