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
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TypeScript Version: 2.7.0-dev.201xxxxx
Search Terms:
discriminated union, narrowing, intersection
Code
Expected behavior:
C1 should be inferred to
{ t: '1', a: 2 }
, so it should be clear that a can be accessedActual behavior:
C1 is inferred to
({ t: "1"; a: 2; } & { t: "1"; }) | ({ t: "2"; c: 3; } & { t: "1"; })
Note the impossible type
({ t: "2"; c: 3; } & { t: "1"; })
is not removed!Playground Link:
link
Related Issues:
The text was updated successfully, but these errors were encountered: