diff --git a/src/tsconfig.strictNullChecks.json b/src/tsconfig.strictNullChecks.json index 430f6f403a4..8c83108d46e 100644 --- a/src/tsconfig.strictNullChecks.json +++ b/src/tsconfig.strictNullChecks.json @@ -615,6 +615,8 @@ "./vs/workbench/parts/scm/electron-browser/scmMenus.ts", "./vs/workbench/parts/scm/electron-browser/scmUtil.ts", "./vs/workbench/parts/search/browser/patternInputWidget.ts", + "./vs/workbench/parts/search/browser/replaceContributions.ts", + "./vs/workbench/parts/search/browser/replaceService.ts", "./vs/workbench/parts/search/common/constants.ts", "./vs/workbench/parts/search/common/queryBuilder.ts", "./vs/workbench/parts/search/common/replace.ts", @@ -758,6 +760,7 @@ "./vs/workbench/services/keybinding/test/keybindingIO.test.ts", "./vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts", "./vs/workbench/services/keybinding/test/macLinuxFallbackKeyboardMapper.test.ts", + "./vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts", "./vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts", "./vs/workbench/services/mode/common/workbenchModeService.ts", "./vs/workbench/services/notification/common/notificationService.ts", @@ -809,7 +812,6 @@ "./vs/workbench/services/title/common/titleService.ts", "./vs/workbench/services/workspace/common/workspaceEditing.ts", "./vs/workbench/test/common/editor/editorOptions.test.ts", - "./vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts", "./vs/workbench/test/common/notifications.test.ts", "./vs/workbench/test/electron-browser/api/extHostTypes.test.ts", "./vs/workbench/test/electron-browser/api/mock.ts" diff --git a/src/vs/editor/common/services/resolverService.ts b/src/vs/editor/common/services/resolverService.ts index 28aca391a32..7cc218bec57 100644 --- a/src/vs/editor/common/services/resolverService.ts +++ b/src/vs/editor/common/services/resolverService.ts @@ -36,7 +36,7 @@ export interface ITextModelContentProvider { /** * Given a resource, return the content of the resource as `ITextModel`. */ - provideTextContent(resource: URI): Promise; + provideTextContent(resource: URI): Promise | null; } export interface ITextEditorModel extends IEditorModel { diff --git a/src/vs/workbench/parts/search/browser/replaceService.ts b/src/vs/workbench/parts/search/browser/replaceService.ts index 2a4207002c6..79b23bf636d 100644 --- a/src/vs/workbench/parts/search/browser/replaceService.ts +++ b/src/vs/workbench/parts/search/browser/replaceService.ts @@ -46,7 +46,7 @@ export class ReplacePreviewContentProvider implements ITextModelContentProvider, this.textModelResolverService.registerTextModelContentProvider(network.Schemas.internal, this); } - provideTextContent(uri: URI): Promise { + provideTextContent(uri: URI): Promise | null { if (uri.fragment === REPLACE_PREVIEW) { return this.instantiationService.createInstance(ReplacePreviewModel).resolve(uri); } @@ -103,7 +103,7 @@ export class ReplaceService implements IReplaceService { replace(match: Match): Promise; replace(files: FileMatch[], progress?: IProgressRunner): Promise; replace(match: FileMatchOrMatch, progress?: IProgressRunner, resource?: URI): Promise; - replace(arg: any, progress: IProgressRunner | null = null, resource: URI | null = null): Promise { + replace(arg: any, progress: IProgressRunner | undefined = undefined, resource: URI | null = null): Promise { const edits: ResourceTextEdit[] = this.createEdits(arg, resource); return this.bulkEditorService.apply({ edits }, { progress }).then(() => this.textFileService.saveAll(edits.map(e => e.resource)));