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
interfaceA{x : number;}interfaceB{y: string;}typeC=A|B;functionisA(value: C): value is A{return'x'invalue;}varc: C={x : 1};if(isA(c)){c.x=10;// <-- breakes here}else{c=null;// <-- why is it a crime to assign null to c?}
The text was updated successfully, but these errors were encountered:
Assignments to c "turn off" type guards everywhere because we don't yet use control flow analysis to detect that the else branch does not affect the consequent branch.
The text was updated successfully, but these errors were encountered: