You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import*asvscodefrom'vscode'interfaceMyPickItemextendsvscode.QuickPickItem{}varitems:MyPickItem[];vscode.window.showQuickPick(items,{placeHolder: "(placeholder)",onDidSelectItem: (item:MyPickItem)=>{/* Wont copile, error: Argument of type '{ placeHolder: string; onDidSelectItem: (item: MyPickItem) => void; }' is not assignable to parameter of type 'QuickPickOptions'. Types of property 'onDidSelectItem' are incompatible. Type '(item: MyPickItem) => void' is not assignable to type '<T extends QuickPickItem>(item: string | T) => any'. Types of parameters 'item' and 'item' are incompatible. Type 'string | T' is not assignable to type 'MyPickItem'. Type 'string' is not assignable to type 'MyPickItem'. */}});
Expected behavior:
Since MyPickItem extends QuickPickItem, the above call to vscode.window.showQuickPick should be valid
Activity
mjbvz commentedon Jul 17, 2018
No longer seems applicable. Fixed either due to changes in VS Code API or in TypeScript