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
@ahejlsberg how do the conditions of #8548 come up with this example? The control flow type is (or should be?) narrowed to never after the two type guards in the if/else if block. But then there is no third type guard that conflicts with that narrowed type, so why should #8548 apply?
TypeScript Version:
nightly (1.9.0-dev.20160619-1.0)
Expected behavior:
Type of
shape
should benever
orShape
so that we can still accesstype
to throw an Error.Actual behavior:
Type of
shape
is{ type: 'rectangle'; width: number; height: number }
.The text was updated successfully, but these errors were encountered: