mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
Fix TS 2.3.1 Compiler Errors in VSCode src/workbench (#25249)
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:
@@ -76,7 +76,7 @@ export class ExtHostCommands extends ExtHostCommandsShape {
|
||||
if (this._commands.has(id)) {
|
||||
// we stay inside the extension host and support
|
||||
// to pass any kind of parameters around
|
||||
return this.$executeContributedCommand(id, ...args);
|
||||
return this.$executeContributedCommand<T>(id, ...args);
|
||||
|
||||
} else {
|
||||
// automagically convert some argument types
|
||||
@@ -96,7 +96,7 @@ export class ExtHostCommands extends ExtHostCommandsShape {
|
||||
}
|
||||
});
|
||||
|
||||
return this._proxy.$executeCommand(id, args);
|
||||
return this._proxy.$executeCommand<T>(id, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user