diff --git a/src/tsconfig.strictNullChecks.json b/src/tsconfig.strictNullChecks.json index d2622ab91ea..fb3756323ab 100644 --- a/src/tsconfig.strictNullChecks.json +++ b/src/tsconfig.strictNullChecks.json @@ -775,6 +775,7 @@ "./vs/workbench/test/common/editor/editorOptions.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/extHostConfiguration.test.ts", "./vs/workbench/test/electron-browser/api/extHostDocumentData.test.ts", "./vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts", "./vs/workbench/test/electron-browser/api/extHostTypes.test.ts", diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index a0fec19ef9c..4cd66f5e7c6 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -56,7 +56,7 @@ interface MutableWorkspaceFolder extends vscode.WorkspaceFolder { class ExtHostWorkspaceImpl extends Workspace { - static toExtHostWorkspace(data: IWorkspaceData, previousConfirmedWorkspace?: ExtHostWorkspaceImpl, previousUnconfirmedWorkspace?: ExtHostWorkspaceImpl): { workspace: ExtHostWorkspaceImpl | null, added: vscode.WorkspaceFolder[], removed: vscode.WorkspaceFolder[] } { + static toExtHostWorkspace(data: IWorkspaceData | null, previousConfirmedWorkspace?: ExtHostWorkspaceImpl, previousUnconfirmedWorkspace?: ExtHostWorkspaceImpl): { workspace: ExtHostWorkspaceImpl | null, added: vscode.WorkspaceFolder[], removed: vscode.WorkspaceFolder[] } { if (!data) { return { workspace: null, added: [], removed: [] }; } @@ -198,7 +198,7 @@ export class ExtHostWorkspaceProvider { constructor( mainContext: IMainContext, - data: IWorkspaceData, + data: IWorkspaceData | null, private _logService: ILogService, private _requestIdProvider: Counter ) { diff --git a/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts b/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts index 25213f7c845..e8d1abc034c 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts @@ -56,7 +56,7 @@ suite('ExtHostConfiguration', function () { assert.equal(extHostConfig.getConfiguration('search.exclude')['**/node_modules'], true); assert.equal(extHostConfig.getConfiguration('search.exclude').get('**/node_modules'), true); - assert.equal(extHostConfig.getConfiguration('search').get('exclude')['**/node_modules'], true); + assert.equal(extHostConfig.getConfiguration('search').get('exclude')!['**/node_modules'], true); assert.equal(extHostConfig.getConfiguration('search.exclude').has('**/node_modules'), true); assert.equal(extHostConfig.getConfiguration('search').has('exclude.**/node_modules'), true); @@ -167,7 +167,7 @@ suite('ExtHostConfiguration', function () { }); const testObject = all.getConfiguration(); - let actual = testObject.get('farboo'); + let actual: any = testObject.get('farboo'); assert.deepEqual(JSON.stringify({ 'config0': true, 'nested': { @@ -190,7 +190,7 @@ suite('ExtHostConfiguration', function () { 'config4': '' }), JSON.stringify(actual)); - actual = testObject.get('workbench')['colorCustomizations']!; + actual = testObject.get('workbench')!['colorCustomizations']!; actual['statusBar.background'] = 'anothervalue'; assert.deepEqual(JSON.stringify({ 'statusBar.foreground': 'somevalue', @@ -241,7 +241,7 @@ suite('ExtHostConfiguration', function () { } }); - let testObject = all.getConfiguration(); + let testObject: any = all.getConfiguration(); try { testObject['get'] = null;