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
Expected behavior:
The declaration of the variable abc should not be valid.
The error could be something along the lines of:
The type '{ b: number; c: true }' is not assignable to type 'AB | C'.
Object literal may only specify known properties, and 'b' does not exist in 'C', and 'c' does not exist in 'AB'.
Actual behavior:
The declaration of the variable abc is valid.
TypeScript Version: 3.9.2 (or 3.5.1 and up)
Search Terms:
Union types, object literal
Code
Expected behavior:
The declaration of the variable
abc
should not be valid.The error could be something along the lines of:
Actual behavior:
The declaration of the variable
abc
is valid.Playground Link: typescriptlang.org
Related Issues: Couldn't find any.
The text was updated successfully, but these errors were encountered: