Closed
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