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: one and two are both narrowed to never in the default case for their respective Switch functions, and in the else case for their respective IfElse functions, making them valid arguments to the neverFn call.
Actual behavior: two narrows correctly, but the neverFn call in oneSwitch and oneIfElse has the error
Argument of type One is not assignable to parameter of type never.
The text was updated successfully, but these errors were encountered:
TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)
Code
In playground
Expected behavior:
one
andtwo
are both narrowed tonever
in thedefault
case for their respectiveSwitch
functions, and in theelse
case for their respectiveIfElse
functions, making them valid arguments to theneverFn
call.Actual behavior:
two
narrows correctly, but theneverFn
call inoneSwitch
andoneIfElse
has the errorThe text was updated successfully, but these errors were encountered: