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
Use a combined type to define, and a single type will fail all tests, but no error will be reported when combined.
constexample1: {A?: string}={A: '',B: 12}// Object literals can only specify known properties, and 'B' is not in type '{ A?: string; }'.constexample2: {A?: string}&{B: number;C: string}={A: '',B: 12}// Type '{ A: string; B: number; }' cannot be assigned to type '{ A?: string; } & { B: number; C: string; }'. Property 'C' is missing from type '{ A: string; B: number; }' but is required in type '{ B: number; C: string; }'.constexample3: {A?: string}|({A?: string}&{B: number;C: string})={A: '',C:'true'}
The text was updated successfully, but these errors were encountered:
Yeah, but it only got tagged as a dupe because the OP used the 9998 issue template - which they apparently didn’t read because this is unrelated and you’re not supposed to post with that template anyway 😉
Use a combined type to define, and a single type will fail all tests, but no error will be reported when combined.
The text was updated successfully, but these errors were encountered: