TS Template added by Matt Bierner (@mjbvz)
TypeScript Version: 4.5.0-dev.20211028
Search Terms
See #46570 (comment) for more minimal repro
In minimal-hello-world extension sample, using this code:
// The module 'vscode' contains the VS Code extensibility API// Import the module and reference it with the alias vscode in your code belowconstvscode=require('vscode');// this method is called when your extension is activated// your extension is activated the very first time the command is executed/** * @param {vscode.ExtensionContext} context */functionactivate(context){// Use the console to output diagnostic information (console.log) and errors (console.error)// This line of code will only be executed once when your extension is activatedconsole.log('Congratulations, your extension "helloworld-minimal-sample" is now active!');// The command has been defined in the package.json file// Now provide the implementation of the command with registerCommand// The commandId parameter must match the command field in package.jsonletdisposable=vscode.commands.registerCommand('extension.helloWorld',async()=>{// The code you place here will be executed every time your command is executedconstquickpick=vscode.window.createQuickPick();quickpick.items=[{label: 'step 1'}];void(awaitnewPromise(resolve=>{quickpick.onDidAccept(()=>{console.log(quickpick.selectedItems.map(i=>i.label).join(', '));if(quickpick.selectedItems.length===0)return;if(quickpick.selectedItems[0].label==='step 1'){quickpick.value='';quickpick.canSelectMany=true;quickpick.items=[{label: 'a'},{label: 'b'},{label: 'c'}];// If I uncomment this it will fix the bug// quickpick.selectedItems = [];}else{resolve();}});quickpick.show();}));quickpick.hide();});context.subscriptions.push(disposable);}// this method is called when your extension is deactivatedfunctiondeactivate(){}// eslint-disable-next-line no-undefmodule.exports={
activate,
deactivate
}I see this error:

This isn't really something we should be warning about in JS.
TS Template added by Matt Bierner (@mjbvz)
TypeScript Version: 4.5.0-dev.20211028
Search Terms
See #46570 (comment) for more minimal repro
In minimal-hello-world extension sample, using this code:
I see this error:

This isn't really something we should be warning about in JS.