mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
Continue fixing TS 2.3.1 Compiler Errors in VSCode Codebase (#25315)
From: https://github.com/Microsoft/TypeScript/issues/15352 TS 2.3.1 introduced a breaking change by [switching to covariant types for callbacks](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#covariance-in-callback-parameters). This change tries to fix these compiler errors in the workbench codebase
This commit is contained in:
@@ -191,7 +191,7 @@ export function createApiFactory(
|
||||
}
|
||||
|
||||
executeCommand<T>(id: string, ...args: any[]): Thenable<T> {
|
||||
return extHostCommands.executeCommand(id, ...args);
|
||||
return extHostCommands.executeCommand<T>(id, ...args);
|
||||
}
|
||||
|
||||
getCommands(filterInternal: boolean = false): Thenable<string[]> {
|
||||
|
||||
@@ -91,7 +91,7 @@ export class ExtHostQuickOpen extends ExtHostQuickOpenShape {
|
||||
return TPromise.wrapError(err);
|
||||
});
|
||||
});
|
||||
return wireCancellationToken(token, promise, true);
|
||||
return wireCancellationToken<Item>(token, promise, true);
|
||||
}
|
||||
|
||||
$onItemSelected(handle: number): void {
|
||||
|
||||
@@ -43,7 +43,7 @@ export class MainThreadCommands extends MainThreadCommandsShape {
|
||||
}
|
||||
|
||||
$executeCommand<T>(id: string, args: any[]): Thenable<T> {
|
||||
return this._commandService.executeCommand(id, ...args);
|
||||
return this._commandService.executeCommand<T>(id, ...args);
|
||||
}
|
||||
|
||||
$getCommands(): Thenable<string[]> {
|
||||
|
||||
Reference in New Issue
Block a user