debt - less TPromise<any> in extHost.protocol

This commit is contained in:
Johannes Rieken
2017-12-15 11:45:48 +01:00
parent 8b35e5037d
commit cd4b141302
7 changed files with 34 additions and 43 deletions

View File

@@ -54,20 +54,18 @@ export class MainThreadCommands implements MainThreadCommandsShape {
});
}
$registerCommand(id: string): TPromise<any> {
$registerCommand(id: string): void {
this._disposables.set(
id,
CommandsRegistry.registerCommand(id, (accessor, ...args) => this._proxy.$executeContributedCommand(id, ...args))
);
return undefined;
}
$unregisterCommand(id: string): TPromise<any> {
$unregisterCommand(id: string): void {
if (this._disposables.has(id)) {
this._disposables.get(id).dispose();
this._disposables.delete(id);
}
return undefined;
}
$executeCommand<T>(id: string, args: any[]): Thenable<T> {