-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDesign LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixedVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Description
From @JonnyBoy333 on July 12, 2017 15:31
- VSCode Version: 1.14.0
- OS Version: macOS 10.12.5
Autocomplete/intellisense is not showing all the options for an object that goes into a function parameter even though it is defined in a typescript interface.
Example:
interface Fruit {
/** Returns a fruit color. */
getFruitColor(options: { fruit: 'apple' | 'orange' }): string;
getFruitColor(options: { fruit: 'banana' }): boolean;
}
function testFunction (fruit: Fruit) {
let color = fruit.getFruitColor({ fruit: '' }); // <-- Autocomplete only shows apple and orange as options and not banana
}
It appears that only the first method's options object is getting indexed by VS autocomplete but not the second one.
Reproduces without extensions: Yes
Copied from original issue: microsoft/vscode#30526
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDesign LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixedVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue