mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 06:51:53 +01:00
debt - Thenable -> Promise
This commit is contained in:
@@ -32,7 +32,7 @@ export class MainThreadCommands implements MainThreadCommandsShape {
|
||||
this._generateCommandsDocumentationRegistration.dispose();
|
||||
}
|
||||
|
||||
private _generateCommandsDocumentation(): Thenable<void> {
|
||||
private _generateCommandsDocumentation(): Promise<void> {
|
||||
return this._proxy.$getContributedCommandHandlerDescriptions().then(result => {
|
||||
// add local commands
|
||||
const commands = CommandsRegistry.getCommands();
|
||||
@@ -70,14 +70,14 @@ export class MainThreadCommands implements MainThreadCommandsShape {
|
||||
}
|
||||
}
|
||||
|
||||
$executeCommand<T>(id: string, args: any[]): Thenable<T> {
|
||||
$executeCommand<T>(id: string, args: any[]): Promise<T> {
|
||||
for (let i = 0; i < args.length; i++) {
|
||||
args[i] = revive(args[i], 0);
|
||||
}
|
||||
return this._commandService.executeCommand<T>(id, ...args);
|
||||
}
|
||||
|
||||
$getCommands(): Thenable<string[]> {
|
||||
$getCommands(): Promise<string[]> {
|
||||
return Promise.resolve(Object.keys(CommandsRegistry.getCommands()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user