mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 05:36:37 +00:00
Strict null check mainThreadComments
This commit is contained in:
parent
b6f756832e
commit
c51f04c97a
|
@ -360,6 +360,7 @@
|
|||
"./vs/workbench/test/common/memento.test.ts",
|
||||
"./vs/workbench/test/common/notifications.test.ts",
|
||||
"./vs/workbench/test/electron-browser/api/extHost.api.impl.test.ts",
|
||||
"./vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts",
|
||||
"./vs/workbench/test/electron-browser/api/extHostCommands.test.ts",
|
||||
"./vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts",
|
||||
"./vs/workbench/test/electron-browser/api/extHostDiagnostics.test.ts",
|
||||
|
@ -388,6 +389,8 @@
|
|||
"./vs/workbench/test/electron-browser/api/mock.ts",
|
||||
"./vs/workbench/test/electron-browser/api/testRPCProtocol.ts",
|
||||
"./vs/workbench/test/electron-browser/colorRegistry.releaseTest.ts",
|
||||
"./vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts",
|
||||
"./vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts",
|
||||
"./vs/workbench/test/workbenchTestServices.ts"
|
||||
],
|
||||
"exclude": [
|
||||
|
|
|
@ -142,11 +142,11 @@ export class MainThreadCommentThread implements modes.CommentThread2 {
|
|||
return this._additionalCommands;
|
||||
}
|
||||
|
||||
set deleteCommand(newCommand: modes.Command) {
|
||||
set deleteCommand(newCommand: modes.Command | undefined) {
|
||||
this._deleteCommand = newCommand;
|
||||
}
|
||||
|
||||
get deleteCommand(): modes.Command {
|
||||
get deleteCommand(): modes.Command | undefined {
|
||||
return this._deleteCommand;
|
||||
}
|
||||
|
||||
|
@ -476,6 +476,9 @@ export class MainThreadComments extends Disposable implements MainThreadComments
|
|||
|
||||
$unregisterCommentController(handle: number): void {
|
||||
const providerId = this._handlers.get(handle);
|
||||
if (typeof providerId !== 'string') {
|
||||
throw new Error('unknown handler');
|
||||
}
|
||||
this._commentService.unregisterCommentController(providerId);
|
||||
this._handlers.delete(handle);
|
||||
this._commentControllers.delete(handle);
|
||||
|
|
Loading…
Reference in a new issue