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
// @strictNullChecks: truefunctionunknownNarrowing(x: unknown){switch(typeofx){case'function': x;return;// x is unknown, should be Functioncase'object': x;return;// x is unknown, should be object | null}}
Expected behavior:
Narrowing unknown in switch at clause "function" should result in type Function.
Narrowing unknown in switch at clause "object" should result in type object | null.
Actual behavior:
Value of type unknown does not narrow.
Playground Link: N/A (Playground not on this version).