Describe the bug
Found this when implementing (https://github.com/swiftlang/vscode-swift/pull/1144)
function commands.registerCommand(command: string, callback: (...args: any[]) => any, thisArg?: any): vscode.Disposable
As show the callback param can return type any, and if we are not care with implicit return of arrow function expressions it's easy to miss this and as a result execute command will not be able to return the promise as expected.
Describe the bug Found this when implementing (https://github.com/swiftlang/vscode-swift/pull/1144) function commands.registerCommand(command: string, callback: (...args: any[]) => any, thisArg?: any): vscode.Disposable As show the callback param can return type any, and if we are not care with implicit return of arrow function expressions it's easy to miss this and as a result execute command will not be able to return the promise as expected.
example: vscode.commands.registerCommand(COMMANDS.UseLocalDependency, item => { if (item instanceof PackageNode) { useLocalDependency(item.name, ctx); } }),
the above should return the promise returned by useLocalDependency
Expected behavior All executeCommand of registered command properly return the right objects.
Environment