Closed
Description
From @rkirov at DefinitelyTyped/DefinitelyTyped#28044 (comment)
interface A {
a: string;
b: number
};
interface Other {
o: number;
}
declare function f(x: A | Other): any;
export let x = { a: '', b: '' };
export let y = f(x);
Expected
Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'Other | A'.
Type '{ a: string; b: string; }' is not assignable to type 'A'.
Types of property 'b' are incompatible.
Type 'string' is not assignable to type 'number'.
Actual
Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'A | Other'.
Type '{ a: string; b: string; }' is not assignable to type 'Other'.
Property 'o' is missing in type '{ a: string; b: string; }'.