Skip to content

Instantly share code, notes, and snippets.

@sandipchitale
Last active May 23, 2021 06:19
Show Gist options
  • Save sandipchitale/a64458dde7883b51b8362e404947a88e to your computer and use it in GitHub Desktop.
Save sandipchitale/a64458dde7883b51b8362e404947a88e to your computer and use it in GitHub Desktop.
QuickPickItem #vscode #QuickPickItem
class Item implements vscode.QuickPickItem {
label: string;
description?: string | undefined;
detail?: string | undefined;
picked?: boolean | undefined;
alwaysShow?: boolean | undefined;
constructor(label: string) {
this.label = label;
}
}
async function selectDebugeee(userItem: UserItem[]) {
const itemQuickPickItems: Item[] = [];
userItem.forEach(item => {
itemQuickPickItems.push(
new Item(item.label)
);
});
const itemQuickPickItem = await vscode.window.showQuickPick(itemQuickPickItems, {});
return itemQuickPickItem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment