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
Expected behavior:
If i check an inner property undefined and then verify the type, i would expect typescript to know it is already not undefnied Actual behavior:
instanceof "resets" the null
Uh oh!
There was an error while loading. Please reload this page.
TypeScript Version: 3.7.5 && 3.8.0-beta
Search Terms: instanceof, null check, type narrowing
Code
Expected behavior:
If i check an inner property undefined and then verify the type, i would expect typescript to know it is already not undefnied
Actual behavior:
instanceof "resets" the null
Playground Link:
Playground Link
Related Issues:
N\A
Notes
This is a bigger problem if my null check is not on the same if as the instance of, for example:
As here I cannot reorder the ifs
The text was updated successfully, but these errors were encountered: