You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The type of one of the keys is not a discriminant. in both examples, the type of val2 is string|null narrowing val1 does not narrow the type of the return value of func3.
Moreover, it is really hard to for the compiler to build a relationship between two variables in such a destructuring pattern.
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.3.2
Code
Expected behavior:
No error
Actual behavior:
Type 'string | null' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'.
Detail
This seems like 10198, i have already new version of typescript but this is still not fixed.
The text was updated successfully, but these errors were encountered: