Closed
Description
TypeScript Version:
1.8.0
Code
interface A {
name: string;
age: number;
}
interface AExtension {
name?: string;
age?: number;
}
interface B {
key: string;
value: boolean;
}
interface BExtension {
key?: string;
value?: boolean;
}
function extend(base: A, extension: AExtension);
function extend(base: B, extension: BExtension);
function extend<T>(base: T, extension: any) {
}
const b : B = { key: '...', value: true };
extend(b, { key: '' });
Expected behavior:
Code completion for second parameter of extend
shows properties of BExtension
.
Actual behavior:
Code completion for second parameter of extend
shows properties of AExtension
.