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
It is unrelated to discriminated unions or optional property. A minimal repo:
interfaceB{b: number;}interfaceC{c: number;}typeUnion=B|C;consttest1: B={b: 4,c: 4};// Error as expected, because of excess property check.consttest2: C={b: 4,c: 4};// Error as expected, because of excess property check.consttest3: Union={b: 4,c: 4};// No error.
Bug Report
π Search Terms
Discriminated Unions with a common partially optional property
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
test4
is displayed as valid.π Expected behavior
test4
should not be valid.The text was updated successfully, but these errors were encountered: