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{kind: "A";a: number;}interfaceB{kind: "B";b: number;}declareconstshouldBeB: (A|B)&B;constb: B=shouldBeB;// worksfunctioninGeneric<TextendsA|B>(alsoShouldBeB: T&B){constb: B=alsoShouldBeB;// ~ TS2739: Type 'T & B' is missing the following properties from type 'B': kind, b}
Expected behavior:
No errors (were no errors on 3.8)
Actual behavior:
TS2739: Type 'T & B' is missing the following properties from type 'B': kind, b
The text was updated successfully, but these errors were encountered:
Igorbek
changed the title
Regression: intersection of a generic type bound to a union with one of the union constituencies reduces to never
Regression: intersection of a generic type bound to a discriminated union with one of the union constituencies reduces to never
May 13, 2020
TypeScript Version: 3.9.2
Search Terms: Generic union intersection
Code
Expected behavior:
No errors (were no errors on 3.8)
Actual behavior:
Playground Link: link
Related Issues:
It seems to be related to #36696
The text was updated successfully, but these errors were encountered: