-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript
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
.
Metadata
Metadata
Assignees
Labels
APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript