From dedf0de944fae56f0bf748913cbc1b2cc24987d2 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 30 Aug 2019 15:35:48 +0200 Subject: [PATCH] change type of _serviceBrand from `any` to `undefined`, #79918 --- .../sharedProcess/sharedProcessMain.ts | 3 +- src/vs/code/electron-main/auth.ts | 2 +- src/vs/code/electron-main/windows.ts | 2 +- .../browser/core/keybindingCancellation.ts | 4 +- .../services/abstractCodeEditorService.ts | 2 +- .../browser/services/bulkEditService.ts | 2 +- .../browser/services/codeEditorService.ts | 2 +- .../editor/browser/services/openerService.ts | 3 +- .../common/services/editorWorkerService.ts | 2 +- .../services/editorWorkerServiceImpl.ts | 2 +- .../services/markerDecorationsServiceImpl.ts | 2 +- .../services/markersDecorationService.ts | 2 +- src/vs/editor/common/services/modeService.ts | 2 +- .../editor/common/services/modeServiceImpl.ts | 2 +- src/vs/editor/common/services/modelService.ts | 2 +- .../common/services/modelServiceImpl.ts | 2 +- .../editor/common/services/resolverService.ts | 2 +- .../common/services/resourceConfiguration.ts | 4 +- .../services/resourceConfigurationImpl.ts | 2 +- .../editor/contrib/codelens/codeLensCache.ts | 4 +- .../goToDefinitionResultsNavigation.ts | 4 +- .../multicursor/test/multicursor.test.ts | 2 +- .../contrib/referenceSearch/peekViewWidget.ts | 6 +-- .../smartSelect/test/smartSelect.test.ts | 2 +- .../snippet/test/snippetVariables.test.ts | 2 +- .../editor/contrib/suggest/suggestMemory.ts | 4 +- .../contrib/suggest/test/suggestModel.test.ts | 2 +- .../standalone/browser/simpleServices.ts | 26 ++++++------ .../browser/standaloneThemeServiceImpl.ts | 2 +- .../common/standaloneThemeService.ts | 2 +- .../test/browser/standaloneLanguages.test.ts | 4 +- .../editor/test/browser/editorTestServices.ts | 2 +- .../browser/services/openerService.test.ts | 2 +- .../test/common/services/modelService.test.ts | 2 +- .../common/abstractAccessibilityService.ts | 2 +- .../accessibility/common/accessibility.ts | 2 +- .../common/accessibilityService.ts | 2 +- src/vs/platform/actions/common/actions.ts | 2 +- src/vs/platform/actions/common/menuService.ts | 2 +- src/vs/platform/backup/common/backup.ts | 2 +- .../backup/electron-main/backupMainService.ts | 2 +- .../clipboard/browser/clipboardService.ts | 3 +- .../clipboard/common/clipboardService.ts | 2 +- .../electron-browser/clipboardService.ts | 2 +- src/vs/platform/commands/common/commands.ts | 2 +- .../configuration/common/configuration.ts | 2 +- .../node/configurationService.ts | 2 +- .../test/common/testConfigurationService.ts | 2 +- .../contextkey/browser/contextKeyService.ts | 2 +- .../platform/contextkey/common/contextkey.ts | 2 +- .../contextview/browser/contextMenuService.ts | 2 +- .../contextview/browser/contextView.ts | 4 +- .../contextview/browser/contextViewService.ts | 2 +- .../debug/common/extensionHostDebug.ts | 2 +- .../debug/common/extensionHostDebugIpc.ts | 2 +- .../diagnostics/node/diagnosticsIpc.ts | 3 +- .../diagnostics/node/diagnosticsService.ts | 4 +- .../platform/dialogs/browser/dialogService.ts | 2 +- src/vs/platform/dialogs/common/dialogs.ts | 4 +- src/vs/platform/dialogs/node/dialogIpc.ts | 2 +- src/vs/platform/download/common/download.ts | 2 +- .../platform/download/common/downloadIpc.ts | 2 +- .../download/common/downloadService.ts | 2 +- src/vs/platform/driver/common/driver.ts | 2 +- .../platform/driver/electron-main/driver.ts | 2 +- src/vs/platform/driver/node/driver.ts | 6 +-- .../environment/common/environment.ts | 4 +- .../environment/node/environmentService.ts | 3 +- .../common/extensionGalleryService.ts | 2 +- .../common/extensionManagement.ts | 4 +- .../common/extensionManagementIpc.ts | 2 +- .../node/extensionManagementService.ts | 2 +- src/vs/platform/files/common/fileService.ts | 3 +- src/vs/platform/files/common/files.ts | 4 +- src/vs/platform/history/common/history.ts | 2 +- .../electron-main/historyMainService.ts | 3 +- .../instantiation/common/instantiation.ts | 20 ++++----- .../common/instantiationService.ts | 2 +- .../test/common/instantiationService.test.ts | 22 +++++----- .../electron-browser/mainProcessService.ts | 6 +-- .../electron-browser/sharedProcessService.ts | 6 +-- .../issue/electron-browser/issueService.ts | 3 +- .../issue/electron-main/issueService.ts | 2 +- src/vs/platform/issue/node/issue.ts | 2 +- .../common/abstractKeybindingService.ts | 2 +- .../platform/keybinding/common/keybinding.ts | 2 +- .../common/abstractKeybindingService.test.ts | 3 +- .../test/common/mockKeybindingService.ts | 4 +- src/vs/platform/label/common/label.ts | 2 +- .../launch/electron-main/launchService.ts | 8 ++-- .../platform/layout/browser/layoutService.ts | 2 +- .../lifecycle/browser/lifecycleService.ts | 5 +-- src/vs/platform/lifecycle/common/lifecycle.ts | 6 +-- .../lifecycle/common/lifecycleService.ts | 3 +- .../electron-browser/lifecycleService.ts | 5 +-- .../lifecycle/electron-main/lifecycleMain.ts | 6 +-- src/vs/platform/list/browser/listService.ts | 4 +- .../localizations/common/localizations.ts | 2 +- .../electron-browser/localizationsService.ts | 3 +- .../localizations/node/localizations.ts | 2 +- src/vs/platform/log/common/bufferLog.ts | 2 +- src/vs/platform/log/common/fileLogService.ts | 2 +- src/vs/platform/log/common/log.ts | 12 +++--- src/vs/platform/log/common/logIpc.ts | 2 +- src/vs/platform/log/node/spdlogService.ts | 2 +- .../platform/markers/common/markerService.ts | 2 +- src/vs/platform/markers/common/markers.ts | 2 +- .../electron-browser/menubarService.ts | 3 +- .../menubar/electron-main/menubarService.ts | 2 +- src/vs/platform/menubar/node/menubar.ts | 2 +- .../notification/common/notification.ts | 4 +- .../test/common/testNotificationService.ts | 2 +- src/vs/platform/opener/common/opener.ts | 2 +- src/vs/platform/progress/common/progress.ts | 6 +-- src/vs/platform/quickOpen/common/quickOpen.ts | 2 +- .../platform/quickinput/common/quickInput.ts | 2 +- .../browser/remoteAuthorityResolverService.ts | 2 +- .../remote/common/remoteAuthorityResolver.ts | 2 +- src/vs/platform/remote/common/tunnel.ts | 2 +- .../remoteAuthorityResolverService.ts | 2 +- src/vs/platform/remote/node/tunnelService.ts | 2 +- .../request/browser/requestService.ts | 2 +- src/vs/platform/request/common/request.ts | 2 +- src/vs/platform/request/common/requestIpc.ts | 2 +- .../platform/request/node/requestService.ts | 2 +- src/vs/platform/sign/browser/signService.ts | 3 +- src/vs/platform/sign/common/sign.ts | 2 +- src/vs/platform/sign/node/signService.ts | 2 +- src/vs/platform/state/common/state.ts | 2 +- src/vs/platform/state/node/stateService.ts | 2 +- src/vs/platform/statusbar/common/statusbar.ts | 6 +-- .../storage/browser/storageService.ts | 3 +- src/vs/platform/storage/common/storage.ts | 6 +-- src/vs/platform/storage/node/storageIpc.ts | 2 +- .../storage/node/storageMainService.ts | 6 +-- .../platform/storage/node/storageService.ts | 3 +- src/vs/platform/telemetry/common/telemetry.ts | 2 +- .../telemetry/common/telemetryService.ts | 2 +- .../appInsightsAppender.test.ts | 2 +- src/vs/platform/theme/common/themeService.ts | 2 +- .../theme/electron-main/themeMainService.ts | 4 +- .../theme/test/common/testThemeService.ts | 2 +- src/vs/platform/update/common/update.ts | 2 +- .../update/electron-browser/updateService.ts | 3 +- .../electron-main/abstractUpdateService.ts | 2 +- .../electron-main/updateService.darwin.ts | 2 +- .../electron-main/updateService.linux.ts | 2 +- .../electron-main/updateService.snap.ts | 4 +- .../electron-main/updateService.win32.ts | 2 +- src/vs/platform/url/common/url.ts | 4 +- src/vs/platform/url/common/urlService.ts | 3 +- src/vs/platform/url/node/urlIpc.ts | 2 +- src/vs/platform/windows/common/windows.ts | 4 +- .../electron-browser/windowsService.ts | 3 +- .../platform/windows/electron-main/windows.ts | 2 +- .../windows/electron-main/windowsService.ts | 3 +- src/vs/platform/workspace/common/workspace.ts | 2 +- .../platform/workspaces/common/workspaces.ts | 4 +- .../electron-browser/workspacesService.ts | 3 +- .../electron-main/workspacesMainService.ts | 2 +- .../workbench/api/common/extHostCommands.ts | 2 +- .../api/common/extHostConfiguration.ts | 2 +- .../api/common/extHostDebugService.ts | 2 +- .../api/common/extHostDocumentsAndEditors.ts | 2 +- .../api/common/extHostExtensionService.ts | 4 +- src/vs/workbench/api/common/extHostOutput.ts | 2 +- .../workbench/api/common/extHostRpcService.ts | 4 +- src/vs/workbench/api/common/extHostStorage.ts | 2 +- .../api/common/extHostStoragePaths.ts | 2 +- src/vs/workbench/api/common/extHostTask.ts | 2 +- .../api/common/extHostTerminalService.ts | 2 +- .../common/extHostUriTransformerService.ts | 4 +- .../workbench/api/common/extHostWorkspace.ts | 2 +- .../workbench/api/node/extHostDebugService.ts | 2 +- src/vs/workbench/api/node/extHostTask.ts | 2 +- .../api/node/extHostTerminalService.ts | 2 +- .../workbench/api/worker/extHostLogService.ts | 2 +- src/vs/workbench/browser/layout.ts | 4 +- .../parts/activitybar/activitybarPart.ts | 4 +- .../browser/parts/editor/breadcrumbs.ts | 6 +-- .../browser/parts/editor/editorPart.ts | 4 +- .../browser/parts/panel/panelPart.ts | 4 +- .../browser/parts/quickinput/quickInput.ts | 4 +- .../parts/quickopen/quickOpenController.ts | 4 +- .../browser/parts/sidebar/sidebarPart.ts | 4 +- .../browser/parts/statusbar/statusbarPart.ts | 4 +- .../browser/parts/titlebar/titlebarPart.ts | 4 +- src/vs/workbench/browser/parts/views/views.ts | 3 +- .../workbench/browser/web.simpleservices.ts | 14 +++---- src/vs/workbench/common/views.ts | 4 +- .../comments/browser/commentService.ts | 4 +- .../contrib/debug/browser/breakpointWidget.ts | 4 +- .../contrib/debug/browser/debugService.ts | 2 +- .../browser/extensionHostDebugService.ts | 3 +- .../workbench/contrib/debug/browser/repl.ts | 4 +- .../workbench/contrib/debug/common/debug.ts | 4 +- .../contrib/debug/node/debugHelperService.ts | 2 +- .../contrib/debug/test/common/mockDebug.ts | 2 +- .../experiments/common/experimentService.ts | 4 +- .../browser/extensionTipsService.ts | 2 +- .../browser/extensionsWorkbenchService.ts | 2 +- .../contrib/extensions/common/extensions.ts | 2 +- .../extensionProfileService.ts | 2 +- .../runtimeExtensionsEditor.ts | 2 +- .../extensionsActions.test.ts | 4 +- .../common/externalTerminal.ts | 2 +- .../node/externalTerminalService.ts | 6 +-- .../contrib/files/common/explorerService.ts | 2 +- .../workbench/contrib/files/common/files.ts | 2 +- .../contrib/issue/electron-browser/issue.ts | 2 +- .../issue/electron-browser/issueService.ts | 2 +- .../contrib/markers/browser/markers.ts | 4 +- .../contrib/output/browser/outputServices.ts | 2 +- .../workbench/contrib/output/common/output.ts | 2 +- .../preferences/browser/preferencesSearch.ts | 2 +- .../contrib/preferences/common/preferences.ts | 2 +- src/vs/workbench/contrib/scm/common/scm.ts | 2 +- .../contrib/scm/common/scmService.ts | 2 +- .../contrib/search/browser/replaceService.ts | 2 +- .../contrib/search/common/replace.ts | 2 +- .../search/common/searchHistoryService.ts | 4 +- .../contrib/search/common/searchModel.ts | 4 +- .../snippets/browser/snippets.contribution.ts | 2 +- .../snippets/browser/snippetsService.ts | 2 +- .../test/browser/snippetsService.test.ts | 2 +- .../contrib/stats/common/workspaceStats.ts | 2 +- .../electron-browser/workspaceStatsService.ts | 2 +- .../tasks/browser/abstractTaskService.ts | 2 +- .../contrib/tasks/common/taskService.ts | 2 +- .../contrib/terminal/browser/terminal.ts | 2 +- .../browser/terminalInstanceService.ts | 2 +- .../terminal/browser/terminalNativeService.ts | 2 +- .../contrib/terminal/common/terminal.ts | 4 +- .../terminal/common/terminalService.ts | 2 +- .../terminalInstanceService.ts | 2 +- .../electron-browser/terminalNativeService.ts | 2 +- .../terminalLinkHandler.test.ts | 2 +- .../contrib/webview/browser/webview.ts | 2 +- .../webview/browser/webviewEditorService.ts | 4 +- .../contrib/webview/browser/webviewService.ts | 2 +- .../electron-browser/webviewService.ts | 2 +- .../node/accessibilityService.ts | 3 +- .../activity/browser/activityService.ts | 2 +- .../services/activity/common/activity.ts | 2 +- .../activityBar/browser/activityBarService.ts | 2 +- .../services/backup/common/backup.ts | 6 +-- .../backup/common/backupFileService.ts | 7 ++-- .../bulkEdit/browser/bulkEditService.ts | 2 +- .../commands/common/commandService.ts | 2 +- .../browser/configurationService.ts | 2 +- .../common/configurationEditingService.ts | 2 +- .../configuration/common/jsonEditing.ts | 6 +-- .../common/jsonEditingService.ts | 2 +- .../configurationEditingService.test.ts | 2 +- .../common/configurationResolver.ts | 2 +- .../common/variableResolver.ts | 2 +- .../configurationResolverService.test.ts | 6 +-- .../electron-browser/contextmenuService.ts | 4 +- .../credentials/browser/credentialsService.ts | 3 +- .../credentials/common/credentials.ts | 4 +- .../credentials/node/credentialsService.ts | 3 +- .../decorations/browser/decorations.ts | 2 +- .../decorations/browser/decorationsService.ts | 2 +- .../dialogs/browser/fileDialogService.ts | 2 +- .../dialogs/electron-browser/dialogService.ts | 4 +- .../services/editor/browser/editorService.ts | 4 +- .../editor/common/editorGroupsService.ts | 4 +- .../services/editor/common/editorService.ts | 4 +- .../environment/browser/environmentService.ts | 3 +- .../environment/common/environmentService.ts | 4 +- .../environment/node/environmentService.ts | 3 +- .../common/extensionEnablementService.ts | 2 +- .../common/extensionManagement.ts | 6 +-- .../extensionManagementServerService.ts | 2 +- .../common/extensionManagementService.ts | 2 +- .../extensionManagementServerService.ts | 2 +- .../extensionEnablementService.test.ts | 2 +- .../common/abstractExtensionService.ts | 2 +- .../services/extensions/common/extensions.ts | 4 +- .../common/inactiveExtensionUrlHandler.ts | 4 +- .../extensions/common/staticExtensions.ts | 4 +- .../remoteExtensionManagementIpc.ts | 2 +- .../extensions/worker/extensionHostWorker.ts | 2 +- .../services/history/browser/history.ts | 4 +- .../services/history/common/history.ts | 4 +- .../integrity/browser/integrityService.ts | 3 +- .../services/integrity/common/integrity.ts | 2 +- .../integrity/node/integrityService.ts | 3 +- .../keybinding/browser/keymapService.ts | 2 +- .../keybinding/common/keybindingEditing.ts | 8 ++-- .../services/keybinding/common/keymapInfo.ts | 4 +- .../electron-browser/nativeKeymapService.ts | 2 +- .../services/label/common/labelService.ts | 2 +- .../services/layout/browser/layoutService.ts | 4 +- .../common/notificationService.ts | 3 +- .../output/common/outputChannelModel.ts | 2 +- .../common/outputChannelModelService.ts | 2 +- .../output/node/outputChannelModelService.ts | 2 +- .../services/panel/common/panelService.ts | 4 +- .../preferences/browser/preferencesService.ts | 2 +- .../preferences/common/preferences.ts | 2 +- .../progress/browser/editorProgressService.ts | 4 +- .../progress/browser/progressService.ts | 3 +- .../common/abstractRemoteAgentService.ts | 2 +- .../remote/common/remoteAgentService.ts | 2 +- .../services/remote/node/tunnelService.ts | 2 +- .../services/search/common/search.ts | 2 +- .../services/search/common/searchService.ts | 3 +- .../telemetry/browser/telemetryService.ts | 2 +- .../electron-browser/telemetryService.ts | 2 +- .../browser/abstractTextMateService.ts | 2 +- .../textMate/common/textMateService.ts | 2 +- .../textfile/common/textFileService.ts | 4 +- .../common/textResourcePropertiesService.ts | 3 +- .../services/textfile/common/textfiles.ts | 6 +-- .../common/textModelResolverService.ts | 2 +- .../themes/browser/workbenchThemeService.ts | 2 +- .../themes/common/workbenchThemeService.ts | 2 +- .../timer/electron-browser/timerService.ts | 4 +- .../services/title/common/titleService.ts | 2 +- .../untitled/common/untitledEditorService.ts | 6 +-- .../services/url/browser/urlService.ts | 4 +- .../services/viewlet/browser/viewlet.ts | 4 +- .../window/electron-browser/windowService.ts | 2 +- .../workspace/common/workspaceEditing.ts | 6 +-- .../workspaceEditingService.ts | 3 +- .../workbench/test/browser/quickopen.test.ts | 2 +- .../api/extHostApiCommands.test.ts | 2 +- .../api/extHostMessagerService.test.ts | 7 ++-- .../api/mainThreadDocumentsAndEditors.test.ts | 2 +- .../api/mainThreadEditors.test.ts | 2 +- .../electron-browser/api/testRPCProtocol.ts | 2 +- .../quickopen.perf.integrationTest.ts | 2 +- .../textsearch.perf.integrationTest.ts | 2 +- .../workbench/test/workbenchTestServices.ts | 42 +++++++++---------- test/smoke/src/vscode/puppeteerDriver.ts | 2 +- 336 files changed, 511 insertions(+), 551 deletions(-) diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts index 1ac605dd7e5..23f66717547 100644 --- a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts @@ -46,7 +46,6 @@ import { LanguagePackCachedDataCleaner } from 'vs/code/electron-browser/sharedPr import { StorageDataCleaner } from 'vs/code/electron-browser/sharedProcess/contrib/storageDataCleaner'; import { LogsDataCleaner } from 'vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner'; import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { SpdLogService } from 'vs/platform/log/node/spdlogService'; import { DiagnosticsService, IDiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsService'; import { DiagnosticsChannel } from 'vs/platform/diagnostics/node/diagnosticsIpc'; @@ -75,7 +74,7 @@ const eventPrefix = 'monacoworkbench'; class MainProcessService implements IMainProcessService { constructor(private server: Server, private mainRouter: StaticRouter) { } - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; getChannel(channelName: string): IChannel { return this.server.getChannel(channelName, this.mainRouter); diff --git a/src/vs/code/electron-main/auth.ts b/src/vs/code/electron-main/auth.ts index 6fbd3fcce46..0d39ddd71ff 100644 --- a/src/vs/code/electron-main/auth.ts +++ b/src/vs/code/electron-main/auth.ts @@ -24,7 +24,7 @@ type Credentials = { export class ProxyAuthHandler { - _serviceBrand: any; + _serviceBrand: undefined; private retryCount = 0; private disposables: IDisposable[] = []; diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index d4defa1962e..922a7deb27a 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -157,7 +157,7 @@ interface IWorkspacePathToOpen { export class WindowsManager extends Disposable implements IWindowsMainService { - _serviceBrand: any; + _serviceBrand: undefined; private static readonly windowsStateStorageKey = 'windowsState'; diff --git a/src/vs/editor/browser/core/keybindingCancellation.ts b/src/vs/editor/browser/core/keybindingCancellation.ts index 54ed2852a96..df5795ffe28 100644 --- a/src/vs/editor/browser/core/keybindingCancellation.ts +++ b/src/vs/editor/browser/core/keybindingCancellation.ts @@ -17,7 +17,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; const IEditorCancellationTokens = createDecorator('IEditorCancelService'); interface IEditorCancellationTokens { - _serviceBrand: any; + _serviceBrand: undefined; add(editor: ICodeEditor, cts: CancellationTokenSource): () => void; cancel(editor: ICodeEditor): void; } @@ -26,7 +26,7 @@ const ctxCancellableOperation = new RawContextKey('cancellableOperation', false) registerSingleton(IEditorCancellationTokens, class implements IEditorCancellationTokens { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _tokens = new WeakMap, tokens: LinkedList }>(); diff --git a/src/vs/editor/browser/services/abstractCodeEditorService.ts b/src/vs/editor/browser/services/abstractCodeEditorService.ts index c4a4be40d46..53c5bac6f28 100644 --- a/src/vs/editor/browser/services/abstractCodeEditorService.ts +++ b/src/vs/editor/browser/services/abstractCodeEditorService.ts @@ -13,7 +13,7 @@ import { IResourceInput } from 'vs/platform/editor/common/editor'; export abstract class AbstractCodeEditorService extends Disposable implements ICodeEditorService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _onCodeEditorAdd: Emitter = this._register(new Emitter()); public readonly onCodeEditorAdd: Event = this._onCodeEditorAdd.event; diff --git a/src/vs/editor/browser/services/bulkEditService.ts b/src/vs/editor/browser/services/bulkEditService.ts index 1bbda5bf6ef..ada4ed7b23d 100644 --- a/src/vs/editor/browser/services/bulkEditService.ts +++ b/src/vs/editor/browser/services/bulkEditService.ts @@ -21,7 +21,7 @@ export interface IBulkEditResult { } export interface IBulkEditService { - _serviceBrand: any; + _serviceBrand: undefined; apply(edit: WorkspaceEdit, options?: IBulkEditOptions): Promise; } diff --git a/src/vs/editor/browser/services/codeEditorService.ts b/src/vs/editor/browser/services/codeEditorService.ts index 68f4c24fc6e..c85aaae1a29 100644 --- a/src/vs/editor/browser/services/codeEditorService.ts +++ b/src/vs/editor/browser/services/codeEditorService.ts @@ -13,7 +13,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' export const ICodeEditorService = createDecorator('codeEditorService'); export interface ICodeEditorService { - _serviceBrand: any; + _serviceBrand: undefined; readonly onCodeEditorAdd: Event; readonly onCodeEditorRemove: Event; diff --git a/src/vs/editor/browser/services/openerService.ts b/src/vs/editor/browser/services/openerService.ts index 07056377d38..c42f82fdb26 100644 --- a/src/vs/editor/browser/services/openerService.ts +++ b/src/vs/editor/browser/services/openerService.ts @@ -13,12 +13,11 @@ import { equalsIgnoreCase } from 'vs/base/common/strings'; import { URI } from 'vs/base/common/uri'; import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { IOpener, IOpenerService, IValidator } from 'vs/platform/opener/common/opener'; export class OpenerService extends Disposable implements IOpenerService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private readonly _openers = new LinkedList(); private readonly _validators = new LinkedList(); diff --git a/src/vs/editor/common/services/editorWorkerService.ts b/src/vs/editor/common/services/editorWorkerService.ts index 28dcae74ce6..bd217b1944d 100644 --- a/src/vs/editor/common/services/editorWorkerService.ts +++ b/src/vs/editor/common/services/editorWorkerService.ts @@ -18,7 +18,7 @@ export interface IDiffComputationResult { } export interface IEditorWorkerService { - _serviceBrand: any; + _serviceBrand: undefined; canComputeDiff(original: URI, modified: URI): boolean; computeDiff(original: URI, modified: URI, ignoreTrimWhitespace: boolean): Promise; diff --git a/src/vs/editor/common/services/editorWorkerServiceImpl.ts b/src/vs/editor/common/services/editorWorkerServiceImpl.ts index 74ff7b7fbfa..34001e40608 100644 --- a/src/vs/editor/common/services/editorWorkerServiceImpl.ts +++ b/src/vs/editor/common/services/editorWorkerServiceImpl.ts @@ -46,7 +46,7 @@ function canSyncModel(modelService: IModelService, resource: URI): boolean { } export class EditorWorkerServiceImpl extends Disposable implements IEditorWorkerService { - public _serviceBrand: any; + public _serviceBrand: undefined; private readonly _modelService: IModelService; private readonly _workerManager: WorkerManager; diff --git a/src/vs/editor/common/services/markerDecorationsServiceImpl.ts b/src/vs/editor/common/services/markerDecorationsServiceImpl.ts index 3da62fed16f..c2140eff46d 100644 --- a/src/vs/editor/common/services/markerDecorationsServiceImpl.ts +++ b/src/vs/editor/common/services/markerDecorationsServiceImpl.ts @@ -61,7 +61,7 @@ class MarkerDecorations extends Disposable { export class MarkerDecorationsService extends Disposable implements IMarkerDecorationsService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _onDidChangeMarker = this._register(new Emitter()); readonly onDidChangeMarker: Event = this._onDidChangeMarker.event; diff --git a/src/vs/editor/common/services/markersDecorationService.ts b/src/vs/editor/common/services/markersDecorationService.ts index 44aa7ca2463..cd1c541cbc0 100644 --- a/src/vs/editor/common/services/markersDecorationService.ts +++ b/src/vs/editor/common/services/markersDecorationService.ts @@ -12,7 +12,7 @@ import { Range } from 'vs/editor/common/core/range'; export const IMarkerDecorationsService = createDecorator('markerDecorationsService'); export interface IMarkerDecorationsService { - _serviceBrand: any; + _serviceBrand: undefined; onDidChangeMarker: Event; diff --git a/src/vs/editor/common/services/modeService.ts b/src/vs/editor/common/services/modeService.ts index fd01515a97e..a6d2a6bc9e2 100644 --- a/src/vs/editor/common/services/modeService.ts +++ b/src/vs/editor/common/services/modeService.ts @@ -28,7 +28,7 @@ export interface ILanguageSelection extends IDisposable { } export interface IModeService { - _serviceBrand: any; + _serviceBrand: undefined; onDidCreateMode: Event; diff --git a/src/vs/editor/common/services/modeServiceImpl.ts b/src/vs/editor/common/services/modeServiceImpl.ts index 30ac27d4979..9ea8b4b204c 100644 --- a/src/vs/editor/common/services/modeServiceImpl.ts +++ b/src/vs/editor/common/services/modeServiceImpl.ts @@ -40,7 +40,7 @@ class LanguageSelection extends Disposable implements ILanguageSelection { } export class ModeServiceImpl implements IModeService { - public _serviceBrand: any; + public _serviceBrand: undefined; private readonly _instantiatedModes: { [modeId: string]: IMode; }; private readonly _registry: LanguagesRegistry; diff --git a/src/vs/editor/common/services/modelService.ts b/src/vs/editor/common/services/modelService.ts index 83f065c96ab..1c4a4514404 100644 --- a/src/vs/editor/common/services/modelService.ts +++ b/src/vs/editor/common/services/modelService.ts @@ -12,7 +12,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' export const IModelService = createDecorator('modelService'); export interface IModelService { - _serviceBrand: any; + _serviceBrand: undefined; createModel(value: string | ITextBufferFactory, languageSelection: ILanguageSelection | null, resource?: URI, isForSimpleWidget?: boolean): ITextModel; diff --git a/src/vs/editor/common/services/modelServiceImpl.ts b/src/vs/editor/common/services/modelServiceImpl.ts index 00a95b42c78..1c9d7a274a9 100644 --- a/src/vs/editor/common/services/modelServiceImpl.ts +++ b/src/vs/editor/common/services/modelServiceImpl.ts @@ -88,7 +88,7 @@ interface IRawConfig { const DEFAULT_EOL = (platform.isLinux || platform.isMacintosh) ? DefaultEndOfLine.LF : DefaultEndOfLine.CRLF; export class ModelServiceImpl extends Disposable implements IModelService { - public _serviceBrand: any; + public _serviceBrand: undefined; private readonly _configurationService: IConfigurationService; private readonly _configurationServiceSubscription: IDisposable; diff --git a/src/vs/editor/common/services/resolverService.ts b/src/vs/editor/common/services/resolverService.ts index 958469e16f1..b425ebb8fde 100644 --- a/src/vs/editor/common/services/resolverService.ts +++ b/src/vs/editor/common/services/resolverService.ts @@ -12,7 +12,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' export const ITextModelService = createDecorator('textModelService'); export interface ITextModelService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Provided a resource URI, it will return a model reference diff --git a/src/vs/editor/common/services/resourceConfiguration.ts b/src/vs/editor/common/services/resourceConfiguration.ts index 311556df882..0e122347e34 100644 --- a/src/vs/editor/common/services/resourceConfiguration.ts +++ b/src/vs/editor/common/services/resourceConfiguration.ts @@ -13,7 +13,7 @@ export const ITextResourceConfigurationService = createDecorator = this._register(new Emitter()); public readonly onDidChangeConfiguration: Event = this._onDidChangeConfiguration.event; diff --git a/src/vs/editor/contrib/codelens/codeLensCache.ts b/src/vs/editor/contrib/codelens/codeLensCache.ts index 9bddbb1d355..2bff6506f43 100644 --- a/src/vs/editor/contrib/codelens/codeLensCache.ts +++ b/src/vs/editor/contrib/codelens/codeLensCache.ts @@ -17,7 +17,7 @@ import { once } from 'vs/base/common/functional'; export const ICodeLensCache = createDecorator('ICodeLensCache'); export interface ICodeLensCache { - _serviceBrand: any; + _serviceBrand: undefined; put(model: ITextModel, data: CodeLensModel): void; get(model: ITextModel): CodeLensModel | undefined; delete(model: ITextModel): void; @@ -38,7 +38,7 @@ class CacheItem { export class CodeLensCache implements ICodeLensCache { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _fakeProvider = new class implements CodeLensProvider { provideCodeLenses(): CodeLensList { diff --git a/src/vs/editor/contrib/goToDefinition/goToDefinitionResultsNavigation.ts b/src/vs/editor/contrib/goToDefinition/goToDefinitionResultsNavigation.ts index cb35c72173e..e52bc043383 100644 --- a/src/vs/editor/contrib/goToDefinition/goToDefinitionResultsNavigation.ts +++ b/src/vs/editor/contrib/goToDefinition/goToDefinitionResultsNavigation.ts @@ -24,7 +24,7 @@ export const ctxHasSymbols = new RawContextKey('hasSymbols', false); export const ISymbolNavigationService = createDecorator('ISymbolNavigationService'); export interface ISymbolNavigationService { - _serviceBrand: any; + _serviceBrand: undefined; reset(): void; put(anchor: OneReference): void; revealNext(source: ICodeEditor): Promise; @@ -32,7 +32,7 @@ export interface ISymbolNavigationService { class SymbolNavigationService implements ISymbolNavigationService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _ctxHasSymbols: IContextKey; diff --git a/src/vs/editor/contrib/multicursor/test/multicursor.test.ts b/src/vs/editor/contrib/multicursor/test/multicursor.test.ts index 74068f74cf9..4e3fb3beabe 100644 --- a/src/vs/editor/contrib/multicursor/test/multicursor.test.ts +++ b/src/vs/editor/contrib/multicursor/test/multicursor.test.ts @@ -60,7 +60,7 @@ suite('Multicursor selection', () => { let queryState: { [key: string]: any; } = {}; let serviceCollection = new ServiceCollection(); serviceCollection.set(IStorageService, { - _serviceBrand: undefined as any, + _serviceBrand: undefined, onDidChangeStorage: Event.None, onWillSaveState: Event.None, get: (key: string) => queryState[key], diff --git a/src/vs/editor/contrib/referenceSearch/peekViewWidget.ts b/src/vs/editor/contrib/referenceSearch/peekViewWidget.ts index 4dd63cadd03..0ef1a5253c6 100644 --- a/src/vs/editor/contrib/referenceSearch/peekViewWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/peekViewWidget.ts @@ -25,12 +25,12 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; export const IPeekViewService = createDecorator('IPeekViewService'); export interface IPeekViewService { - _serviceBrand: any; + _serviceBrand: undefined; addExclusiveWidget(editor: ICodeEditor, widget: PeekViewWidget): void; } registerSingleton(IPeekViewService, class implements IPeekViewService { - _serviceBrand: any; + _serviceBrand: undefined; private _widgets = new Map(); @@ -80,7 +80,7 @@ const defaultOptions: IPeekViewOptions = { export abstract class PeekViewWidget extends ZoneWidget { - public _serviceBrand: any; + public _serviceBrand: undefined; private _onDidClose = new Emitter(); diff --git a/src/vs/editor/contrib/smartSelect/test/smartSelect.test.ts b/src/vs/editor/contrib/smartSelect/test/smartSelect.test.ts index 4263a1b4ac9..716bec966ca 100644 --- a/src/vs/editor/contrib/smartSelect/test/smartSelect.test.ts +++ b/src/vs/editor/contrib/smartSelect/test/smartSelect.test.ts @@ -22,7 +22,7 @@ import { WordSelectionRangeProvider } from 'vs/editor/contrib/smartSelect/wordSe class TestTextResourcePropertiesService implements ITextResourcePropertiesService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @IConfigurationService private readonly configurationService: IConfigurationService, diff --git a/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts b/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts index b4412f1d130..b7d5c40b8bf 100644 --- a/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts +++ b/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts @@ -299,7 +299,7 @@ suite('Snippet Variables Resolver', function () { let workspace: IWorkspace; let resolver: VariableResolver; const workspaceService = new class implements IWorkspaceContextService { - _serviceBrand: any; + _serviceBrand: undefined; _throw = () => { throw new Error(); }; onDidChangeWorkbenchState = this._throw; onDidChangeWorkspaceName = this._throw; diff --git a/src/vs/editor/contrib/suggest/suggestMemory.ts b/src/vs/editor/contrib/suggest/suggestMemory.ts index d08685206be..20f3b4b352d 100644 --- a/src/vs/editor/contrib/suggest/suggestMemory.ts +++ b/src/vs/editor/contrib/suggest/suggestMemory.ts @@ -208,7 +208,7 @@ export type MemMode = 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'; export class SuggestMemoryService extends Disposable implements ISuggestMemoryService { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; private readonly _storagePrefix = 'suggest/memories'; @@ -292,7 +292,7 @@ export class SuggestMemoryService extends Disposable implements ISuggestMemorySe export const ISuggestMemoryService = createDecorator('ISuggestMemories'); export interface ISuggestMemoryService { - _serviceBrand: any; + _serviceBrand: undefined; memorize(model: ITextModel, pos: IPosition, item: CompletionItem): void; select(model: ITextModel, pos: IPosition, items: CompletionItem[]): number; } diff --git a/src/vs/editor/contrib/suggest/test/suggestModel.test.ts b/src/vs/editor/contrib/suggest/test/suggestModel.test.ts index e18839ed6ad..e85123e7f73 100644 --- a/src/vs/editor/contrib/suggest/test/suggestModel.test.ts +++ b/src/vs/editor/contrib/suggest/test/suggestModel.test.ts @@ -47,7 +47,7 @@ function createMockEditor(model: TextModel): TestCodeEditor { [ITelemetryService, NullTelemetryService], [IStorageService, new InMemoryStorageService()], [ISuggestMemoryService, new class implements ISuggestMemoryService { - _serviceBrand: any; + _serviceBrand: undefined; memorize(): void { } select(): number { diff --git a/src/vs/editor/standalone/browser/simpleServices.ts b/src/vs/editor/standalone/browser/simpleServices.ts index b042afbc213..24106003124 100644 --- a/src/vs/editor/standalone/browser/simpleServices.ts +++ b/src/vs/editor/standalone/browser/simpleServices.ts @@ -97,7 +97,7 @@ function withTypedEditor(widget: editorCommon.IEditor, codeEditorCallback: (e } export class SimpleEditorModelResolverService implements ITextModelService { - public _serviceBrand: any; + public _serviceBrand: undefined; private editor?: editorCommon.IEditor; @@ -142,7 +142,7 @@ export class SimpleEditorModelResolverService implements ITextModelService { } export class SimpleEditorProgressService implements IEditorProgressService { - _serviceBrand: any; + _serviceBrand: undefined; private static NULL_PROGRESS_RUNNER: IProgressRunner = { done: () => { }, @@ -163,7 +163,7 @@ export class SimpleEditorProgressService implements IEditorProgressService { export class SimpleDialogService implements IDialogService { - public _serviceBrand: any; + public _serviceBrand: undefined; public confirm(confirmation: IConfirmation): Promise { return this.doConfirm(confirmation).then(confirmed => { @@ -190,7 +190,7 @@ export class SimpleDialogService implements IDialogService { export class SimpleNotificationService implements INotificationService { - public _serviceBrand: any; + public _serviceBrand: undefined; private static readonly NO_OP: INotificationHandle = new NoOpNotification(); @@ -232,7 +232,7 @@ export class SimpleNotificationService implements INotificationService { } export class StandaloneCommandService implements ICommandService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _instantiationService: IInstantiationService; private readonly _dynamicCommands: { [id: string]: ICommand; }; @@ -414,7 +414,7 @@ function isConfigurationOverrides(thing: any): thing is IConfigurationOverrides export class SimpleConfigurationService implements IConfigurationService { - _serviceBrand: any; + _serviceBrand: undefined; private _onDidChangeConfiguration = new Emitter(); public readonly onDidChangeConfiguration: Event = this._onDidChangeConfiguration.event; @@ -479,7 +479,7 @@ export class SimpleConfigurationService implements IConfigurationService { export class SimpleResourceConfigurationService implements ITextResourceConfigurationService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _onDidChangeConfiguration = new Emitter(); public readonly onDidChangeConfiguration = this._onDidChangeConfiguration.event; @@ -504,7 +504,7 @@ export class SimpleResourceConfigurationService implements ITextResourceConfigur export class SimpleResourcePropertiesService implements ITextResourcePropertiesService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @IConfigurationService private readonly configurationService: IConfigurationService, @@ -523,7 +523,7 @@ export class SimpleResourcePropertiesService implements ITextResourcePropertiesS } export class StandaloneTelemetryService implements ITelemetryService { - _serviceBrand: void = undefined; + _serviceBrand: undefined; public isOptedIn = false; @@ -545,7 +545,7 @@ export class StandaloneTelemetryService implements ITelemetryService { export class SimpleWorkspaceContextService implements IWorkspaceContextService { - public _serviceBrand: any; + public _serviceBrand: undefined; private static SCHEME = 'inmemory'; @@ -614,7 +614,7 @@ export function applyConfigurationValues(configurationService: IConfigurationSer } export class SimpleBulkEditService implements IBulkEditService { - _serviceBrand: any; + _serviceBrand: undefined; constructor(private readonly _modelService: IModelService) { // @@ -658,7 +658,7 @@ export class SimpleBulkEditService implements IBulkEditService { export class SimpleUriLabelService implements ILabelService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _onDidRegisterFormatter = new Emitter(); public readonly onDidChangeFormatters: Event = this._onDidRegisterFormatter.event; @@ -692,7 +692,7 @@ export class SimpleUriLabelService implements ILabelService { } export class SimpleLayoutService implements ILayoutService { - _serviceBrand: any; + _serviceBrand: undefined; public onLayout = Event.None; diff --git a/src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts b/src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts index 2a47cc6113b..613ec87b2de 100644 --- a/src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts +++ b/src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts @@ -156,7 +156,7 @@ function newBuiltInTheme(builtinTheme: BuiltinTheme): StandaloneTheme { export class StandaloneThemeServiceImpl implements IStandaloneThemeService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _knownThemes: Map; private readonly _styleElement: HTMLStyleElement; diff --git a/src/vs/editor/standalone/common/standaloneThemeService.ts b/src/vs/editor/standalone/common/standaloneThemeService.ts index cfbd291da9e..0fca97422c1 100644 --- a/src/vs/editor/standalone/common/standaloneThemeService.ts +++ b/src/vs/editor/standalone/common/standaloneThemeService.ts @@ -26,7 +26,7 @@ export interface IStandaloneTheme extends ITheme { } export interface IStandaloneThemeService extends IThemeService { - _serviceBrand: any; + _serviceBrand: undefined; setTheme(themeName: string): string; diff --git a/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts b/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts index 395c611acf2..b35c23cc03a 100644 --- a/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts +++ b/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts @@ -33,7 +33,7 @@ suite('TokenizationSupport2Adapter', () => { } class MockThemeService implements IStandaloneThemeService { - _serviceBrand = null; + _serviceBrand: undefined; public setTheme(themeName: string): string { throw new Error('Not implemented'); } @@ -184,4 +184,4 @@ suite('TokenizationSupport2Adapter', () => { ); }); -}); \ No newline at end of file +}); diff --git a/src/vs/editor/test/browser/editorTestServices.ts b/src/vs/editor/test/browser/editorTestServices.ts index f896360acf4..f70b534d96e 100644 --- a/src/vs/editor/test/browser/editorTestServices.ts +++ b/src/vs/editor/test/browser/editorTestServices.ts @@ -25,7 +25,7 @@ export class TestCodeEditorService extends AbstractCodeEditorService { } export class TestCommandService implements ICommandService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _instantiationService: IInstantiationService; diff --git a/src/vs/editor/test/browser/services/openerService.test.ts b/src/vs/editor/test/browser/services/openerService.test.ts index 6824acf4d84..6c50fcb5294 100644 --- a/src/vs/editor/test/browser/services/openerService.test.ts +++ b/src/vs/editor/test/browser/services/openerService.test.ts @@ -14,7 +14,7 @@ suite('OpenerService', function () { let lastCommand: { id: string; args: any[] } | undefined; const commandService = new (class implements ICommandService { - _serviceBrand: any; + _serviceBrand: undefined; onWillExecuteCommand = () => ({ dispose: () => { } }); onDidExecuteCommand = () => ({ dispose: () => { } }); executeCommand(id: string, ...args: any[]): Promise { diff --git a/src/vs/editor/test/common/services/modelService.test.ts b/src/vs/editor/test/common/services/modelService.test.ts index 5bd0289ad83..20d3b7d3312 100644 --- a/src/vs/editor/test/common/services/modelService.test.ts +++ b/src/vs/editor/test/common/services/modelService.test.ts @@ -367,7 +367,7 @@ assertComputeEdits(file1, file2); class TestTextResourcePropertiesService implements ITextResourcePropertiesService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @IConfigurationService private readonly configurationService: IConfigurationService, diff --git a/src/vs/platform/accessibility/common/abstractAccessibilityService.ts b/src/vs/platform/accessibility/common/abstractAccessibilityService.ts index 00710ed605c..814e9fd0bf0 100644 --- a/src/vs/platform/accessibility/common/abstractAccessibilityService.ts +++ b/src/vs/platform/accessibility/common/abstractAccessibilityService.ts @@ -10,7 +10,7 @@ import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/c import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; export abstract class AbstractAccessibilityService extends Disposable implements IAccessibilityService { - _serviceBrand: any; + _serviceBrand: undefined; private _accessibilityModeEnabledContext: IContextKey; protected readonly _onDidChangeAccessibilitySupport = new Emitter(); diff --git a/src/vs/platform/accessibility/common/accessibility.ts b/src/vs/platform/accessibility/common/accessibility.ts index 4e695b039f9..825ff4e20ec 100644 --- a/src/vs/platform/accessibility/common/accessibility.ts +++ b/src/vs/platform/accessibility/common/accessibility.ts @@ -10,7 +10,7 @@ import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; export const IAccessibilityService = createDecorator('accessibilityService'); export interface IAccessibilityService { - _serviceBrand: any; + _serviceBrand: undefined; readonly onDidChangeAccessibilitySupport: Event; diff --git a/src/vs/platform/accessibility/common/accessibilityService.ts b/src/vs/platform/accessibility/common/accessibilityService.ts index b06cb7eb421..2f1d30ec3de 100644 --- a/src/vs/platform/accessibility/common/accessibilityService.ts +++ b/src/vs/platform/accessibility/common/accessibilityService.ts @@ -10,7 +10,7 @@ import { AbstractAccessibilityService } from 'vs/platform/accessibility/common/a export class BrowserAccessibilityService extends AbstractAccessibilityService implements IAccessibilityService { - _serviceBrand: any; + _serviceBrand: undefined; private _accessibilitySupport = AccessibilitySupport.Unknown; diff --git a/src/vs/platform/actions/common/actions.ts b/src/vs/platform/actions/common/actions.ts index 046c46b157f..7a409b98a5e 100644 --- a/src/vs/platform/actions/common/actions.ts +++ b/src/vs/platform/actions/common/actions.ts @@ -116,7 +116,7 @@ export const IMenuService = createDecorator('menuService'); export interface IMenuService { - _serviceBrand: any; + _serviceBrand: undefined; createMenu(id: MenuId, scopedKeybindingService: IContextKeyService): IMenu; } diff --git a/src/vs/platform/actions/common/menuService.ts b/src/vs/platform/actions/common/menuService.ts index 352a1ed945f..651e6fe27f4 100644 --- a/src/vs/platform/actions/common/menuService.ts +++ b/src/vs/platform/actions/common/menuService.ts @@ -11,7 +11,7 @@ import { ContextKeyExpr, IContextKeyService, IContextKeyChangeEvent } from 'vs/p export class MenuService implements IMenuService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @ICommandService private readonly _commandService: ICommandService diff --git a/src/vs/platform/backup/common/backup.ts b/src/vs/platform/backup/common/backup.ts index 9a6cc9bdf0e..eafe3e2ed5f 100644 --- a/src/vs/platform/backup/common/backup.ts +++ b/src/vs/platform/backup/common/backup.ts @@ -33,7 +33,7 @@ export interface IWorkspaceBackupInfo { } export interface IBackupMainService { - _serviceBrand: any; + _serviceBrand: undefined; isHotExitEnabled(): boolean; diff --git a/src/vs/platform/backup/electron-main/backupMainService.ts b/src/vs/platform/backup/electron-main/backupMainService.ts index 9e2875d928a..62ab35bfa76 100644 --- a/src/vs/platform/backup/electron-main/backupMainService.ts +++ b/src/vs/platform/backup/electron-main/backupMainService.ts @@ -22,7 +22,7 @@ import { Schemas } from 'vs/base/common/network'; export class BackupMainService implements IBackupMainService { - _serviceBrand: any; + _serviceBrand: undefined; protected backupHome: string; protected workspacesJsonPath: string; diff --git a/src/vs/platform/clipboard/browser/clipboardService.ts b/src/vs/platform/clipboard/browser/clipboardService.ts index c5e8a2676d2..d1a6d6c0d91 100644 --- a/src/vs/platform/clipboard/browser/clipboardService.ts +++ b/src/vs/platform/clipboard/browser/clipboardService.ts @@ -6,11 +6,10 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { URI } from 'vs/base/common/uri'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class BrowserClipboardService implements IClipboardService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private _internalResourcesClipboard: URI[] | undefined; diff --git a/src/vs/platform/clipboard/common/clipboardService.ts b/src/vs/platform/clipboard/common/clipboardService.ts index 84018111136..11bf563393a 100644 --- a/src/vs/platform/clipboard/common/clipboardService.ts +++ b/src/vs/platform/clipboard/common/clipboardService.ts @@ -10,7 +10,7 @@ export const IClipboardService = createDecorator('clipboardSe export interface IClipboardService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Writes text to the system clipboard. diff --git a/src/vs/platform/clipboard/electron-browser/clipboardService.ts b/src/vs/platform/clipboard/electron-browser/clipboardService.ts index 4150430af7b..3b269b200fc 100644 --- a/src/vs/platform/clipboard/electron-browser/clipboardService.ts +++ b/src/vs/platform/clipboard/electron-browser/clipboardService.ts @@ -12,7 +12,7 @@ export class ClipboardService implements IClipboardService { private static FILE_FORMAT = 'code/file-list'; // Clipboard format for files - _serviceBrand: any; + _serviceBrand: undefined; async writeText(text: string, type?: 'selection' | 'clipboard'): Promise { clipboard.writeText(text, type); diff --git a/src/vs/platform/commands/common/commands.ts b/src/vs/platform/commands/common/commands.ts index 06c33cf281e..e2e05318487 100644 --- a/src/vs/platform/commands/common/commands.ts +++ b/src/vs/platform/commands/common/commands.ts @@ -19,7 +19,7 @@ export interface ICommandEvent { } export interface ICommandService { - _serviceBrand: any; + _serviceBrand: undefined; onWillExecuteCommand: Event; onDidExecuteCommand: Event; executeCommand(commandId: string, ...args: any[]): Promise; diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index 7249d295d87..78839c2d608 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -63,7 +63,7 @@ export interface IConfigurationChangeEvent { } export interface IConfigurationService { - _serviceBrand: any; + _serviceBrand: undefined; onDidChangeConfiguration: Event; diff --git a/src/vs/platform/configuration/node/configurationService.ts b/src/vs/platform/configuration/node/configurationService.ts index d3e4dfe09b1..9dcd0267e77 100644 --- a/src/vs/platform/configuration/node/configurationService.ts +++ b/src/vs/platform/configuration/node/configurationService.ts @@ -17,7 +17,7 @@ import { Schemas } from 'vs/base/common/network'; export class ConfigurationService extends Disposable implements IConfigurationService, IDisposable { - _serviceBrand: any; + _serviceBrand: undefined; private configuration: Configuration; private userConfigModelWatcher: ConfigWatcher | undefined; diff --git a/src/vs/platform/configuration/test/common/testConfigurationService.ts b/src/vs/platform/configuration/test/common/testConfigurationService.ts index 9bb4c8e2208..df01e1a8a4b 100644 --- a/src/vs/platform/configuration/test/common/testConfigurationService.ts +++ b/src/vs/platform/configuration/test/common/testConfigurationService.ts @@ -8,7 +8,7 @@ import { URI } from 'vs/base/common/uri'; import { getConfigurationKeys, IConfigurationOverrides, IConfigurationService, getConfigurationValue, isConfigurationOverrides } from 'vs/platform/configuration/common/configuration'; export class TestConfigurationService implements IConfigurationService { - public _serviceBrand: any; + public _serviceBrand: undefined; private configuration = Object.create(null); diff --git a/src/vs/platform/contextkey/browser/contextKeyService.ts b/src/vs/platform/contextkey/browser/contextKeyService.ts index 7b23bc6e6f5..8efe90bd137 100644 --- a/src/vs/platform/contextkey/browser/contextKeyService.ts +++ b/src/vs/platform/contextkey/browser/contextKeyService.ts @@ -225,7 +225,7 @@ class CompositeContextKeyChangeEvent implements IContextKeyChangeEvent { } export abstract class AbstractContextKeyService implements IContextKeyService { - public _serviceBrand: any; + public _serviceBrand: undefined; protected _isDisposed: boolean; protected _onDidChangeContext = new PauseableEmitter({ merge: input => new CompositeContextKeyChangeEvent(input) }); diff --git a/src/vs/platform/contextkey/common/contextkey.ts b/src/vs/platform/contextkey/common/contextkey.ts index 64025a4249f..16e79df476f 100644 --- a/src/vs/platform/contextkey/common/contextkey.ts +++ b/src/vs/platform/contextkey/common/contextkey.ts @@ -827,7 +827,7 @@ export interface IContextKeyChangeEvent { } export interface IContextKeyService { - _serviceBrand: any; + _serviceBrand: undefined; dispose(): void; onDidChangeContext: Event; diff --git a/src/vs/platform/contextview/browser/contextMenuService.ts b/src/vs/platform/contextview/browser/contextMenuService.ts index bb76d44886a..539b819e643 100644 --- a/src/vs/platform/contextview/browser/contextMenuService.ts +++ b/src/vs/platform/contextview/browser/contextMenuService.ts @@ -14,7 +14,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { Disposable } from 'vs/base/common/lifecycle'; export class ContextMenuService extends Disposable implements IContextMenuService { - _serviceBrand: any; + _serviceBrand: undefined; private _onDidContextMenu = this._register(new Emitter()); readonly onDidContextMenu: Event = this._onDidContextMenu.event; diff --git a/src/vs/platform/contextview/browser/contextView.ts b/src/vs/platform/contextview/browser/contextView.ts index df51bcf7d29..f5d1e81a569 100644 --- a/src/vs/platform/contextview/browser/contextView.ts +++ b/src/vs/platform/contextview/browser/contextView.ts @@ -13,7 +13,7 @@ export const IContextViewService = createDecorator('context export interface IContextViewService { - _serviceBrand: any; + _serviceBrand: undefined; showContextView(delegate: IContextViewDelegate): void; hideContextView(data?: any): void; @@ -37,7 +37,7 @@ export const IContextMenuService = createDecorator('context export interface IContextMenuService { - _serviceBrand: any; + _serviceBrand: undefined; showContextMenu(delegate: IContextMenuDelegate): void; onDidContextMenu: Event; // TODO@isidor these event should be removed once we get async context menus diff --git a/src/vs/platform/contextview/browser/contextViewService.ts b/src/vs/platform/contextview/browser/contextViewService.ts index c0acf0ea176..1cbd4908c2d 100644 --- a/src/vs/platform/contextview/browser/contextViewService.ts +++ b/src/vs/platform/contextview/browser/contextViewService.ts @@ -9,7 +9,7 @@ import { Disposable } from 'vs/base/common/lifecycle'; import { ILayoutService } from 'vs/platform/layout/browser/layoutService'; export class ContextViewService extends Disposable implements IContextViewService { - _serviceBrand: any; + _serviceBrand: undefined; private contextView: ContextView; diff --git a/src/vs/platform/debug/common/extensionHostDebug.ts b/src/vs/platform/debug/common/extensionHostDebug.ts index 08d14adc775..3386e62b25d 100644 --- a/src/vs/platform/debug/common/extensionHostDebug.ts +++ b/src/vs/platform/debug/common/extensionHostDebug.ts @@ -34,7 +34,7 @@ export interface ICloseSessionEvent { } export interface IExtensionHostDebugService { - _serviceBrand: any; + _serviceBrand: undefined; reload(sessionId: string): void; onReload: Event; diff --git a/src/vs/platform/debug/common/extensionHostDebugIpc.ts b/src/vs/platform/debug/common/extensionHostDebugIpc.ts index 1304d5cd669..3511be94950 100644 --- a/src/vs/platform/debug/common/extensionHostDebugIpc.ts +++ b/src/vs/platform/debug/common/extensionHostDebugIpc.ts @@ -54,7 +54,7 @@ export class ExtensionHostDebugBroadcastChannel implements IServerChan export class ExtensionHostDebugChannelClient extends Disposable implements IExtensionHostDebugService { - _serviceBrand: any; + _serviceBrand: undefined; constructor(private channel: IChannel) { super(); diff --git a/src/vs/platform/diagnostics/node/diagnosticsIpc.ts b/src/vs/platform/diagnostics/node/diagnosticsIpc.ts index 76af1758163..d159c07d8ca 100644 --- a/src/vs/platform/diagnostics/node/diagnosticsIpc.ts +++ b/src/vs/platform/diagnostics/node/diagnosticsIpc.ts @@ -7,7 +7,6 @@ import { IServerChannel, IChannel } from 'vs/base/parts/ipc/common/ipc'; import { IRemoteDiagnosticInfo, IRemoteDiagnosticError, SystemInfo, PerformanceInfo } from 'vs/platform/diagnostics/common/diagnostics'; import { IDiagnosticsService } from './diagnosticsService'; import { Event } from 'vs/base/common/event'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { IMainProcessInfo } from 'vs/platform/launch/common/launchService'; import { IWorkspace } from 'vs/platform/workspace/common/workspace'; @@ -37,7 +36,7 @@ export class DiagnosticsChannel implements IServerChannel { export class DiagnosticsService implements IDiagnosticsService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; constructor(private channel: IChannel) { } diff --git a/src/vs/platform/diagnostics/node/diagnosticsService.ts b/src/vs/platform/diagnostics/node/diagnosticsService.ts index 1f5326fd136..6d2c3e26d3c 100644 --- a/src/vs/platform/diagnostics/node/diagnosticsService.ts +++ b/src/vs/platform/diagnostics/node/diagnosticsService.ts @@ -23,7 +23,7 @@ export const ID = 'diagnosticsService'; export const IDiagnosticsService = createDecorator(ID); export interface IDiagnosticsService { - _serviceBrand: any; + _serviceBrand: undefined; getPerformanceInfo(mainProcessInfo: IMainProcessInfo, remoteInfo: (IRemoteDiagnosticInfo | IRemoteDiagnosticError)[]): Promise; getSystemInfo(mainProcessInfo: IMainProcessInfo, remoteInfo: (IRemoteDiagnosticInfo | IRemoteDiagnosticError)[]): Promise; @@ -248,7 +248,7 @@ export function collectLaunchConfigs(folder: string): Promise('fileDialo */ export interface IFileDialogService { - _serviceBrand: any; + _serviceBrand: undefined; /** * The default path for a new file based on previously used files. diff --git a/src/vs/platform/dialogs/node/dialogIpc.ts b/src/vs/platform/dialogs/node/dialogIpc.ts index d4a0563a171..30ee7ebd25c 100644 --- a/src/vs/platform/dialogs/node/dialogIpc.ts +++ b/src/vs/platform/dialogs/node/dialogIpc.ts @@ -27,7 +27,7 @@ export class DialogChannel implements IServerChannel { export class DialogChannelClient implements IDialogService { - _serviceBrand: any; + _serviceBrand: undefined; constructor(private channel: IChannel) { } diff --git a/src/vs/platform/download/common/download.ts b/src/vs/platform/download/common/download.ts index a012358875d..95f1d0ad66e 100644 --- a/src/vs/platform/download/common/download.ts +++ b/src/vs/platform/download/common/download.ts @@ -11,7 +11,7 @@ export const IDownloadService = createDecorator('downloadServi export interface IDownloadService { - _serviceBrand: any; + _serviceBrand: undefined; download(uri: URI, to: URI, cancellationToken?: CancellationToken): Promise; diff --git a/src/vs/platform/download/common/downloadIpc.ts b/src/vs/platform/download/common/downloadIpc.ts index d2d00dd8ccc..0876dfbc3d7 100644 --- a/src/vs/platform/download/common/downloadIpc.ts +++ b/src/vs/platform/download/common/downloadIpc.ts @@ -27,7 +27,7 @@ export class DownloadServiceChannel implements IServerChannel { export class DownloadServiceChannelClient implements IDownloadService { - _serviceBrand: any; + _serviceBrand: undefined; constructor(private channel: IChannel, private getUriTransformer: () => IURITransformer | null) { } diff --git a/src/vs/platform/download/common/downloadService.ts b/src/vs/platform/download/common/downloadService.ts index 54d2f1a9835..08593aa5d27 100644 --- a/src/vs/platform/download/common/downloadService.ts +++ b/src/vs/platform/download/common/downloadService.ts @@ -12,7 +12,7 @@ import { Schemas } from 'vs/base/common/network'; export class DownloadService implements IDownloadService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @IRequestService private readonly requestService: IRequestService, diff --git a/src/vs/platform/driver/common/driver.ts b/src/vs/platform/driver/common/driver.ts index 29fde875994..c93106ce99f 100644 --- a/src/vs/platform/driver/common/driver.ts +++ b/src/vs/platform/driver/common/driver.ts @@ -19,7 +19,7 @@ export interface IElement { } export interface IDriver { - _serviceBrand: any; + _serviceBrand: undefined; getWindowIds(): Promise; capturePage(windowId: number): Promise; diff --git a/src/vs/platform/driver/electron-main/driver.ts b/src/vs/platform/driver/electron-main/driver.ts index 8096b8f6abd..49404125de3 100644 --- a/src/vs/platform/driver/electron-main/driver.ts +++ b/src/vs/platform/driver/electron-main/driver.ts @@ -25,7 +25,7 @@ function isSilentKeyCode(keyCode: KeyCode) { export class Driver implements IDriver, IWindowDriverRegistry { - _serviceBrand: any; + _serviceBrand: undefined; private registeredWindowIds = new Set(); private reloadingWindowIds = new Set(); diff --git a/src/vs/platform/driver/node/driver.ts b/src/vs/platform/driver/node/driver.ts index 2c525c0e694..f0713a37181 100644 --- a/src/vs/platform/driver/node/driver.ts +++ b/src/vs/platform/driver/node/driver.ts @@ -42,7 +42,7 @@ export class DriverChannel implements IServerChannel { export class DriverChannelClient implements IDriver { - _serviceBrand: any; + _serviceBrand: undefined; constructor(private channel: IChannel) { } @@ -136,7 +136,7 @@ export class WindowDriverRegistryChannel implements IServerChannel { export class WindowDriverRegistryChannelClient implements IWindowDriverRegistry { - _serviceBrand: any; + _serviceBrand: undefined; constructor(private channel: IChannel) { } @@ -177,7 +177,7 @@ export class WindowDriverChannel implements IServerChannel { export class WindowDriverChannelClient implements IWindowDriver { - _serviceBrand: any; + _serviceBrand: undefined; constructor(private channel: IChannel) { } diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts index 3b45568e1b8..cfb931c013e 100644 --- a/src/vs/platform/environment/common/environment.ts +++ b/src/vs/platform/environment/common/environment.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { URI } from 'vs/base/common/uri'; export interface ParsedArgs { @@ -99,7 +99,7 @@ export const BACKUPS = 'Backups'; export interface IEnvironmentService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; args: ParsedArgs; diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts index a07c4c8f483..3eb487a5c44 100644 --- a/src/vs/platform/environment/node/environmentService.ts +++ b/src/vs/platform/environment/node/environmentService.ts @@ -16,7 +16,6 @@ import { toLocalISOString } from 'vs/base/common/date'; import { isWindows, isLinux } from 'vs/base/common/platform'; import { getPathFromAmdModule } from 'vs/base/common/amd'; import { URI } from 'vs/base/common/uri'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; // Read this before there's any chance it is overwritten // Related to https://github.com/Microsoft/vscode/issues/30624 @@ -77,7 +76,7 @@ function getCLIPath(execPath: string, appRoot: string, isBuilt: boolean): string export class EnvironmentService implements IEnvironmentService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; get args(): ParsedArgs { return this._args; } diff --git a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts index e33d7a5c55d..7a3af7f1f57 100644 --- a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts @@ -327,7 +327,7 @@ interface IRawExtensionsReport { export class ExtensionGalleryService implements IExtensionGalleryService { - _serviceBrand: any; + _serviceBrand: undefined; private extensionsGalleryUrl: string | undefined; private extensionsControlUrl: string | undefined; diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts index dd19996782d..277b8e3b208 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagement.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts @@ -146,7 +146,7 @@ export interface ITranslation { } export interface IExtensionGalleryService { - _serviceBrand: any; + _serviceBrand: undefined; isEnabled(): boolean; query(token: CancellationToken): Promise>; query(options: IQueryOptions, token: CancellationToken): Promise>; @@ -186,7 +186,7 @@ export const INSTALL_ERROR_MALICIOUS = 'malicious'; export const INSTALL_ERROR_INCOMPATIBLE = 'incompatible'; export interface IExtensionManagementService { - _serviceBrand: any; + _serviceBrand: undefined; onInstallExtension: Event; onDidInstallExtension: Event; diff --git a/src/vs/platform/extensionManagement/common/extensionManagementIpc.ts b/src/vs/platform/extensionManagement/common/extensionManagementIpc.ts index 349223b9210..035559f7ec6 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagementIpc.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagementIpc.ts @@ -77,7 +77,7 @@ export class ExtensionManagementChannel implements IServerChannel { export class ExtensionManagementChannelClient implements IExtensionManagementService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( private readonly channel: IChannel, diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index 7d0b568fc7f..bab2df5a3f8 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -101,7 +101,7 @@ interface InstallableExtension { export class ExtensionManagementService extends Disposable implements IExtensionManagementService { - _serviceBrand: any; + _serviceBrand: undefined; private systemExtensionsPath: string; private extensionsPath: string; diff --git a/src/vs/platform/files/common/fileService.ts b/src/vs/platform/files/common/fileService.ts index 34a6974e03c..8efc34437f0 100644 --- a/src/vs/platform/files/common/fileService.ts +++ b/src/vs/platform/files/common/fileService.ts @@ -7,7 +7,6 @@ import { Disposable, IDisposable, toDisposable, dispose, DisposableStore } from import { IFileService, IResolveFileOptions, FileChangesEvent, FileOperationEvent, IFileSystemProviderRegistrationEvent, IFileSystemProvider, IFileStat, IResolveFileResult, ICreateFileOptions, IFileSystemProviderActivationEvent, FileOperationError, FileOperationResult, FileOperation, FileSystemProviderCapabilities, FileType, toFileSystemProviderErrorCode, FileSystemProviderErrorCode, IStat, IFileStatWithMetadata, IResolveMetadataFileOptions, etag, hasReadWriteCapability, hasFileFolderCopyCapability, hasOpenReadWriteCloseCapability, toFileOperationResult, IFileSystemProviderWithOpenReadWriteCloseCapability, IFileSystemProviderWithFileReadWriteCapability, IResolveFileResultWithMetadata, IWatchOptions, IWriteFileOptions, IReadFileOptions, IFileStreamContent, IFileContent, ETAG_DISABLED } from 'vs/platform/files/common/files'; import { URI } from 'vs/base/common/uri'; import { Event, Emitter } from 'vs/base/common/event'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { isAbsolutePath, dirname, basename, joinPath, isEqual, isEqualOrParent } from 'vs/base/common/resources'; import { localize } from 'vs/nls'; import { TernarySearchTree } from 'vs/base/common/map'; @@ -21,7 +20,7 @@ import { Schemas } from 'vs/base/common/network'; export class FileService extends Disposable implements IFileService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private readonly BUFFER_SIZE = 64 * 1024; diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 40d21fce9de..ad80919e113 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -6,7 +6,7 @@ import { sep } from 'vs/base/common/path'; import { URI } from 'vs/base/common/uri'; import * as glob from 'vs/base/common/glob'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { Event } from 'vs/base/common/event'; import { startsWithIgnoreCase } from 'vs/base/common/strings'; import { IDisposable } from 'vs/base/common/lifecycle'; @@ -18,7 +18,7 @@ export const IFileService = createDecorator('fileService'); export interface IFileService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * An event that is fired when a file system provider is added or removed diff --git a/src/vs/platform/history/common/history.ts b/src/vs/platform/history/common/history.ts index d2ea48abad1..2813f2fa9cb 100644 --- a/src/vs/platform/history/common/history.ts +++ b/src/vs/platform/history/common/history.ts @@ -47,7 +47,7 @@ export function isRecentFile(curr: IRecent): curr is IRecentFile { export interface IHistoryMainService { - _serviceBrand: any; + _serviceBrand: undefined; onRecentlyOpenedChange: CommonEvent; diff --git a/src/vs/platform/history/electron-main/historyMainService.ts b/src/vs/platform/history/electron-main/historyMainService.ts index 01e9cd3f4d8..1febed0c265 100644 --- a/src/vs/platform/history/electron-main/historyMainService.ts +++ b/src/vs/platform/history/electron-main/historyMainService.ts @@ -22,7 +22,6 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { getSimpleWorkspaceLabel } from 'vs/platform/label/common/label'; import { toStoreData, restoreRecentlyOpened, RecentlyOpenedStorageData } from 'vs/platform/history/common/historyStorage'; import { exists } from 'vs/base/node/pfs'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { ILifecycleService, LifecycleMainPhase } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; export class HistoryMainService implements IHistoryMainService { @@ -40,7 +39,7 @@ export class HistoryMainService implements IHistoryMainService { private static readonly recentlyOpenedStorageKey = 'openedPathsList'; - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private _onRecentlyOpenedChange = new Emitter(); readonly onRecentlyOpenedChange: CommonEvent = this._onRecentlyOpenedChange.event; diff --git a/src/vs/platform/instantiation/common/instantiation.ts b/src/vs/platform/instantiation/common/instantiation.ts index 06ff2870345..735c035934c 100644 --- a/src/vs/platform/instantiation/common/instantiation.ts +++ b/src/vs/platform/instantiation/common/instantiation.ts @@ -23,39 +23,39 @@ export namespace _util { // --- interfaces ------ export interface IConstructorSignature0 { - new(...services: { _serviceBrand: any; }[]): T; + new(...services: { _serviceBrand: undefined; }[]): T; } export interface IConstructorSignature1 { - new(first: A1, ...services: { _serviceBrand: any; }[]): T; + new(first: A1, ...services: { _serviceBrand: undefined; }[]): T; } export interface IConstructorSignature2 { - new(first: A1, second: A2, ...services: { _serviceBrand: any; }[]): T; + new(first: A1, second: A2, ...services: { _serviceBrand: undefined; }[]): T; } export interface IConstructorSignature3 { - new(first: A1, second: A2, third: A3, ...services: { _serviceBrand: any; }[]): T; + new(first: A1, second: A2, third: A3, ...services: { _serviceBrand: undefined; }[]): T; } export interface IConstructorSignature4 { - new(first: A1, second: A2, third: A3, fourth: A4, ...services: { _serviceBrand: any; }[]): T; + new(first: A1, second: A2, third: A3, fourth: A4, ...services: { _serviceBrand: undefined; }[]): T; } export interface IConstructorSignature5 { - new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, ...services: { _serviceBrand: any; }[]): T; + new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, ...services: { _serviceBrand: undefined; }[]): T; } export interface IConstructorSignature6 { - new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, ...services: { _serviceBrand: any; }[]): T; + new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, ...services: { _serviceBrand: undefined; }[]): T; } export interface IConstructorSignature7 { - new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, ...services: { _serviceBrand: any; }[]): T; + new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, ...services: { _serviceBrand: undefined; }[]): T; } export interface IConstructorSignature8 { - new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, eigth: A8, ...services: { _serviceBrand: any; }[]): T; + new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, eigth: A8, ...services: { _serviceBrand: undefined; }[]): T; } export interface ServicesAccessor { @@ -67,7 +67,7 @@ export const IInstantiationService = createDecorator('ins export interface IInstantiationService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Synchronously creates an instance that is denoted by diff --git a/src/vs/platform/instantiation/common/instantiationService.ts b/src/vs/platform/instantiation/common/instantiationService.ts index 06c2c8ba0f4..c817c55f700 100644 --- a/src/vs/platform/instantiation/common/instantiationService.ts +++ b/src/vs/platform/instantiation/common/instantiationService.ts @@ -28,7 +28,7 @@ class CyclicDependencyError extends Error { export class InstantiationService implements IInstantiationService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _services: ServiceCollection; private readonly _strict: boolean; diff --git a/src/vs/platform/instantiation/test/common/instantiationService.test.ts b/src/vs/platform/instantiation/test/common/instantiationService.test.ts index b93c495abe4..2b30f7d3ee1 100644 --- a/src/vs/platform/instantiation/test/common/instantiationService.test.ts +++ b/src/vs/platform/instantiation/test/common/instantiationService.test.ts @@ -12,48 +12,48 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; let IService1 = createDecorator('service1'); interface IService1 { - _serviceBrand: any; + _serviceBrand: undefined; c: number; } class Service1 implements IService1 { - _serviceBrand: any; + _serviceBrand: undefined; c = 1; } let IService2 = createDecorator('service2'); interface IService2 { - _serviceBrand: any; + _serviceBrand: undefined; d: boolean; } class Service2 implements IService2 { - _serviceBrand: any; + _serviceBrand: undefined; d = true; } let IService3 = createDecorator('service3'); interface IService3 { - _serviceBrand: any; + _serviceBrand: undefined; s: string; } class Service3 implements IService3 { - _serviceBrand: any; + _serviceBrand: undefined; s = 'farboo'; } let IDependentService = createDecorator('dependentService'); interface IDependentService { - _serviceBrand: any; + _serviceBrand: undefined; name: string; } class DependentService implements IDependentService { - _serviceBrand: any; + _serviceBrand: undefined; constructor(@IService1 service: IService1) { assert.equal(service.c, 1); } @@ -116,7 +116,7 @@ class DependentServiceTarget2 { class ServiceLoop1 implements IService1 { - _serviceBrand: any; + _serviceBrand: undefined; c = 1; constructor(@IService2 s: IService2) { @@ -125,7 +125,7 @@ class ServiceLoop1 implements IService1 { } class ServiceLoop2 implements IService2 { - _serviceBrand: any; + _serviceBrand: undefined; d = true; constructor(@IService1 s: IService1) { @@ -364,7 +364,7 @@ suite('Instantiation Service', () => { let serviceInstanceCount = 0; const CtorCounter = class implements Service1 { - _serviceBrand: any; + _serviceBrand: undefined; c = 1; constructor() { serviceInstanceCount += 1; diff --git a/src/vs/platform/ipc/electron-browser/mainProcessService.ts b/src/vs/platform/ipc/electron-browser/mainProcessService.ts index e2f756cc803..c72b1c703d3 100644 --- a/src/vs/platform/ipc/electron-browser/mainProcessService.ts +++ b/src/vs/platform/ipc/electron-browser/mainProcessService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc'; import { Client } from 'vs/base/parts/ipc/electron-browser/ipc.electron-browser'; import { Disposable } from 'vs/base/common/lifecycle'; @@ -12,7 +12,7 @@ export const IMainProcessService = createDecorator('mainPro export interface IMainProcessService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; getChannel(channelName: string): IChannel; @@ -21,7 +21,7 @@ export interface IMainProcessService { export class MainProcessService extends Disposable implements IMainProcessService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private mainProcessConnection: Client; diff --git a/src/vs/platform/ipc/electron-browser/sharedProcessService.ts b/src/vs/platform/ipc/electron-browser/sharedProcessService.ts index f01e3f0b5de..dc78e224701 100644 --- a/src/vs/platform/ipc/electron-browser/sharedProcessService.ts +++ b/src/vs/platform/ipc/electron-browser/sharedProcessService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { Client } from 'vs/base/parts/ipc/common/ipc.net'; import { connect } from 'vs/base/parts/ipc/node/ipc.net'; import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; @@ -14,7 +14,7 @@ export const ISharedProcessService = createDecorator('sha export interface ISharedProcessService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; getChannel(channelName: string): IChannel; @@ -23,7 +23,7 @@ export interface ISharedProcessService { export class SharedProcessService implements ISharedProcessService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private withSharedProcessConnection: Promise>; diff --git a/src/vs/platform/issue/electron-browser/issueService.ts b/src/vs/platform/issue/electron-browser/issueService.ts index 6228ef33671..56068fab19e 100644 --- a/src/vs/platform/issue/electron-browser/issueService.ts +++ b/src/vs/platform/issue/electron-browser/issueService.ts @@ -6,11 +6,10 @@ import { IChannel } from 'vs/base/parts/ipc/common/ipc'; import { IIssueService, IssueReporterData, ProcessExplorerData } from 'vs/platform/issue/node/issue'; import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class IssueService implements IIssueService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private channel: IChannel; diff --git a/src/vs/platform/issue/electron-main/issueService.ts b/src/vs/platform/issue/electron-main/issueService.ts index aa31eb1913a..5bea35cbefc 100644 --- a/src/vs/platform/issue/electron-main/issueService.ts +++ b/src/vs/platform/issue/electron-main/issueService.ts @@ -21,7 +21,7 @@ import { listProcesses } from 'vs/base/node/ps'; const DEFAULT_BACKGROUND_COLOR = '#1E1E1E'; export class IssueService implements IIssueService { - _serviceBrand: any; + _serviceBrand: undefined; _issueWindow: BrowserWindow | null = null; _issueParentWindow: BrowserWindow | null = null; _processExplorerWindow: BrowserWindow | null = null; diff --git a/src/vs/platform/issue/node/issue.ts b/src/vs/platform/issue/node/issue.ts index d9d0e1c4492..99b9a3b8565 100644 --- a/src/vs/platform/issue/node/issue.ts +++ b/src/vs/platform/issue/node/issue.ts @@ -87,7 +87,7 @@ export interface ProcessExplorerData extends WindowData { } export interface IIssueService { - _serviceBrand: any; + _serviceBrand: undefined; openReporter(data: IssueReporterData): Promise; openProcessExplorer(data: ProcessExplorerData): Promise; getSystemStatus(): Promise; diff --git a/src/vs/platform/keybinding/common/abstractKeybindingService.ts b/src/vs/platform/keybinding/common/abstractKeybindingService.ts index 0a138fd3639..e3b2a7e7d3b 100644 --- a/src/vs/platform/keybinding/common/abstractKeybindingService.ts +++ b/src/vs/platform/keybinding/common/abstractKeybindingService.ts @@ -24,7 +24,7 @@ interface CurrentChord { } export abstract class AbstractKeybindingService extends Disposable implements IKeybindingService { - public _serviceBrand: any; + public _serviceBrand: undefined; protected readonly _onDidUpdateKeybindings: Emitter = this._register(new Emitter()); get onDidUpdateKeybindings(): Event { diff --git a/src/vs/platform/keybinding/common/keybinding.ts b/src/vs/platform/keybinding/common/keybinding.ts index 57b2f701fce..5ed822fc4dc 100644 --- a/src/vs/platform/keybinding/common/keybinding.ts +++ b/src/vs/platform/keybinding/common/keybinding.ts @@ -41,7 +41,7 @@ export interface IKeyboardEvent { export const IKeybindingService = createDecorator('keybindingService'); export interface IKeybindingService { - _serviceBrand: any; + _serviceBrand: undefined; onDidUpdateKeybindings: Event; diff --git a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts index ec4a46372a6..e139fb775c6 100644 --- a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts +++ b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts @@ -15,7 +15,6 @@ import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKe import { USLayoutResolvedKeybinding } from 'vs/platform/keybinding/common/usLayoutResolvedKeybinding'; import { INotification, INotificationService, IPromptChoice, IPromptOptions, NoOpNotification, IStatusMessageOptions } from 'vs/platform/notification/common/notification'; import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; function createContext(ctx: any) { return { @@ -132,7 +131,7 @@ suite('AbstractKeybindingService', () => { }; let notificationService: INotificationService = { - _serviceBrand: {} as ServiceIdentifier, + _serviceBrand: undefined, notify: (notification: INotification) => { showMessageCalls.push({ sev: notification.severity, message: notification.message }); return new NoOpNotification(); diff --git a/src/vs/platform/keybinding/test/common/mockKeybindingService.ts b/src/vs/platform/keybinding/test/common/mockKeybindingService.ts index 6a318210521..184106d30f7 100644 --- a/src/vs/platform/keybinding/test/common/mockKeybindingService.ts +++ b/src/vs/platform/keybinding/test/common/mockKeybindingService.ts @@ -36,7 +36,7 @@ class MockKeybindingContextKey implements IContextKey { export class MockContextKeyService implements IContextKeyService { - public _serviceBrand: any; + public _serviceBrand: undefined; private _keys = new Map>(); public dispose(): void { @@ -69,7 +69,7 @@ export class MockContextKeyService implements IContextKeyService { } export class MockKeybindingService implements IKeybindingService { - public _serviceBrand: any; + public _serviceBrand: undefined; public get onDidUpdateKeybindings(): Event { return Event.None; diff --git a/src/vs/platform/label/common/label.ts b/src/vs/platform/label/common/label.ts index 4565228e690..b2422cfa473 100644 --- a/src/vs/platform/label/common/label.ts +++ b/src/vs/platform/label/common/label.ts @@ -14,7 +14,7 @@ import { isEqualOrParent, basename } from 'vs/base/common/resources'; import { endsWith } from 'vs/base/common/strings'; export interface ILabelService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Gets the human readable label for a uri. * If relative is passed returns a label relative to the workspace root that the uri belongs to. diff --git a/src/vs/platform/launch/electron-main/launchService.ts b/src/vs/platform/launch/electron-main/launchService.ts index c9924cf39d5..19e396d6052 100644 --- a/src/vs/platform/launch/electron-main/launchService.ts +++ b/src/vs/platform/launch/electron-main/launchService.ts @@ -8,7 +8,7 @@ import { ILogService } from 'vs/platform/log/common/log'; import { IURLService } from 'vs/platform/url/common/url'; import { IProcessEnvironment, isMacintosh } from 'vs/base/common/platform'; import { ParsedArgs, IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { OpenContext, IWindowSettings } from 'vs/platform/windows/common/windows'; import { IWindowsMainService, ICodeWindow } from 'vs/platform/windows/electron-main/windows'; import { whenDeleted } from 'vs/base/node/pfs'; @@ -53,7 +53,7 @@ function parseOpenUrl(args: ParsedArgs): URI[] { } export interface ILaunchService { - _serviceBrand: any; + _serviceBrand: undefined; start(args: ParsedArgs, userEnv: IProcessEnvironment): Promise; getMainProcessId(): Promise; getMainProcessInfo(): Promise; @@ -94,7 +94,7 @@ export class LaunchChannel implements IServerChannel { export class LaunchChannelClient implements ILaunchService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; constructor(private channel: IChannel) { } @@ -121,7 +121,7 @@ export class LaunchChannelClient implements ILaunchService { export class LaunchService implements ILaunchService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; constructor( @ILogService private readonly logService: ILogService, diff --git a/src/vs/platform/layout/browser/layoutService.ts b/src/vs/platform/layout/browser/layoutService.ts index a54ef23a7bb..5b0e5b35b95 100644 --- a/src/vs/platform/layout/browser/layoutService.ts +++ b/src/vs/platform/layout/browser/layoutService.ts @@ -15,7 +15,7 @@ export interface IDimension { export interface ILayoutService { - _serviceBrand: any; + _serviceBrand: undefined; /** * The dimensions of the container. diff --git a/src/vs/platform/lifecycle/browser/lifecycleService.ts b/src/vs/platform/lifecycle/browser/lifecycleService.ts index bd34fc59e8f..22ed39ba7ab 100644 --- a/src/vs/platform/lifecycle/browser/lifecycleService.ts +++ b/src/vs/platform/lifecycle/browser/lifecycleService.ts @@ -3,15 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ShutdownReason, ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; +import { ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; import { ILogService } from 'vs/platform/log/common/log'; import { AbstractLifecycleService } from 'vs/platform/lifecycle/common/lifecycleService'; import { localize } from 'vs/nls'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class BrowserLifecycleService extends AbstractLifecycleService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; constructor( @ILogService readonly logService: ILogService diff --git a/src/vs/platform/lifecycle/common/lifecycle.ts b/src/vs/platform/lifecycle/common/lifecycle.ts index afd461859d0..cae9c857fb3 100644 --- a/src/vs/platform/lifecycle/common/lifecycle.ts +++ b/src/vs/platform/lifecycle/common/lifecycle.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Event } from 'vs/base/common/event'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { isThenable } from 'vs/base/common/async'; export const ILifecycleService = createDecorator('lifecycleService'); @@ -123,7 +123,7 @@ export function LifecyclePhaseToString(phase: LifecyclePhase) { */ export interface ILifecycleService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * Value indicates how this window got loaded. @@ -167,7 +167,7 @@ export interface ILifecycleService { export const NullLifecycleService: ILifecycleService = { - _serviceBrand: null as any, + _serviceBrand: undefined, onBeforeShutdown: Event.None, onWillShutdown: Event.None, diff --git a/src/vs/platform/lifecycle/common/lifecycleService.ts b/src/vs/platform/lifecycle/common/lifecycleService.ts index 326a1b371b9..ea8b52b2492 100644 --- a/src/vs/platform/lifecycle/common/lifecycleService.ts +++ b/src/vs/platform/lifecycle/common/lifecycleService.ts @@ -9,11 +9,10 @@ import { Disposable } from 'vs/base/common/lifecycle'; import { ILifecycleService, BeforeShutdownEvent, WillShutdownEvent, StartupKind, LifecyclePhase, LifecyclePhaseToString } from 'vs/platform/lifecycle/common/lifecycle'; import { ILogService } from 'vs/platform/log/common/log'; import { mark } from 'vs/base/common/performance'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export abstract class AbstractLifecycleService extends Disposable implements ILifecycleService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; protected readonly _onBeforeShutdown = this._register(new Emitter()); readonly onBeforeShutdown: Event = this._onBeforeShutdown.event; diff --git a/src/vs/platform/lifecycle/electron-browser/lifecycleService.ts b/src/vs/platform/lifecycle/electron-browser/lifecycleService.ts index 7e4fd29a3a6..0146a3b60ac 100644 --- a/src/vs/platform/lifecycle/electron-browser/lifecycleService.ts +++ b/src/vs/platform/lifecycle/electron-browser/lifecycleService.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { toErrorMessage } from 'vs/base/common/errorMessage'; -import { ShutdownReason, StartupKind, handleVetos, ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; +import { ShutdownReason, StartupKind, handleVetos } from 'vs/platform/lifecycle/common/lifecycle'; import { IStorageService, StorageScope, WillSaveStateReason } from 'vs/platform/storage/common/storage'; import { ipcRenderer as ipc } from 'electron'; import { IWindowService } from 'vs/platform/windows/common/windows'; @@ -12,13 +12,12 @@ import { ILogService } from 'vs/platform/log/common/log'; import { INotificationService } from 'vs/platform/notification/common/notification'; import { onUnexpectedError } from 'vs/base/common/errors'; import { AbstractLifecycleService } from 'vs/platform/lifecycle/common/lifecycleService'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class LifecycleService extends AbstractLifecycleService { private static readonly LAST_SHUTDOWN_REASON_KEY = 'lifecyle.lastShutdownReason'; - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private shutdownReason: ShutdownReason; diff --git a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts index c44298bc61e..bdecf24ff13 100644 --- a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts +++ b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts @@ -7,7 +7,7 @@ import { ipcMain as ipc, app } from 'electron'; import { ILogService } from 'vs/platform/log/common/log'; import { IStateService } from 'vs/platform/state/common/state'; import { Event, Emitter } from 'vs/base/common/event'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { ICodeWindow } from 'vs/platform/windows/electron-main/windows'; import { handleVetos } from 'vs/platform/lifecycle/common/lifecycle'; import { isMacintosh, isWindows } from 'vs/base/common/platform'; @@ -40,7 +40,7 @@ export interface ShutdownEvent { export interface ILifecycleService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * Will be true if the program was restarted (e.g. due to explicit request or update). @@ -131,7 +131,7 @@ export const enum LifecycleMainPhase { export class LifecycleService extends Disposable implements ILifecycleService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private static readonly QUIT_FROM_RESTART_MARKER = 'quit.from.restart'; // use a marker to find out if the session was restarted diff --git a/src/vs/platform/list/browser/listService.ts b/src/vs/platform/list/browser/listService.ts index 6c5ac488c5f..4461f28564d 100644 --- a/src/vs/platform/list/browser/listService.ts +++ b/src/vs/platform/list/browser/listService.ts @@ -38,7 +38,7 @@ export const IListService = createDecorator('listService'); export interface IListService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Returns the currently focused list widget if any. @@ -53,7 +53,7 @@ interface IRegisteredList { export class ListService implements IListService { - _serviceBrand: any; + _serviceBrand: undefined; private lists: IRegisteredList[] = []; private _lastFocusedWidget: ListWidget | undefined = undefined; diff --git a/src/vs/platform/localizations/common/localizations.ts b/src/vs/platform/localizations/common/localizations.ts index 2f70e80f400..4323324d681 100644 --- a/src/vs/platform/localizations/common/localizations.ts +++ b/src/vs/platform/localizations/common/localizations.ts @@ -26,7 +26,7 @@ export const enum LanguageType { export const ILocalizationsService = createDecorator('localizationsService'); export interface ILocalizationsService { - _serviceBrand: any; + _serviceBrand: undefined; readonly onDidLanguagesChange: Event; getLanguageIds(type?: LanguageType): Promise; diff --git a/src/vs/platform/localizations/electron-browser/localizationsService.ts b/src/vs/platform/localizations/electron-browser/localizationsService.ts index add4dfb2fcf..57e62509c57 100644 --- a/src/vs/platform/localizations/electron-browser/localizationsService.ts +++ b/src/vs/platform/localizations/electron-browser/localizationsService.ts @@ -7,11 +7,10 @@ import { IChannel } from 'vs/base/parts/ipc/common/ipc'; import { Event } from 'vs/base/common/event'; import { ILocalizationsService, LanguageType } from 'vs/platform/localizations/common/localizations'; import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class LocalizationsService implements ILocalizationsService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private channel: IChannel; diff --git a/src/vs/platform/localizations/node/localizations.ts b/src/vs/platform/localizations/node/localizations.ts index 2311778a2fa..7f174270880 100644 --- a/src/vs/platform/localizations/node/localizations.ts +++ b/src/vs/platform/localizations/node/localizations.ts @@ -34,7 +34,7 @@ if (product.quality !== 'stable') { export class LocalizationsService extends Disposable implements ILocalizationsService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly cache: LanguagePacksCache; diff --git a/src/vs/platform/log/common/bufferLog.ts b/src/vs/platform/log/common/bufferLog.ts index 67e90d28c2b..e0a963afdd4 100644 --- a/src/vs/platform/log/common/bufferLog.ts +++ b/src/vs/platform/log/common/bufferLog.ts @@ -24,7 +24,7 @@ function getLogFunction(logger: ILogService, level: LogLevel): Function { export class BufferLogService extends AbstractLogService implements ILogService { - _serviceBrand: any; + _serviceBrand: undefined; private buffer: ILog[] = []; private _logger: ILogService | undefined = undefined; diff --git a/src/vs/platform/log/common/fileLogService.ts b/src/vs/platform/log/common/fileLogService.ts index 01859d4f7b2..64122444537 100644 --- a/src/vs/platform/log/common/fileLogService.ts +++ b/src/vs/platform/log/common/fileLogService.ts @@ -11,7 +11,7 @@ import { VSBuffer } from 'vs/base/common/buffer'; export class FileLogService extends AbstractLogService implements ILogService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly queue: Queue; diff --git a/src/vs/platform/log/common/log.ts b/src/vs/platform/log/common/log.ts index 8b9fea5e257..5e6b7300c49 100644 --- a/src/vs/platform/log/common/log.ts +++ b/src/vs/platform/log/common/log.ts @@ -28,7 +28,7 @@ export enum LogLevel { export const DEFAULT_LOG_LEVEL: LogLevel = LogLevel.Info; export interface ILogService extends IDisposable { - _serviceBrand: any; + _serviceBrand: undefined; onDidChangeLogLevel: Event; getLevel(): LogLevel; @@ -61,7 +61,7 @@ export abstract class AbstractLogService extends Disposable { export class ConsoleLogMainService extends AbstractLogService implements ILogService { - _serviceBrand: any; + _serviceBrand: undefined; private useColors: boolean; constructor(logLevel: LogLevel = DEFAULT_LOG_LEVEL) { @@ -137,7 +137,7 @@ export class ConsoleLogMainService extends AbstractLogService implements ILogSer export class ConsoleLogService extends AbstractLogService implements ILogService { - _serviceBrand: any; + _serviceBrand: undefined; constructor(logLevel: LogLevel = DEFAULT_LOG_LEVEL) { super(); @@ -184,7 +184,7 @@ export class ConsoleLogService extends AbstractLogService implements ILogService } export class MultiplexLogService extends AbstractLogService implements ILogService { - _serviceBrand: any; + _serviceBrand: undefined; constructor(private readonly logServices: ReadonlyArray) { super(); @@ -244,7 +244,7 @@ export class MultiplexLogService extends AbstractLogService implements ILogServi } export class DelegatedLogService extends Disposable implements ILogService { - _serviceBrand: any; + _serviceBrand: undefined; constructor(private logService: ILogService) { super(); @@ -289,7 +289,7 @@ export class DelegatedLogService extends Disposable implements ILogService { } export class NullLogService implements ILogService { - _serviceBrand: any; + _serviceBrand: undefined; readonly onDidChangeLogLevel: Event = new Emitter().event; setLevel(level: LogLevel): void { } getLevel(): LogLevel { return LogLevel.Info; } diff --git a/src/vs/platform/log/common/logIpc.ts b/src/vs/platform/log/common/logIpc.ts index 9f68b645b66..5f631b8b9d1 100644 --- a/src/vs/platform/log/common/logIpc.ts +++ b/src/vs/platform/log/common/logIpc.ts @@ -46,7 +46,7 @@ export class LogLevelSetterChannelClient { } export class FollowerLogService extends DelegatedLogService implements ILogService { - _serviceBrand: any; + _serviceBrand: undefined; constructor(private master: LogLevelSetterChannelClient, logService: ILogService) { super(logService); diff --git a/src/vs/platform/log/node/spdlogService.ts b/src/vs/platform/log/node/spdlogService.ts index 9ad9cc4dd86..cd482c70a83 100644 --- a/src/vs/platform/log/node/spdlogService.ts +++ b/src/vs/platform/log/node/spdlogService.ts @@ -44,7 +44,7 @@ function log(logger: spdlog.RotatingLogger, level: LogLevel, message: string): v export class SpdLogService extends AbstractLogService implements ILogService { - _serviceBrand: any; + _serviceBrand: undefined; private buffer: ILog[] = []; private _loggerCreationPromise: Promise | undefined = undefined; diff --git a/src/vs/platform/markers/common/markerService.ts b/src/vs/platform/markers/common/markerService.ts index 57e55246949..3959296f926 100644 --- a/src/vs/platform/markers/common/markerService.ts +++ b/src/vs/platform/markers/common/markerService.ts @@ -121,7 +121,7 @@ class MarkerStats implements MarkerStatistics { export class MarkerService implements IMarkerService { - _serviceBrand: any; + _serviceBrand: undefined; private _onMarkerChanged = new Emitter(); private _onMarkerChangedEvent: Event = Event.debounce(this._onMarkerChanged.event, MarkerService._debouncer, 0); diff --git a/src/vs/platform/markers/common/markers.ts b/src/vs/platform/markers/common/markers.ts index 26d05bc8c2e..e0bfe097ef9 100644 --- a/src/vs/platform/markers/common/markers.ts +++ b/src/vs/platform/markers/common/markers.ts @@ -10,7 +10,7 @@ import { localize } from 'vs/nls'; import Severity from 'vs/base/common/severity'; export interface IMarkerService { - _serviceBrand: any; + _serviceBrand: undefined; getStatistics(): MarkerStatistics; diff --git a/src/vs/platform/menubar/electron-browser/menubarService.ts b/src/vs/platform/menubar/electron-browser/menubarService.ts index 336330d1e6d..212649c4ca1 100644 --- a/src/vs/platform/menubar/electron-browser/menubarService.ts +++ b/src/vs/platform/menubar/electron-browser/menubarService.ts @@ -6,11 +6,10 @@ import { IChannel } from 'vs/base/parts/ipc/common/ipc'; import { IMenubarService, IMenubarData } from 'vs/platform/menubar/node/menubar'; import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class MenubarService implements IMenubarService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private channel: IChannel; diff --git a/src/vs/platform/menubar/electron-main/menubarService.ts b/src/vs/platform/menubar/electron-main/menubarService.ts index f7abf2ee9f2..8763b9d2330 100644 --- a/src/vs/platform/menubar/electron-main/menubarService.ts +++ b/src/vs/platform/menubar/electron-main/menubarService.ts @@ -9,7 +9,7 @@ import { ILogService } from 'vs/platform/log/common/log'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; export class MenubarService implements IMenubarService { - _serviceBrand: any; + _serviceBrand: undefined; private _menubar: Menubar; diff --git a/src/vs/platform/menubar/node/menubar.ts b/src/vs/platform/menubar/node/menubar.ts index 27294cbb3aa..db246d1b487 100644 --- a/src/vs/platform/menubar/node/menubar.ts +++ b/src/vs/platform/menubar/node/menubar.ts @@ -9,7 +9,7 @@ import { URI } from 'vs/base/common/uri'; export const IMenubarService = createDecorator('menubarService'); export interface IMenubarService { - _serviceBrand: any; + _serviceBrand: undefined; updateMenubar(windowId: number, menuData: IMenubarData): Promise; } diff --git a/src/vs/platform/notification/common/notification.ts b/src/vs/platform/notification/common/notification.ts index 23b14135edb..b16fe281725 100644 --- a/src/vs/platform/notification/common/notification.ts +++ b/src/vs/platform/notification/common/notification.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import BaseSeverity from 'vs/base/common/severity'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IAction } from 'vs/base/common/actions'; import { Event, Emitter } from 'vs/base/common/event'; import { IDisposable } from 'vs/base/common/lifecycle'; @@ -234,7 +234,7 @@ export interface IStatusMessageOptions { */ export interface INotificationService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * Show the provided notification to the user. The returned `INotificationHandle` diff --git a/src/vs/platform/notification/test/common/testNotificationService.ts b/src/vs/platform/notification/test/common/testNotificationService.ts index 933469987ed..b4c4d4000fd 100644 --- a/src/vs/platform/notification/test/common/testNotificationService.ts +++ b/src/vs/platform/notification/test/common/testNotificationService.ts @@ -8,7 +8,7 @@ import { Disposable, IDisposable } from 'vs/base/common/lifecycle'; export class TestNotificationService implements INotificationService { - _serviceBrand: any; + _serviceBrand: undefined; private static readonly NO_OP: INotificationHandle = new NoOpNotification(); diff --git a/src/vs/platform/opener/common/opener.ts b/src/vs/platform/opener/common/opener.ts index 8c92cb2d1bd..8563f3fa2af 100644 --- a/src/vs/platform/opener/common/opener.ts +++ b/src/vs/platform/opener/common/opener.ts @@ -20,7 +20,7 @@ export interface IValidator { export interface IOpenerService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Register a participant that can handle the open() call. diff --git a/src/vs/platform/progress/common/progress.ts b/src/vs/platform/progress/common/progress.ts index cbb0c6068e6..b629e2fe837 100644 --- a/src/vs/platform/progress/common/progress.ts +++ b/src/vs/platform/progress/common/progress.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { CancellationToken, CancellationTokenSource } from 'vs/base/common/cancellation'; import { toDisposable, DisposableStore, Disposable } from 'vs/base/common/lifecycle'; import { IAction } from 'vs/base/common/actions'; @@ -15,7 +15,7 @@ export const IProgressService = createDecorator('progressServi */ export interface IProgressService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; withProgress(options: IProgressOptions | IProgressNotificationOptions | IProgressCompositeOptions, task: (progress: IProgress) => Promise, onDidCancel?: () => void): Promise; } @@ -174,5 +174,5 @@ export const IEditorProgressService = createDecorator('e */ export interface IEditorProgressService extends IProgressIndicator { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; } diff --git a/src/vs/platform/quickOpen/common/quickOpen.ts b/src/vs/platform/quickOpen/common/quickOpen.ts index a5232810f36..056f1b6e00d 100644 --- a/src/vs/platform/quickOpen/common/quickOpen.ts +++ b/src/vs/platform/quickOpen/common/quickOpen.ts @@ -17,7 +17,7 @@ export const IQuickOpenService = createDecorator('quickOpenSe export interface IQuickOpenService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Asks the container to show the quick open control with the optional prefix set. If the optional parameter diff --git a/src/vs/platform/quickinput/common/quickInput.ts b/src/vs/platform/quickinput/common/quickInput.ts index c7ec82def00..80cad64b5dc 100644 --- a/src/vs/platform/quickinput/common/quickInput.ts +++ b/src/vs/platform/quickinput/common/quickInput.ts @@ -257,7 +257,7 @@ export type QuickPickInput = T | IQuickPickSeparator; export interface IQuickInputService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Opens the quick input box for selecting items and returns a promise with the user selected item(s) if any. diff --git a/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts b/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts index 3f8958b7235..17bded22f29 100644 --- a/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts +++ b/src/vs/platform/remote/browser/remoteAuthorityResolverService.ts @@ -8,7 +8,7 @@ import { RemoteAuthorities } from 'vs/base/common/network'; export class RemoteAuthorityResolverService implements IRemoteAuthorityResolverService { - _serviceBrand: any; + _serviceBrand: undefined; constructor() { } diff --git a/src/vs/platform/remote/common/remoteAuthorityResolver.ts b/src/vs/platform/remote/common/remoteAuthorityResolver.ts index e9ba56563b3..98a7f550d13 100644 --- a/src/vs/platform/remote/common/remoteAuthorityResolver.ts +++ b/src/vs/platform/remote/common/remoteAuthorityResolver.ts @@ -68,7 +68,7 @@ export class RemoteAuthorityResolverError extends Error { export interface IRemoteAuthorityResolverService { - _serviceBrand: any; + _serviceBrand: undefined; resolveAuthority(authority: string): Promise; diff --git a/src/vs/platform/remote/common/tunnel.ts b/src/vs/platform/remote/common/tunnel.ts index d92f3e45d91..9fdba618115 100644 --- a/src/vs/platform/remote/common/tunnel.ts +++ b/src/vs/platform/remote/common/tunnel.ts @@ -15,7 +15,7 @@ export interface RemoteTunnel { } export interface ITunnelService { - _serviceBrand: any; + _serviceBrand: undefined; openTunnel(remotePort: number): Promise | undefined; } diff --git a/src/vs/platform/remote/electron-browser/remoteAuthorityResolverService.ts b/src/vs/platform/remote/electron-browser/remoteAuthorityResolverService.ts index 45ad072f2eb..006ce16ca33 100644 --- a/src/vs/platform/remote/electron-browser/remoteAuthorityResolverService.ts +++ b/src/vs/platform/remote/electron-browser/remoteAuthorityResolverService.ts @@ -18,7 +18,7 @@ class PendingResolveAuthorityRequest { export class RemoteAuthorityResolverService implements IRemoteAuthorityResolverService { - _serviceBrand: any; + _serviceBrand: undefined; private _resolveAuthorityRequests: { [authority: string]: PendingResolveAuthorityRequest; }; diff --git a/src/vs/platform/remote/node/tunnelService.ts b/src/vs/platform/remote/node/tunnelService.ts index 2b1e8a1a04f..f9126aa719d 100644 --- a/src/vs/platform/remote/node/tunnelService.ts +++ b/src/vs/platform/remote/node/tunnelService.ts @@ -7,7 +7,7 @@ import { ITunnelService, RemoteTunnel } from 'vs/platform/remote/common/tunnel'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; export class TunnelService implements ITunnelService { - _serviceBrand: any; + _serviceBrand: undefined; public constructor( ) { diff --git a/src/vs/platform/request/browser/requestService.ts b/src/vs/platform/request/browser/requestService.ts index 0e6e79acfd4..75c01b89111 100644 --- a/src/vs/platform/request/browser/requestService.ts +++ b/src/vs/platform/request/browser/requestService.ts @@ -15,7 +15,7 @@ import { request } from 'vs/base/parts/request/browser/request'; */ export class RequestService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @IConfigurationService private readonly configurationService: IConfigurationService, diff --git a/src/vs/platform/request/common/request.ts b/src/vs/platform/request/common/request.ts index 7ec2f5f3742..2735ab1a20f 100644 --- a/src/vs/platform/request/common/request.ts +++ b/src/vs/platform/request/common/request.ts @@ -14,7 +14,7 @@ import { IRequestOptions, IRequestContext } from 'vs/base/parts/request/common/r export const IRequestService = createDecorator('requestService'); export interface IRequestService { - _serviceBrand: any; + _serviceBrand: undefined; request(options: IRequestOptions, token: CancellationToken): Promise; } diff --git a/src/vs/platform/request/common/requestIpc.ts b/src/vs/platform/request/common/requestIpc.ts index 22acbce9dee..e5e300da2ca 100644 --- a/src/vs/platform/request/common/requestIpc.ts +++ b/src/vs/platform/request/common/requestIpc.ts @@ -40,7 +40,7 @@ export class RequestChannel implements IServerChannel { export class RequestChannelClient { - _serviceBrand: any; + _serviceBrand: undefined; constructor(private readonly channel: IChannel) { } diff --git a/src/vs/platform/request/node/requestService.ts b/src/vs/platform/request/node/requestService.ts index 07a32d78f44..549f5033754 100644 --- a/src/vs/platform/request/node/requestService.ts +++ b/src/vs/platform/request/node/requestService.ts @@ -36,7 +36,7 @@ export interface NodeRequestOptions extends IRequestOptions { */ export class RequestService extends Disposable implements IRequestService { - _serviceBrand: any; + _serviceBrand: undefined; private proxyUrl?: string; private strictSSL: boolean | undefined; diff --git a/src/vs/platform/sign/browser/signService.ts b/src/vs/platform/sign/browser/signService.ts index 75951fab3dc..7de2c3d6a11 100644 --- a/src/vs/platform/sign/browser/signService.ts +++ b/src/vs/platform/sign/browser/signService.ts @@ -4,11 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { ISignService } from 'vs/platform/sign/common/sign'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class SignService implements ISignService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private readonly _tkn: string | null; diff --git a/src/vs/platform/sign/common/sign.ts b/src/vs/platform/sign/common/sign.ts index 026c8580d73..f3a766e760b 100644 --- a/src/vs/platform/sign/common/sign.ts +++ b/src/vs/platform/sign/common/sign.ts @@ -9,7 +9,7 @@ export const SIGN_SERVICE_ID = 'signService'; export const ISignService = createDecorator(SIGN_SERVICE_ID); export interface ISignService { - _serviceBrand: any; + _serviceBrand: undefined; sign(value: string): Promise; } diff --git a/src/vs/platform/sign/node/signService.ts b/src/vs/platform/sign/node/signService.ts index cf5a0703ea8..ba9b9641e06 100644 --- a/src/vs/platform/sign/node/signService.ts +++ b/src/vs/platform/sign/node/signService.ts @@ -6,7 +6,7 @@ import { ISignService } from 'vs/platform/sign/common/sign'; export class SignService implements ISignService { - _serviceBrand: any; + _serviceBrand: undefined; private vsda(): Promise { return import('vsda'); diff --git a/src/vs/platform/state/common/state.ts b/src/vs/platform/state/common/state.ts index 973f255fa73..356ffffdf58 100644 --- a/src/vs/platform/state/common/state.ts +++ b/src/vs/platform/state/common/state.ts @@ -8,7 +8,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' export const IStateService = createDecorator('stateService'); export interface IStateService { - _serviceBrand: any; + _serviceBrand: undefined; getItem(key: string, defaultValue: T): T; getItem(key: string, defaultValue?: T): T | undefined; diff --git a/src/vs/platform/state/node/stateService.ts b/src/vs/platform/state/node/stateService.ts index be587a9fb09..967cce50be3 100644 --- a/src/vs/platform/state/node/stateService.ts +++ b/src/vs/platform/state/node/stateService.ts @@ -125,7 +125,7 @@ export class FileStorage { export class StateService implements IStateService { - _serviceBrand: any; + _serviceBrand: undefined; private static STATE_FILE = 'storage.json'; diff --git a/src/vs/platform/statusbar/common/statusbar.ts b/src/vs/platform/statusbar/common/statusbar.ts index 42c1d6cb180..2c5ba10591c 100644 --- a/src/vs/platform/statusbar/common/statusbar.ts +++ b/src/vs/platform/statusbar/common/statusbar.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IDisposable } from 'vs/base/common/lifecycle'; import { ThemeColor } from 'vs/platform/theme/common/themeService'; @@ -59,7 +59,7 @@ export interface IStatusbarEntry { export interface IStatusbarService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * Adds an entry to the statusbar with the given alignment and priority. Use the returned accessor @@ -85,4 +85,4 @@ export interface IStatusbarEntryAccessor extends IDisposable { * Allows to update an existing status bar entry. */ update(properties: IStatusbarEntry): void; -} \ No newline at end of file +} diff --git a/src/vs/platform/storage/browser/storageService.ts b/src/vs/platform/storage/browser/storageService.ts index 5648772339f..c307e34f92c 100644 --- a/src/vs/platform/storage/browser/storageService.ts +++ b/src/vs/platform/storage/browser/storageService.ts @@ -8,7 +8,6 @@ import { Event, Emitter } from 'vs/base/common/event'; import { IWorkspaceStorageChangeEvent, IStorageService, StorageScope, IWillSaveStateEvent, WillSaveStateReason, logStorage } from 'vs/platform/storage/common/storage'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IWorkspaceInitializationPayload } from 'vs/platform/workspaces/common/workspaces'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { IFileService, FileChangeType } from 'vs/platform/files/common/files'; import { IStorage, Storage, IStorageDatabase, IStorageItemsChangeEvent, IUpdateRequest } from 'vs/base/parts/storage/common/storage'; import { URI } from 'vs/base/common/uri'; @@ -19,7 +18,7 @@ import { VSBuffer } from 'vs/base/common/buffer'; export class BrowserStorageService extends Disposable implements IStorageService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private readonly _onDidChangeStorage: Emitter = this._register(new Emitter()); readonly onDidChangeStorage: Event = this._onDidChangeStorage.event; diff --git a/src/vs/platform/storage/common/storage.ts b/src/vs/platform/storage/common/storage.ts index 8860535a54a..5e23d0c095f 100644 --- a/src/vs/platform/storage/common/storage.ts +++ b/src/vs/platform/storage/common/storage.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { Event, Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; import { isUndefinedOrNull } from 'vs/base/common/types'; @@ -21,7 +21,7 @@ export interface IWillSaveStateEvent { export interface IStorageService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * Emitted whenever data is updated or deleted. @@ -118,7 +118,7 @@ export interface IWorkspaceStorageChangeEvent { export class InMemoryStorageService extends Disposable implements IStorageService { - _serviceBrand = null as any; + _serviceBrand: undefined; private readonly _onDidChangeStorage: Emitter = this._register(new Emitter()); readonly onDidChangeStorage: Event = this._onDidChangeStorage.event; diff --git a/src/vs/platform/storage/node/storageIpc.ts b/src/vs/platform/storage/node/storageIpc.ts index 8ed04953e41..ac5926cc249 100644 --- a/src/vs/platform/storage/node/storageIpc.ts +++ b/src/vs/platform/storage/node/storageIpc.ts @@ -147,7 +147,7 @@ export class GlobalStorageDatabaseChannel extends Disposable implements IServerC export class GlobalStorageDatabaseChannelClient extends Disposable implements IStorageDatabase { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _onDidChangeItemsExternal: Emitter = this._register(new Emitter()); readonly onDidChangeItemsExternal: Event = this._onDidChangeItemsExternal.event; diff --git a/src/vs/platform/storage/node/storageMainService.ts b/src/vs/platform/storage/node/storageMainService.ts index 2f2dd9e3bd2..95274a2350b 100644 --- a/src/vs/platform/storage/node/storageMainService.ts +++ b/src/vs/platform/storage/node/storageMainService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { Event, Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; import { ILogService, LogLevel } from 'vs/platform/log/common/log'; @@ -16,7 +16,7 @@ export const IStorageMainService = createDecorator('storage export interface IStorageMainService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * Emitted whenever data is updated or deleted. @@ -85,7 +85,7 @@ export interface IStorageChangeEvent { export class StorageMainService extends Disposable implements IStorageMainService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private static STORAGE_NAME = 'state.vscdb'; diff --git a/src/vs/platform/storage/node/storageService.ts b/src/vs/platform/storage/node/storageService.ts index ca09cbc9cc9..33e3cac1c81 100644 --- a/src/vs/platform/storage/node/storageService.ts +++ b/src/vs/platform/storage/node/storageService.ts @@ -15,11 +15,10 @@ import { copy, exists, mkdirp, writeFile } from 'vs/base/node/pfs'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IWorkspaceInitializationPayload, isWorkspaceIdentifier, isSingleFolderWorkspaceInitializationPayload } from 'vs/platform/workspaces/common/workspaces'; import { onUnexpectedError } from 'vs/base/common/errors'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class StorageService extends Disposable implements IStorageService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private static WORKSPACE_STORAGE_NAME = 'state.vscdb'; private static WORKSPACE_META_NAME = 'workspace.json'; diff --git a/src/vs/platform/telemetry/common/telemetry.ts b/src/vs/platform/telemetry/common/telemetry.ts index 556a23103a6..d1125e0ffb3 100644 --- a/src/vs/platform/telemetry/common/telemetry.ts +++ b/src/vs/platform/telemetry/common/telemetry.ts @@ -23,7 +23,7 @@ export interface ITelemetryData { export interface ITelemetryService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Sends a telemetry event that has been privacy approved. diff --git a/src/vs/platform/telemetry/common/telemetryService.ts b/src/vs/platform/telemetry/common/telemetryService.ts index 22dd0725cd5..1e468a2018d 100644 --- a/src/vs/platform/telemetry/common/telemetryService.ts +++ b/src/vs/platform/telemetry/common/telemetryService.ts @@ -27,7 +27,7 @@ export class TelemetryService implements ITelemetryService { static IDLE_START_EVENT_NAME = 'UserIdleStart'; static IDLE_STOP_EVENT_NAME = 'UserIdleStop'; - _serviceBrand: any; + _serviceBrand: undefined; private _appender: ITelemetryAppender; private _commonProperties: Promise<{ [name: string]: any; }>; diff --git a/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts b/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts index 92f9d63b15e..9376104b9c0 100644 --- a/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts @@ -24,7 +24,7 @@ class AppInsightsMock implements ITelemetryClient { } class TestableLogService extends AbstractLogService implements ILogService { - _serviceBrand: any; + _serviceBrand: undefined; public logs: string[] = []; diff --git a/src/vs/platform/theme/common/themeService.ts b/src/vs/platform/theme/common/themeService.ts index 9b6ea499582..42e93300a85 100644 --- a/src/vs/platform/theme/common/themeService.ts +++ b/src/vs/platform/theme/common/themeService.ts @@ -76,7 +76,7 @@ export interface IThemingParticipant { } export interface IThemeService { - _serviceBrand: any; + _serviceBrand: undefined; getTheme(): ITheme; diff --git a/src/vs/platform/theme/electron-main/themeMainService.ts b/src/vs/platform/theme/electron-main/themeMainService.ts index 8dfe54bca5e..d44f8bed3dd 100644 --- a/src/vs/platform/theme/electron-main/themeMainService.ts +++ b/src/vs/platform/theme/electron-main/themeMainService.ts @@ -18,14 +18,14 @@ const THEME_BG_STORAGE_KEY = 'themeBackground'; export const IThemeMainService = createDecorator('themeMainService'); export interface IThemeMainService { - _serviceBrand: any; + _serviceBrand: undefined; getBackgroundColor(): string; } export class ThemeMainService implements IThemeMainService { - _serviceBrand: any; + _serviceBrand: undefined; constructor(@IStateService private stateService: IStateService) { ipc.on('vscode:changeColorTheme', (e: Event, windowId: number, broadcast: string) => { diff --git a/src/vs/platform/theme/test/common/testThemeService.ts b/src/vs/platform/theme/test/common/testThemeService.ts index e29bfc636f5..fd49d393a34 100644 --- a/src/vs/platform/theme/test/common/testThemeService.ts +++ b/src/vs/platform/theme/test/common/testThemeService.ts @@ -33,7 +33,7 @@ export class TestIconTheme implements IIconTheme { export class TestThemeService implements IThemeService { - _serviceBrand: any; + _serviceBrand: undefined; _theme: ITheme; _iconTheme: IIconTheme; _onThemeChange = new Emitter(); diff --git a/src/vs/platform/update/common/update.ts b/src/vs/platform/update/common/update.ts index 205d961cece..9c5404c4297 100644 --- a/src/vs/platform/update/common/update.ts +++ b/src/vs/platform/update/common/update.ts @@ -83,7 +83,7 @@ export interface IAutoUpdater extends Event.NodeEventEmitter { export const IUpdateService = createDecorator('updateService'); export interface IUpdateService { - _serviceBrand: any; + _serviceBrand: undefined; readonly onStateChange: Event; readonly state: State; diff --git a/src/vs/platform/update/electron-browser/updateService.ts b/src/vs/platform/update/electron-browser/updateService.ts index bd8fa6cc185..fe6e5be934a 100644 --- a/src/vs/platform/update/electron-browser/updateService.ts +++ b/src/vs/platform/update/electron-browser/updateService.ts @@ -7,11 +7,10 @@ import { IChannel } from 'vs/base/parts/ipc/common/ipc'; import { Event, Emitter } from 'vs/base/common/event'; import { IUpdateService, State } from 'vs/platform/update/common/update'; import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class UpdateService implements IUpdateService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private _onStateChange = new Emitter(); readonly onStateChange: Event = this._onStateChange.event; diff --git a/src/vs/platform/update/electron-main/abstractUpdateService.ts b/src/vs/platform/update/electron-main/abstractUpdateService.ts index d789bf4e09b..7ae90deb9b7 100644 --- a/src/vs/platform/update/electron-main/abstractUpdateService.ts +++ b/src/vs/platform/update/electron-main/abstractUpdateService.ts @@ -24,7 +24,7 @@ export type UpdateNotAvailableClassification = { export abstract class AbstractUpdateService implements IUpdateService { - _serviceBrand: any; + _serviceBrand: undefined; protected readonly url: string | undefined; diff --git a/src/vs/platform/update/electron-main/updateService.darwin.ts b/src/vs/platform/update/electron-main/updateService.darwin.ts index da534803b83..4ea14a0cb82 100644 --- a/src/vs/platform/update/electron-main/updateService.darwin.ts +++ b/src/vs/platform/update/electron-main/updateService.darwin.ts @@ -18,7 +18,7 @@ import { IRequestService } from 'vs/platform/request/common/request'; export class DarwinUpdateService extends AbstractUpdateService { - _serviceBrand: any; + _serviceBrand: undefined; private disposables: IDisposable[] = []; diff --git a/src/vs/platform/update/electron-main/updateService.linux.ts b/src/vs/platform/update/electron-main/updateService.linux.ts index 07eaf22cb09..3faff10a567 100644 --- a/src/vs/platform/update/electron-main/updateService.linux.ts +++ b/src/vs/platform/update/electron-main/updateService.linux.ts @@ -17,7 +17,7 @@ import { CancellationToken } from 'vs/base/common/cancellation'; export class LinuxUpdateService extends AbstractUpdateService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @ILifecycleService lifecycleService: ILifecycleService, diff --git a/src/vs/platform/update/electron-main/updateService.snap.ts b/src/vs/platform/update/electron-main/updateService.snap.ts index 54f63ca59e4..3861dc0b392 100644 --- a/src/vs/platform/update/electron-main/updateService.snap.ts +++ b/src/vs/platform/update/electron-main/updateService.snap.ts @@ -17,7 +17,7 @@ import { UpdateNotAvailableClassification } from 'vs/platform/update/electron-ma abstract class AbstractUpdateService2 implements IUpdateService { - _serviceBrand: any; + _serviceBrand: undefined; private _state: State = State.Uninitialized; @@ -134,7 +134,7 @@ abstract class AbstractUpdateService2 implements IUpdateService { export class SnapUpdateService extends AbstractUpdateService2 { - _serviceBrand: any; + _serviceBrand: undefined; constructor( private snap: string, diff --git a/src/vs/platform/update/electron-main/updateService.win32.ts b/src/vs/platform/update/electron-main/updateService.win32.ts index bd7a3d35f7c..1355a331d7a 100644 --- a/src/vs/platform/update/electron-main/updateService.win32.ts +++ b/src/vs/platform/update/electron-main/updateService.win32.ts @@ -49,7 +49,7 @@ function getUpdateType(): UpdateType { export class Win32UpdateService extends AbstractUpdateService { - _serviceBrand: any; + _serviceBrand: undefined; private availableUpdate: IAvailableUpdate | undefined; diff --git a/src/vs/platform/url/common/url.ts b/src/vs/platform/url/common/url.ts index 87a5a8fbeec..479bc0bca73 100644 --- a/src/vs/platform/url/common/url.ts +++ b/src/vs/platform/url/common/url.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { URI, UriComponents } from 'vs/base/common/uri'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IDisposable } from 'vs/base/common/lifecycle'; export const IURLService = createDecorator('urlService'); @@ -15,7 +15,7 @@ export interface IURLHandler { export interface IURLService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * Create a URL that can be called to trigger IURLhandlers. diff --git a/src/vs/platform/url/common/urlService.ts b/src/vs/platform/url/common/urlService.ts index eb216a6b335..322929c723d 100644 --- a/src/vs/platform/url/common/urlService.ts +++ b/src/vs/platform/url/common/urlService.ts @@ -8,11 +8,10 @@ import { URI, UriComponents } from 'vs/base/common/uri'; import { values } from 'vs/base/common/map'; import { first } from 'vs/base/common/async'; import { toDisposable, IDisposable, Disposable } from 'vs/base/common/lifecycle'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export abstract class AbstractURLService extends Disposable implements IURLService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private handlers = new Set(); diff --git a/src/vs/platform/url/node/urlIpc.ts b/src/vs/platform/url/node/urlIpc.ts index 0e70e9c6534..74e482f9817 100644 --- a/src/vs/platform/url/node/urlIpc.ts +++ b/src/vs/platform/url/node/urlIpc.ts @@ -28,7 +28,7 @@ export class URLServiceChannel implements IServerChannel { export class URLServiceChannelClient implements IURLService { - _serviceBrand: any; + _serviceBrand: undefined; constructor(private channel: IChannel) { } diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index bca1181e591..57ffdc63bc0 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -94,7 +94,7 @@ export interface IDevToolsOptions { export interface IWindowsService { - _serviceBrand: any; + _serviceBrand: undefined; readonly onWindowOpen: Event; readonly onWindowFocus: Event; @@ -221,7 +221,7 @@ export function isFileToOpen(uriToOpen: IURIToOpen): uriToOpen is IFileToOpen { export interface IWindowService { - _serviceBrand: any; + _serviceBrand: undefined; readonly onDidChangeFocus: Event; readonly onDidChangeMaximize: Event; diff --git a/src/vs/platform/windows/electron-browser/windowsService.ts b/src/vs/platform/windows/electron-browser/windowsService.ts index 57bd96143af..9321a89c8a6 100644 --- a/src/vs/platform/windows/electron-browser/windowsService.ts +++ b/src/vs/platform/windows/electron-browser/windowsService.ts @@ -13,11 +13,10 @@ import { URI } from 'vs/base/common/uri'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService'; import { IProcessEnvironment } from 'vs/base/common/platform'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class WindowsService implements IWindowsService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private channel: IChannel; diff --git a/src/vs/platform/windows/electron-main/windows.ts b/src/vs/platform/windows/electron-main/windows.ts index 3e64f5f5d0b..71479f9009e 100644 --- a/src/vs/platform/windows/electron-main/windows.ts +++ b/src/vs/platform/windows/electron-main/windows.ts @@ -84,7 +84,7 @@ export interface IWindowsCountChangedEvent { } export interface IWindowsMainService { - _serviceBrand: any; + _serviceBrand: undefined; // events readonly onWindowReady: Event; diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index 00af7fe6715..622a8bb7315 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -23,11 +23,10 @@ import { Schemas } from 'vs/base/common/network'; import { mnemonicButtonLabel } from 'vs/base/common/labels'; import { isMacintosh, isLinux, IProcessEnvironment } from 'vs/base/common/platform'; import { ILogService } from 'vs/platform/log/common/log'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class WindowsService extends Disposable implements IWindowsService, IURLHandler { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private readonly disposables = this._register(new DisposableStore()); diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 5353a0eb7e7..07cf7b30212 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -25,7 +25,7 @@ export interface IWorkspaceFoldersChangeEvent { } export interface IWorkspaceContextService { - _serviceBrand: any; + _serviceBrand: undefined; /** * An event which fires on workbench state changes. diff --git a/src/vs/platform/workspaces/common/workspaces.ts b/src/vs/platform/workspaces/common/workspaces.ts index fa8fae57ec8..a1b5c0aadb3 100644 --- a/src/vs/platform/workspaces/common/workspaces.ts +++ b/src/vs/platform/workspaces/common/workspaces.ts @@ -96,7 +96,7 @@ export interface IUntitledWorkspaceInfo { } export interface IWorkspacesMainService extends IWorkspacesService { - _serviceBrand: any; + _serviceBrand: undefined; onUntitledWorkspaceDeleted: Event; @@ -112,7 +112,7 @@ export interface IWorkspacesMainService extends IWorkspacesService { } export interface IWorkspacesService { - _serviceBrand: any; + _serviceBrand: undefined; createUntitledWorkspace(folders?: IWorkspaceFolderCreationData[], remoteAuthority?: string): Promise; diff --git a/src/vs/platform/workspaces/electron-browser/workspacesService.ts b/src/vs/platform/workspaces/electron-browser/workspacesService.ts index 1e0df308123..6c7f5fb824e 100644 --- a/src/vs/platform/workspaces/electron-browser/workspacesService.ts +++ b/src/vs/platform/workspaces/electron-browser/workspacesService.ts @@ -6,12 +6,11 @@ import { IChannel } from 'vs/base/parts/ipc/common/ipc'; import { IWorkspacesService, IWorkspaceIdentifier, IWorkspaceFolderCreationData, reviveWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { URI } from 'vs/base/common/uri'; export class WorkspacesService implements IWorkspacesService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; private channel: IChannel; diff --git a/src/vs/platform/workspaces/electron-main/workspacesMainService.ts b/src/vs/platform/workspaces/electron-main/workspacesMainService.ts index 54d6757842a..e23da4f94ac 100644 --- a/src/vs/platform/workspaces/electron-main/workspacesMainService.ts +++ b/src/vs/platform/workspaces/electron-main/workspacesMainService.ts @@ -26,7 +26,7 @@ export interface IStoredWorkspace { export class WorkspacesMainService extends Disposable implements IWorkspacesMainService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly untitledWorkspacesHome: URI; // local URI that contains all untitled workspaces diff --git a/src/vs/workbench/api/common/extHostCommands.ts b/src/vs/workbench/api/common/extHostCommands.ts index 8111a7687cf..819119a0f72 100644 --- a/src/vs/workbench/api/common/extHostCommands.ts +++ b/src/vs/workbench/api/common/extHostCommands.ts @@ -33,7 +33,7 @@ export interface ArgumentProcessor { export class ExtHostCommands implements ExtHostCommandsShape { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; private readonly _commands = new Map(); private readonly _proxy: MainThreadCommandsShape; diff --git a/src/vs/workbench/api/common/extHostConfiguration.ts b/src/vs/workbench/api/common/extHostConfiguration.ts index 99402c46057..44b064059fa 100644 --- a/src/vs/workbench/api/common/extHostConfiguration.ts +++ b/src/vs/workbench/api/common/extHostConfiguration.ts @@ -42,7 +42,7 @@ type ConfigurationInspect = { export class ExtHostConfiguration implements ExtHostConfigurationShape { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; private readonly _proxy: MainThreadConfigurationShape; private readonly _extHostWorkspace: ExtHostWorkspace; diff --git a/src/vs/workbench/api/common/extHostDebugService.ts b/src/vs/workbench/api/common/extHostDebugService.ts index 02b3c423f87..3e0f21ec8e1 100644 --- a/src/vs/workbench/api/common/extHostDebugService.ts +++ b/src/vs/workbench/api/common/extHostDebugService.ts @@ -13,7 +13,7 @@ export const IExtHostDebugService = createDecorator('IExtH export interface IExtHostDebugService extends ExtHostDebugServiceShape { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; onDidStartDebugSession: Event; onDidTerminateDebugSession: Event; diff --git a/src/vs/workbench/api/common/extHostDocumentsAndEditors.ts b/src/vs/workbench/api/common/extHostDocumentsAndEditors.ts index e80289ecb5f..8518289b6c3 100644 --- a/src/vs/workbench/api/common/extHostDocumentsAndEditors.ts +++ b/src/vs/workbench/api/common/extHostDocumentsAndEditors.ts @@ -17,7 +17,7 @@ import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService'; export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsShape { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; private _disposables: Disposable[] = []; diff --git a/src/vs/workbench/api/common/extHostExtensionService.ts b/src/vs/workbench/api/common/extHostExtensionService.ts index 8c903a6027c..a7258045479 100644 --- a/src/vs/workbench/api/common/extHostExtensionService.ts +++ b/src/vs/workbench/api/common/extHostExtensionService.ts @@ -64,7 +64,7 @@ type TelemetryActivationEventFragment = { export abstract class AbstractExtHostExtensionService implements ExtHostExtensionServiceShape { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; private static readonly WORKSPACE_CONTAINS_TIMEOUT = 7000; @@ -767,7 +767,7 @@ function getTelemetryActivationEvent(extensionDescription: IExtensionDescription export const IExtHostExtensionService = createDecorator('IExtHostExtensionService'); export interface IExtHostExtensionService extends AbstractExtHostExtensionService { - _serviceBrand: any; + _serviceBrand: undefined; initialize(): Promise; isActivated(extensionId: ExtensionIdentifier): boolean; activateByIdWithErrors(extensionId: ExtensionIdentifier, reason: ExtensionActivationReason): Promise; diff --git a/src/vs/workbench/api/common/extHostOutput.ts b/src/vs/workbench/api/common/extHostOutput.ts index c903d4b484f..aeae1a0aef4 100644 --- a/src/vs/workbench/api/common/extHostOutput.ts +++ b/src/vs/workbench/api/common/extHostOutput.ts @@ -137,7 +137,7 @@ export class LazyOutputChannel implements vscode.OutputChannel { export class ExtHostOutputService implements ExtHostOutputServiceShape { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; protected readonly _proxy: MainThreadOutputServiceShape; diff --git a/src/vs/workbench/api/common/extHostRpcService.ts b/src/vs/workbench/api/common/extHostRpcService.ts index 5524e6f2ebd..3cbdcf31165 100644 --- a/src/vs/workbench/api/common/extHostRpcService.ts +++ b/src/vs/workbench/api/common/extHostRpcService.ts @@ -9,11 +9,11 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' export const IExtHostRpcService = createDecorator('IExtHostRpcService'); export interface IExtHostRpcService extends IRPCProtocol { - _serviceBrand: any; + _serviceBrand: undefined; } export class ExtHostRpcService implements IExtHostRpcService { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; readonly getProxy: (identifier: ProxyIdentifier) => T; readonly set: (identifier: ProxyIdentifier, instance: R) => R; diff --git a/src/vs/workbench/api/common/extHostStorage.ts b/src/vs/workbench/api/common/extHostStorage.ts index efa42fa2142..71bb81ef6c8 100644 --- a/src/vs/workbench/api/common/extHostStorage.ts +++ b/src/vs/workbench/api/common/extHostStorage.ts @@ -16,7 +16,7 @@ export interface IStorageChangeEvent { export class ExtHostStorage implements ExtHostStorageShape { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; private _proxy: MainThreadStorageShape; diff --git a/src/vs/workbench/api/common/extHostStoragePaths.ts b/src/vs/workbench/api/common/extHostStoragePaths.ts index 0dcaba0f791..cd73bf5563b 100644 --- a/src/vs/workbench/api/common/extHostStoragePaths.ts +++ b/src/vs/workbench/api/common/extHostStoragePaths.ts @@ -9,7 +9,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' export const IExtensionStoragePaths = createDecorator('IExtensionStoragePaths'); export interface IExtensionStoragePaths { - _serviceBrand: any; + _serviceBrand: undefined; whenReady: Promise; workspaceValue(extension: IExtensionDescription): string | undefined; globalValue(extension: IExtensionDescription): string; diff --git a/src/vs/workbench/api/common/extHostTask.ts b/src/vs/workbench/api/common/extHostTask.ts index e6233ae01a6..8820dbc8c92 100644 --- a/src/vs/workbench/api/common/extHostTask.ts +++ b/src/vs/workbench/api/common/extHostTask.ts @@ -12,7 +12,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' export interface IExtHostTask extends ExtHostTaskShape { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; taskExecutions: vscode.TaskExecution[]; onDidStartTask: Event; diff --git a/src/vs/workbench/api/common/extHostTerminalService.ts b/src/vs/workbench/api/common/extHostTerminalService.ts index fcd283b560c..ee870c3abf6 100644 --- a/src/vs/workbench/api/common/extHostTerminalService.ts +++ b/src/vs/workbench/api/common/extHostTerminalService.ts @@ -11,7 +11,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' export interface IExtHostTerminalService extends ExtHostTerminalServiceShape { - _serviceBrand: any; + _serviceBrand: undefined; activeTerminal: vscode.Terminal | undefined; terminals: vscode.Terminal[]; diff --git a/src/vs/workbench/api/common/extHostUriTransformerService.ts b/src/vs/workbench/api/common/extHostUriTransformerService.ts index e9acd9bc5d6..97b00f23806 100644 --- a/src/vs/workbench/api/common/extHostUriTransformerService.ts +++ b/src/vs/workbench/api/common/extHostUriTransformerService.ts @@ -8,13 +8,13 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' import { URI, UriComponents } from 'vs/base/common/uri'; export interface IURITransformerService extends IURITransformer { - _serviceBrand: any; + _serviceBrand: undefined; } export const IURITransformerService = createDecorator('IURITransformerService'); export class URITransformerService implements IURITransformerService { - _serviceBrand: any; + _serviceBrand: undefined; transformIncoming: (uri: UriComponents) => UriComponents; transformOutgoing: (uri: UriComponents) => UriComponents; diff --git a/src/vs/workbench/api/common/extHostWorkspace.ts b/src/vs/workbench/api/common/extHostWorkspace.ts index d217d63b4d6..f8f7db908dc 100644 --- a/src/vs/workbench/api/common/extHostWorkspace.ts +++ b/src/vs/workbench/api/common/extHostWorkspace.ts @@ -156,7 +156,7 @@ class ExtHostWorkspaceImpl extends Workspace { export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspaceProvider { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; private readonly _onDidChangeWorkspace = new Emitter(); readonly onDidChangeWorkspace: Event = this._onDidChangeWorkspace.event; diff --git a/src/vs/workbench/api/node/extHostDebugService.ts b/src/vs/workbench/api/node/extHostDebugService.ts index c82f788a370..82c653c9c37 100644 --- a/src/vs/workbench/api/node/extHostDebugService.ts +++ b/src/vs/workbench/api/node/extHostDebugService.ts @@ -41,7 +41,7 @@ import { IExtHostDebugService } from 'vs/workbench/api/common/extHostDebugServic export class ExtHostDebugService implements IExtHostDebugService, ExtHostDebugServiceShape { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; private _configProviderHandleCounter: number; private _configProviders: ConfigProviderTuple[]; diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index cf9b522ef11..2e194117598 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -357,7 +357,7 @@ interface HandlerData { export class ExtHostTask implements ExtHostTaskShape { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; private readonly _proxy: MainThreadTaskShape; private readonly _workspaceProvider: IExtHostWorkspaceProvider; diff --git a/src/vs/workbench/api/node/extHostTerminalService.ts b/src/vs/workbench/api/node/extHostTerminalService.ts index ecce50a23f3..345e2c5b312 100644 --- a/src/vs/workbench/api/node/extHostTerminalService.ts +++ b/src/vs/workbench/api/node/extHostTerminalService.ts @@ -199,7 +199,7 @@ export class ExtHostTerminal extends BaseExtHostTerminal implements vscode.Termi export class ExtHostTerminalService implements IExtHostTerminalService, ExtHostTerminalServiceShape { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; private _proxy: MainThreadTerminalServiceShape; private _activeTerminal: ExtHostTerminal | undefined; diff --git a/src/vs/workbench/api/worker/extHostLogService.ts b/src/vs/workbench/api/worker/extHostLogService.ts index d29f41ec939..a69842324a6 100644 --- a/src/vs/workbench/api/worker/extHostLogService.ts +++ b/src/vs/workbench/api/worker/extHostLogService.ts @@ -15,7 +15,7 @@ import { localize } from 'vs/nls'; export class ExtHostLogService extends AbstractLogService implements ILogService, ExtHostLogServiceShape { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _proxy: MainThreadLogShape; private readonly _logFile: UriComponents; diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 2e1e63986f3..db34ae06e6a 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -21,7 +21,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { ITitleService } from 'vs/workbench/services/title/common/titleService'; -import { IInstantiationService, ServicesAccessor, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { LifecyclePhase, StartupKind, ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IWindowService, MenuBarVisibility, getTitleBarStyle } from 'vs/platform/windows/common/windows'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; @@ -80,7 +80,7 @@ enum Classes { export abstract class Layout extends Disposable implements IWorkbenchLayoutService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private readonly _onTitleBarVisibilityChange: Emitter = this._register(new Emitter()); readonly onTitleBarVisibilityChange: Event = this._onTitleBarVisibilityChange.event; diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index f2d8631a6c3..5d56b84987b 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -14,7 +14,7 @@ import { GlobalActivityActionViewItem, ViewletActivityAction, ToggleViewletActio import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IBadge } from 'vs/workbench/services/activity/common/activity'; import { IWorkbenchLayoutService, Parts, Position as SideBarPosition } from 'vs/workbench/services/layout/browser/layoutService'; -import { IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IDisposable, toDisposable, DisposableStore } from 'vs/base/common/lifecycle'; import { ToggleActivityBarVisibilityAction } from 'vs/workbench/browser/actions/layoutActions'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; @@ -48,7 +48,7 @@ interface ICachedViewlet { export class ActivitybarPart extends Part implements IActivityBarService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private static readonly ACTION_HEIGHT = 48; private static readonly PINNED_VIEWLETS = 'workbench.activity.pinnedViewlets'; diff --git a/src/vs/workbench/browser/parts/editor/breadcrumbs.ts b/src/vs/workbench/browser/parts/editor/breadcrumbs.ts index 0bd6c69fbdc..96a35f5a192 100644 --- a/src/vs/workbench/browser/parts/editor/breadcrumbs.ts +++ b/src/vs/workbench/browser/parts/editor/breadcrumbs.ts @@ -11,7 +11,7 @@ import { localize } from 'vs/nls'; import { IConfigurationOverrides, IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { Registry } from 'vs/platform/registry/common/platform'; import { GroupIdentifier } from 'vs/workbench/common/editor'; @@ -19,7 +19,7 @@ export const IBreadcrumbsService = createDecorator('IEditor export interface IBreadcrumbsService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; register(group: GroupIdentifier, widget: BreadcrumbsWidget): IDisposable; @@ -29,7 +29,7 @@ export interface IBreadcrumbsService { export class BreadcrumbsService implements IBreadcrumbsService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _map = new Map(); diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 4ad7fe0de7b..a3dec299bc6 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -10,7 +10,7 @@ import { Dimension, isAncestor, toggleClass, addClass, $ } from 'vs/base/browser import { Event, Emitter, Relay } from 'vs/base/common/event'; import { contrastBorder, editorBackground } from 'vs/platform/theme/common/colorRegistry'; import { GroupDirection, IAddGroupOptions, GroupsArrangement, GroupOrientation, IMergeGroupOptions, MergeGroupMode, ICopyEditorOptions, GroupsOrder, GroupChangeKind, GroupLocation, IFindGroupScope, EditorGroupLayout, GroupLayoutArgument, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; -import { IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IView, orthogonal, LayoutPriority, IViewSize, Direction, SerializableGrid, Sizing, ISerializedGrid, Orientation, GridBranchNode, isGridBranchNode, GridNode, createSerializedGrid, Grid } from 'vs/base/browser/ui/grid/grid'; import { GroupIdentifier, IWorkbenchEditorConfiguration, IEditorPartOptions } from 'vs/workbench/common/editor'; import { values } from 'vs/base/common/map'; @@ -81,7 +81,7 @@ class GridWidgetView implements IView { export class EditorPart extends Part implements IEditorGroupsService, IEditorGroupsAccessor { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private static readonly EDITOR_PART_UI_STATE_STORAGE_KEY = 'editorpart.state'; private static readonly EDITOR_PART_CENTERED_VIEW_STORAGE_KEY = 'editorpart.centeredview'; diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index b864241fdea..103e0075498 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -17,7 +17,7 @@ import { IStorageService, StorageScope, IWorkspaceStorageChangeEvent } from 'vs/ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ClosePanelAction, TogglePanelPositionAction, PanelActivityAction, ToggleMaximizedPanelAction, TogglePanelAction } from 'vs/workbench/browser/parts/panel/panelActions'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { PANEL_BACKGROUND, PANEL_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER, PANEL_DRAG_AND_DROP_BACKGROUND, PANEL_INPUT_BORDER } from 'vs/workbench/common/theme'; @@ -48,7 +48,7 @@ export class PanelPart extends CompositePart implements IPanelService { private static readonly PINNED_PANELS = 'workbench.panel.pinnedPanels'; private static readonly MIN_COMPOSITE_BAR_WIDTH = 50; - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; //#region IView diff --git a/src/vs/workbench/browser/parts/quickinput/quickInput.ts b/src/vs/workbench/browser/parts/quickinput/quickInput.ts index 437bd45dfc6..5a65a51a76d 100644 --- a/src/vs/workbench/browser/parts/quickinput/quickInput.ts +++ b/src/vs/workbench/browser/parts/quickinput/quickInput.ts @@ -8,7 +8,7 @@ import { Component } from 'vs/workbench/common/component'; import { IQuickInputService, IQuickPickItem, IPickOptions, IInputOptions, IQuickNavigateConfiguration, IQuickPick, IQuickInput, IQuickInputButton, IInputBox, IQuickPickItemButtonEvent, QuickPickInput, IQuickPickSeparator, IKeyMods } from 'vs/platform/quickinput/common/quickInput'; import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService'; import * as dom from 'vs/base/browser/dom'; -import { IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { contrastBorder, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; import { QUICK_INPUT_BACKGROUND, QUICK_INPUT_FOREGROUND } from 'vs/workbench/common/theme'; @@ -880,7 +880,7 @@ class InputBox extends QuickInput implements IInputBox { export class QuickInputService extends Component implements IQuickInputService { - public _serviceBrand!: ServiceIdentifier; + public _serviceBrand: undefined; private static readonly ID = 'workbench.component.quickinput'; private static readonly MAX_WIDTH = 600; // Max total width of quick open widget diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index feaa519ab1b..876fe64c9e9 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -30,7 +30,7 @@ import { QuickOpenHandler, QuickOpenHandlerDescriptor, IQuickOpenRegistry, Exten import * as errors from 'vs/base/common/errors'; import { IQuickOpenService, IShowOptions } from 'vs/platform/quickOpen/common/quickOpen'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IContextKeyService, RawContextKey, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { IThemeService } from 'vs/platform/theme/common/themeService'; @@ -61,7 +61,7 @@ export class QuickOpenController extends Component implements IQuickOpenService private static readonly MAX_SHORT_RESPONSE_TIME = 500; private static readonly ID = 'workbench.component.quickopen'; - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private readonly _onShow: Emitter = this._register(new Emitter()); readonly onShow: Event = this._onShow.event; diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index 9e17bf39cc4..c3b76e31974 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -19,7 +19,7 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; -import { IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { Event, Emitter } from 'vs/base/common/event'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; @@ -35,7 +35,7 @@ import { LayoutPriority } from 'vs/base/browser/ui/grid/grid'; export class SidebarPart extends CompositePart implements IViewletService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; static readonly activeViewletSettingsKey = 'workbench.sidebar.activeviewletid'; diff --git a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts index bd3bf613a2b..d730ea36ed2 100644 --- a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts +++ b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts @@ -11,7 +11,7 @@ import { OcticonLabel } from 'vs/base/browser/ui/octiconLabel/octiconLabel'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { Part } from 'vs/workbench/browser/part'; -import { IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { StatusbarAlignment, IStatusbarService, IStatusbarEntry, IStatusbarEntryAccessor } from 'vs/platform/statusbar/common/statusbar'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; @@ -323,7 +323,7 @@ class HideStatusbarEntryAction extends Action { export class StatusbarPart extends Part implements IStatusbarService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; //#region IView diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts index fbf3423014f..27c9c36e168 100644 --- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts +++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts @@ -28,7 +28,7 @@ import { Color } from 'vs/base/common/color'; import { trim } from 'vs/base/common/strings'; import { EventType, EventHelper, Dimension, isAncestor, hide, show, removeClass, addClass, append, $, addDisposableListener, runAtThisOrScheduleAtNextAnimationFrame } from 'vs/base/browser/dom'; import { CustomMenubarControl } from 'vs/workbench/browser/parts/titlebar/menubarControl'; -import { IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { template, getBaseLabel } from 'vs/base/common/labels'; import { ILabelService } from 'vs/platform/label/common/label'; import { Event, Emitter } from 'vs/base/common/event'; @@ -58,7 +58,7 @@ export class TitlebarPart extends Part implements ITitleService { private _onMenubarVisibilityChange = this._register(new Emitter()); readonly onMenubarVisibilityChange: Event = this._onMenubarVisibilityChange.event; - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private title: HTMLElement; private dragRegion: HTMLElement; diff --git a/src/vs/workbench/browser/parts/views/views.ts b/src/vs/workbench/browser/parts/views/views.ts index 7408f559cf3..d2a834b2c6b 100644 --- a/src/vs/workbench/browser/parts/views/views.ts +++ b/src/vs/workbench/browser/parts/views/views.ts @@ -20,7 +20,6 @@ import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/co import { values } from 'vs/base/common/map'; import { IFileIconTheme, IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { toggleClass, addClass } from 'vs/base/browser/dom'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; function filterViewRegisterEvent(container: ViewContainer, event: Event<{ viewContainer: ViewContainer, views: IViewDescriptor[] }>): Event { @@ -635,7 +634,7 @@ export class PersistentContributableViewsModel extends ContributableViewsModel { export class ViewsService extends Disposable implements IViewsService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private readonly viewDescriptorCollections: Map; private readonly viewDisposable: Map; diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts index 895a8a0393f..d2729c92609 100644 --- a/src/vs/workbench/browser/web.simpleservices.ts +++ b/src/vs/workbench/browser/web.simpleservices.ts @@ -38,7 +38,7 @@ import { IWorkspaceStatsService, Tags } from 'vs/workbench/contrib/stats/common/ export class SimpleUpdateService implements IUpdateService { - _serviceBrand: any; + _serviceBrand: undefined; onStateChange = Event.None; state: State; @@ -72,7 +72,7 @@ registerSingleton(IUpdateService, SimpleUpdateService); export class SimpleWindowService extends Disposable implements IWindowService { - _serviceBrand: any; + _serviceBrand: undefined; readonly onDidChangeFocus: Event = Event.None; readonly onDidChangeMaximize: Event = Event.None; @@ -360,7 +360,7 @@ registerSingleton(IWindowService, SimpleWindowService); //#region Window export class SimpleWindowsService implements IWindowsService { - _serviceBrand: any; + _serviceBrand: undefined; windowCount = 1; @@ -670,7 +670,7 @@ registerSingleton(IWindowsService, SimpleWindowsService); export class SimpleWorkspaceEditingService implements IWorkspaceEditingService { - _serviceBrand: any; + _serviceBrand: undefined; addFolders(folders: IWorkspaceFolderCreationData[], donotNotifyError?: boolean): Promise { return Promise.resolve(undefined); @@ -714,7 +714,7 @@ registerSingleton(IWorkspaceEditingService, SimpleWorkspaceEditingService, true) export class SimpleWorkspacesService implements IWorkspacesService { - _serviceBrand: any; + _serviceBrand: undefined; createUntitledWorkspace(folders?: IWorkspaceFolderCreationData[], remoteAuthority?: string): Promise { // @ts-ignore @@ -738,7 +738,7 @@ registerSingleton(IWorkspacesService, SimpleWorkspacesService); //#region remote class SimpleTunnelService implements ITunnelService { - _serviceBrand: any; + _serviceBrand: undefined; openTunnel(remotePort: number) { return undefined; } @@ -752,7 +752,7 @@ registerSingleton(ITunnelService, SimpleTunnelService); class SimpleWorkspaceStatsService implements IWorkspaceStatsService { - _serviceBrand: any; + _serviceBrand: undefined; getTags(): Promise { return Promise.resolve({}); diff --git a/src/vs/workbench/common/views.ts b/src/vs/workbench/common/views.ts index 7306d530fcb..35e716a87b7 100644 --- a/src/vs/workbench/common/views.ts +++ b/src/vs/workbench/common/views.ts @@ -10,7 +10,7 @@ import { ContextKeyExpr, RawContextKey } from 'vs/platform/contextkey/common/con import { ITreeViewDataProvider } from 'vs/workbench/common/views'; import { localize } from 'vs/nls'; import { IViewlet } from 'vs/workbench/common/viewlet'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; import { ThemeIcon } from 'vs/platform/theme/common/themeService'; import { values, keys } from 'vs/base/common/map'; @@ -295,7 +295,7 @@ export interface IViewsViewlet extends IViewlet { export const IViewsService = createDecorator('viewsService'); export interface IViewsService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; openView(id: string, focus?: boolean): Promise; diff --git a/src/vs/workbench/contrib/comments/browser/commentService.ts b/src/vs/workbench/contrib/comments/browser/commentService.ts index e676d7caf1a..29587a0e7d0 100644 --- a/src/vs/workbench/contrib/comments/browser/commentService.ts +++ b/src/vs/workbench/contrib/comments/browser/commentService.ts @@ -33,7 +33,7 @@ export interface IWorkspaceCommentThreadsEvent { } export interface ICommentService { - _serviceBrand: any; + _serviceBrand: undefined; readonly onDidSetResourceCommentInfos: Event; readonly onDidSetAllCommentThreads: Event; readonly onDidUpdateCommentThreads: Event; @@ -60,7 +60,7 @@ export interface ICommentService { } export class CommentService extends Disposable implements ICommentService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _onDidSetDataProvider: Emitter = this._register(new Emitter()); readonly onDidSetDataProvider: Event = this._onDidSetDataProvider.event; diff --git a/src/vs/workbench/contrib/debug/browser/breakpointWidget.ts b/src/vs/workbench/contrib/debug/browser/breakpointWidget.ts index 136afbbf63d..f8752b3b1c5 100644 --- a/src/vs/workbench/contrib/debug/browser/breakpointWidget.ts +++ b/src/vs/workbench/contrib/debug/browser/breakpointWidget.ts @@ -39,13 +39,13 @@ import { onUnexpectedError } from 'vs/base/common/errors'; const $ = dom.$; const IPrivateBreakpointWidgetService = createDecorator('privateBreakopintWidgetService'); export interface IPrivateBreakpointWidgetService { - _serviceBrand: any; + _serviceBrand: undefined; close(success: boolean): void; } const DECORATION_KEY = 'breakpointwidgetdecoration'; export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWidgetService { - _serviceBrand: any; + _serviceBrand: undefined; private selectContainer!: HTMLElement; private input!: IActiveCodeEditor; diff --git a/src/vs/workbench/contrib/debug/browser/debugService.ts b/src/vs/workbench/contrib/debug/browser/debugService.ts index 97eb13a2107..95bd40e002a 100644 --- a/src/vs/workbench/contrib/debug/browser/debugService.ts +++ b/src/vs/workbench/contrib/debug/browser/debugService.ts @@ -73,7 +73,7 @@ const enum TaskRunResult { } export class DebugService implements IDebugService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _onDidChangeState: Emitter; private readonly _onDidNewSession: Emitter; diff --git a/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.ts b/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.ts index ce2209163fa..49b8815ca93 100644 --- a/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.ts +++ b/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.ts @@ -9,7 +9,6 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug'; import { IDebugHelperService } from 'vs/workbench/contrib/debug/common/debug'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { TelemetryService } from 'vs/platform/telemetry/common/telemetryService'; import { IChannel } from 'vs/base/parts/ipc/common/ipc'; @@ -52,7 +51,7 @@ registerSingleton(IExtensionHostDebugService, BrowserExtensionHostDebugService); class BrowserDebugHelperService implements IDebugHelperService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; createTelemetryService(configurationService: IConfigurationService, args: string[]): TelemetryService | undefined { return undefined; diff --git a/src/vs/workbench/contrib/debug/browser/repl.ts b/src/vs/workbench/contrib/debug/browser/repl.ts index 13e56b149c6..51807ecff25 100644 --- a/src/vs/workbench/contrib/debug/browser/repl.ts +++ b/src/vs/workbench/contrib/debug/browser/repl.ts @@ -71,7 +71,7 @@ const IPrivateReplService = createDecorator('privateReplSer const DECORATION_KEY = 'replinputdecoration'; interface IPrivateReplService { - _serviceBrand: any; + _serviceBrand: undefined; acceptReplInput(): void; getVisibleContent(): string; selectSession(session?: IDebugSession): void; @@ -85,7 +85,7 @@ function revealLastElement(tree: WorkbenchAsyncDataTree) { const sessionsToIgnore = new Set(); export class Repl extends Panel implements IPrivateReplService, IHistoryNavigationWidget { - _serviceBrand: any; + _serviceBrand: undefined; private static readonly REFRESH_DELAY = 100; // delay in ms to refresh the repl for new elements to show private static readonly REPL_INPUT_INITIAL_HEIGHT = 19; diff --git a/src/vs/workbench/contrib/debug/common/debug.ts b/src/vs/workbench/contrib/debug/common/debug.ts index 42a35769797..6a412f193b6 100644 --- a/src/vs/workbench/contrib/debug/common/debug.ts +++ b/src/vs/workbench/contrib/debug/common/debug.ts @@ -682,7 +682,7 @@ export interface ILaunch { export const IDebugService = createDecorator(DEBUG_SERVICE_ID); export interface IDebugService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Gets the current debug state. @@ -857,7 +857,7 @@ export const DEBUG_HELPER_SERVICE_ID = 'debugHelperService'; export const IDebugHelperService = createDecorator(DEBUG_HELPER_SERVICE_ID); export interface IDebugHelperService { - _serviceBrand: any; + _serviceBrand: undefined; createTelemetryService(configurationService: IConfigurationService, args: string[]): TelemetryService | undefined; } diff --git a/src/vs/workbench/contrib/debug/node/debugHelperService.ts b/src/vs/workbench/contrib/debug/node/debugHelperService.ts index 29aa2f3156b..899e32872ed 100644 --- a/src/vs/workbench/contrib/debug/node/debugHelperService.ts +++ b/src/vs/workbench/contrib/debug/node/debugHelperService.ts @@ -12,7 +12,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; export class NodeDebugHelperService implements IDebugHelperService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( ) { diff --git a/src/vs/workbench/contrib/debug/test/common/mockDebug.ts b/src/vs/workbench/contrib/debug/test/common/mockDebug.ts index bb10110ab92..1e83d444965 100644 --- a/src/vs/workbench/contrib/debug/test/common/mockDebug.ts +++ b/src/vs/workbench/contrib/debug/test/common/mockDebug.ts @@ -14,7 +14,7 @@ import Severity from 'vs/base/common/severity'; export class MockDebugService implements IDebugService { - public _serviceBrand: any; + public _serviceBrand: undefined; public get state(): State { throw new Error('not implemented'); diff --git a/src/vs/workbench/contrib/experiments/common/experimentService.ts b/src/vs/workbench/contrib/experiments/common/experimentService.ts index 5707377ce4b..67c0d71a7f1 100644 --- a/src/vs/workbench/contrib/experiments/common/experimentService.ts +++ b/src/vs/workbench/contrib/experiments/common/experimentService.ts @@ -63,7 +63,7 @@ export interface IExperiment { } export interface IExperimentService { - _serviceBrand: any; + _serviceBrand: undefined; getExperimentById(id: string): Promise; getExperimentsByType(type: ExperimentActionType): Promise; getCuratedExtensionsList(curatedExtensionsKey: string): Promise; @@ -108,7 +108,7 @@ interface IRawExperiment { } export class ExperimentService extends Disposable implements IExperimentService { - _serviceBrand: any; + _serviceBrand: undefined; private _experiments: IExperiment[] = []; private _loadExperimentsPromise: Promise; private _curatedMapping = Object.create(null); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionTipsService.ts b/src/vs/workbench/contrib/extensions/browser/extensionTipsService.ts index 3e7884ae1f7..cc6b6449ee6 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionTipsService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionTipsService.ts @@ -68,7 +68,7 @@ function caseInsensitiveGet(obj: { [key: string]: T }, key: string): T | unde export class ExtensionTipsService extends Disposable implements IExtensionTipsService { - _serviceBrand: any; + _serviceBrand: undefined; private _fileBasedRecommendations: { [id: string]: { recommendedTime: number, sources: ExtensionRecommendationSource[] }; } = Object.create(null); private _exeBasedRecommendations: { [id: string]: IExeBasedExtensionTip; } = Object.create(null); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index 31f9d115e24..de3a9ed9c3a 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -474,7 +474,7 @@ class Extensions extends Disposable { export class ExtensionsWorkbenchService extends Disposable implements IExtensionsWorkbenchService, IURLHandler { private static readonly SyncPeriod = 1000 * 60 * 60 * 12; // 12 hours - _serviceBrand: any; + _serviceBrand: undefined; private readonly localExtensions: Extensions | null = null; private readonly remoteExtensions: Extensions | null = null; diff --git a/src/vs/workbench/contrib/extensions/common/extensions.ts b/src/vs/workbench/contrib/extensions/common/extensions.ts index 47b8e916d88..126a008a66b 100644 --- a/src/vs/workbench/contrib/extensions/common/extensions.ts +++ b/src/vs/workbench/contrib/extensions/common/extensions.ts @@ -74,7 +74,7 @@ export const SERVICE_ID = 'extensionsWorkbenchService'; export const IExtensionsWorkbenchService = createDecorator(SERVICE_ID); export interface IExtensionsWorkbenchService { - _serviceBrand: any; + _serviceBrand: undefined; onChange: Event; local: IExtension[]; installed: IExtension[]; diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts index af073fb2c6f..2d05dd683bc 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts @@ -23,7 +23,7 @@ import { CommandsRegistry } from 'vs/platform/commands/common/commands'; export class ExtensionHostProfileService extends Disposable implements IExtensionHostProfileService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _onDidChangeState: Emitter = this._register(new Emitter()); public readonly onDidChangeState: Event = this._onDidChangeState.event; diff --git a/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts b/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts index b6ac536b089..47353bf7134 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts @@ -59,7 +59,7 @@ export enum ProfileSessionState { } export interface IExtensionHostProfileService { - _serviceBrand: any; + _serviceBrand: undefined; readonly onDidChangeState: Event; readonly onDidChangeLastProfile: Event; diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts index 93e10545ebd..fe1a52439e1 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts @@ -2245,7 +2245,7 @@ suite('ExtensionsActions Test', () => { extensionManagementService: remoteExtensionManagementService || createExtensionManagementService() }; return { - _serviceBrand: {}, + _serviceBrand: undefined, localExtensionManagementServer: null, remoteExtensionManagementServer, getExtensionManagementServer: (location: URI) => { @@ -2269,7 +2269,7 @@ suite('ExtensionsActions Test', () => { extensionManagementService: remoteExtensionManagementService || createExtensionManagementService() }; return { - _serviceBrand: {}, + _serviceBrand: undefined, localExtensionManagementServer, remoteExtensionManagementServer, getExtensionManagementServer: (location: URI) => { diff --git a/src/vs/workbench/contrib/externalTerminal/common/externalTerminal.ts b/src/vs/workbench/contrib/externalTerminal/common/externalTerminal.ts index 6d4dfc04f46..6bbcd810c1e 100644 --- a/src/vs/workbench/contrib/externalTerminal/common/externalTerminal.ts +++ b/src/vs/workbench/contrib/externalTerminal/common/externalTerminal.ts @@ -14,7 +14,7 @@ export interface IExternalTerminalSettings { } export interface IExternalTerminalService { - _serviceBrand: any; + _serviceBrand: undefined; openTerminal(path: string): void; runInTerminal(title: string, cwd: string, args: string[], env: { [key: string]: string | null; }, settings: IExternalTerminalSettings): Promise; } diff --git a/src/vs/workbench/contrib/externalTerminal/node/externalTerminalService.ts b/src/vs/workbench/contrib/externalTerminal/node/externalTerminalService.ts index 474e2727d73..9b57b17f958 100644 --- a/src/vs/workbench/contrib/externalTerminal/node/externalTerminalService.ts +++ b/src/vs/workbench/contrib/externalTerminal/node/externalTerminalService.ts @@ -23,7 +23,7 @@ const TERMINAL_TITLE = nls.localize('console.title', "VS Code Console"); export const DEFAULT_TERMINAL_OSX = 'Terminal.app'; export class WindowsExternalTerminalService implements IExternalTerminalService { - public _serviceBrand: any; + public _serviceBrand: undefined; private static readonly CMD = 'cmd.exe'; @@ -118,7 +118,7 @@ export class WindowsExternalTerminalService implements IExternalTerminalService } export class MacExternalTerminalService implements IExternalTerminalService { - public _serviceBrand: any; + public _serviceBrand: undefined; private static readonly OSASCRIPT = '/usr/bin/osascript'; // osascript is the AppleScript interpreter on OS X @@ -214,7 +214,7 @@ export class MacExternalTerminalService implements IExternalTerminalService { } export class LinuxExternalTerminalService implements IExternalTerminalService { - public _serviceBrand: any; + public _serviceBrand: undefined; private static readonly WAIT_MESSAGE = nls.localize('press.any.key', "Press any key to continue..."); diff --git a/src/vs/workbench/contrib/files/common/explorerService.ts b/src/vs/workbench/contrib/files/common/explorerService.ts index aff4390570c..4f6f55899a1 100644 --- a/src/vs/workbench/contrib/files/common/explorerService.ts +++ b/src/vs/workbench/contrib/files/common/explorerService.ts @@ -27,7 +27,7 @@ function getFileEventsExcludes(configurationService: IConfigurationService, root } export class ExplorerService implements IExplorerService { - _serviceBrand: any; + _serviceBrand: undefined; private static readonly EXPLORER_FILE_CHANGES_REACT_DELAY = 500; // delay in ms to react to file changes to give our internal events a chance to react first diff --git a/src/vs/workbench/contrib/files/common/files.ts b/src/vs/workbench/contrib/files/common/files.ts index 342088011f5..4d4af35e7e9 100644 --- a/src/vs/workbench/contrib/files/common/files.ts +++ b/src/vs/workbench/contrib/files/common/files.ts @@ -41,7 +41,7 @@ export interface IEditableData { } export interface IExplorerService { - _serviceBrand: any; + _serviceBrand: undefined; readonly roots: ExplorerItem[]; readonly sortOrder: SortOrder; readonly onDidChangeRoots: Event; diff --git a/src/vs/workbench/contrib/issue/electron-browser/issue.ts b/src/vs/workbench/contrib/issue/electron-browser/issue.ts index ca98eb60aca..da0a15a4e64 100644 --- a/src/vs/workbench/contrib/issue/electron-browser/issue.ts +++ b/src/vs/workbench/contrib/issue/electron-browser/issue.ts @@ -9,7 +9,7 @@ import { IssueReporterData } from 'vs/platform/issue/node/issue'; export const IWorkbenchIssueService = createDecorator('workbenchIssueService'); export interface IWorkbenchIssueService { - _serviceBrand: any; + _serviceBrand: undefined; openReporter(dataOverrides?: Partial): Promise; openProcessExplorer(): Promise; } diff --git a/src/vs/workbench/contrib/issue/electron-browser/issueService.ts b/src/vs/workbench/contrib/issue/electron-browser/issueService.ts index 5dfea6f09da..8be9212e101 100644 --- a/src/vs/workbench/contrib/issue/electron-browser/issueService.ts +++ b/src/vs/workbench/contrib/issue/electron-browser/issueService.ts @@ -16,7 +16,7 @@ import { ExtensionType } from 'vs/platform/extensions/common/extensions'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; export class WorkbenchIssueService implements IWorkbenchIssueService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @IIssueService private readonly issueService: IIssueService, diff --git a/src/vs/workbench/contrib/markers/browser/markers.ts b/src/vs/workbench/contrib/markers/browser/markers.ts index 4b27488a458..92852d75a3b 100644 --- a/src/vs/workbench/contrib/markers/browser/markers.ts +++ b/src/vs/workbench/contrib/markers/browser/markers.ts @@ -22,12 +22,12 @@ export interface IFilter { } export interface IMarkersWorkbenchService { - _serviceBrand: any; + _serviceBrand: undefined; readonly markersModel: MarkersModel; } export class MarkersWorkbenchService extends Disposable implements IMarkersWorkbenchService { - _serviceBrand: any; + _serviceBrand: undefined; readonly markersModel: MarkersModel; diff --git a/src/vs/workbench/contrib/output/browser/outputServices.ts b/src/vs/workbench/contrib/output/browser/outputServices.ts index 6e7141a041b..1a3e692d6e7 100644 --- a/src/vs/workbench/contrib/output/browser/outputServices.ts +++ b/src/vs/workbench/contrib/output/browser/outputServices.ts @@ -59,7 +59,7 @@ class OutputChannel extends Disposable implements IOutputChannel { export class OutputService extends Disposable implements IOutputService, ITextModelContentProvider { - public _serviceBrand: any; + public _serviceBrand: undefined; private channels: Map = new Map(); private activeChannelIdInStorage: string; diff --git a/src/vs/workbench/contrib/output/common/output.ts b/src/vs/workbench/contrib/output/common/output.ts index ab2b6efe73f..75abffaa04d 100644 --- a/src/vs/workbench/contrib/output/common/output.ts +++ b/src/vs/workbench/contrib/output/common/output.ts @@ -62,7 +62,7 @@ export const IOutputService = createDecorator(OUTPUT_SERVICE_ID) * The output service to manage output from the various processes running. */ export interface IOutputService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Given the channel id returns the output channel instance. diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesSearch.ts b/src/vs/workbench/contrib/preferences/browser/preferencesSearch.ts index 37de5e7766e..a6d0b93b024 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesSearch.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesSearch.ts @@ -33,7 +33,7 @@ export interface IEndpointDetails { } export class PreferencesSearchService extends Disposable implements IPreferencesSearchService { - _serviceBrand: any; + _serviceBrand: undefined; private _installedExtensions: Promise; diff --git a/src/vs/workbench/contrib/preferences/common/preferences.ts b/src/vs/workbench/contrib/preferences/common/preferences.ts index 98fd156537b..c9901f5f4eb 100644 --- a/src/vs/workbench/contrib/preferences/common/preferences.ts +++ b/src/vs/workbench/contrib/preferences/common/preferences.ts @@ -33,7 +33,7 @@ export interface IEndpointDetails { export const IPreferencesSearchService = createDecorator('preferencesSearchService'); export interface IPreferencesSearchService { - _serviceBrand: any; + _serviceBrand: undefined; getLocalSearchProvider(filter: string): ISearchProvider; getRemoteSearchProvider(filter: string, newExtensionsOnly?: boolean): ISearchProvider | undefined; diff --git a/src/vs/workbench/contrib/scm/common/scm.ts b/src/vs/workbench/contrib/scm/common/scm.ts index 53f10d56b9b..5e1afd2d5fb 100644 --- a/src/vs/workbench/contrib/scm/common/scm.ts +++ b/src/vs/workbench/contrib/scm/common/scm.ts @@ -112,7 +112,7 @@ export interface ISCMRepository extends IDisposable { export interface ISCMService { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; readonly onDidAddRepository: Event; readonly onDidRemoveRepository: Event; diff --git a/src/vs/workbench/contrib/scm/common/scmService.ts b/src/vs/workbench/contrib/scm/common/scmService.ts index e75d7df468e..d4a6da75f93 100644 --- a/src/vs/workbench/contrib/scm/common/scmService.ts +++ b/src/vs/workbench/contrib/scm/common/scmService.ts @@ -105,7 +105,7 @@ class SCMRepository implements ISCMRepository { export class SCMService implements ISCMService { - _serviceBrand: any; + _serviceBrand: undefined; private _providerIds = new Set(); private _repositories: ISCMRepository[] = []; diff --git a/src/vs/workbench/contrib/search/browser/replaceService.ts b/src/vs/workbench/contrib/search/browser/replaceService.ts index ff9c9bacaf1..502e32a326c 100644 --- a/src/vs/workbench/contrib/search/browser/replaceService.ts +++ b/src/vs/workbench/contrib/search/browser/replaceService.ts @@ -91,7 +91,7 @@ class ReplacePreviewModel extends Disposable { export class ReplaceService implements IReplaceService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @ITextFileService private readonly textFileService: ITextFileService, diff --git a/src/vs/workbench/contrib/search/common/replace.ts b/src/vs/workbench/contrib/search/common/replace.ts index f66493dc466..d3d94df9371 100644 --- a/src/vs/workbench/contrib/search/common/replace.ts +++ b/src/vs/workbench/contrib/search/common/replace.ts @@ -11,7 +11,7 @@ export const IReplaceService = createDecorator('replaceService' export interface IReplaceService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Replaces the given match in the file that match belongs to diff --git a/src/vs/workbench/contrib/search/common/searchHistoryService.ts b/src/vs/workbench/contrib/search/common/searchHistoryService.ts index 9c8e4b3b8e4..5f5496fb9d2 100644 --- a/src/vs/workbench/contrib/search/common/searchHistoryService.ts +++ b/src/vs/workbench/contrib/search/common/searchHistoryService.ts @@ -9,7 +9,7 @@ import { isEmptyObject } from 'vs/base/common/types'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; export interface ISearchHistoryService { - _serviceBrand: any; + _serviceBrand: undefined; onDidClearHistory: Event; clearHistory(): void; load(): ISearchHistoryValues; @@ -26,7 +26,7 @@ export interface ISearchHistoryValues { } export class SearchHistoryService implements ISearchHistoryService { - _serviceBrand: any; + _serviceBrand: undefined; private static readonly SEARCH_HISTORY_KEY = 'workbench.search.history'; diff --git a/src/vs/workbench/contrib/search/common/searchModel.ts b/src/vs/workbench/contrib/search/common/searchModel.ts index 1962709126f..543f8ea3a9f 100644 --- a/src/vs/workbench/contrib/search/common/searchModel.ts +++ b/src/vs/workbench/contrib/search/common/searchModel.ts @@ -1067,7 +1067,7 @@ export type RenderableMatch = BaseFolderMatch | FolderMatch | FileMatch | Match; export class SearchWorkbenchService implements ISearchWorkbenchService { - _serviceBrand: any; + _serviceBrand: undefined; private _searchModel: SearchModel; constructor(@IInstantiationService private readonly instantiationService: IInstantiationService) { @@ -1084,7 +1084,7 @@ export class SearchWorkbenchService implements ISearchWorkbenchService { export const ISearchWorkbenchService = createDecorator('searchWorkbenchService'); export interface ISearchWorkbenchService { - _serviceBrand: any; + _serviceBrand: undefined; readonly searchModel: SearchModel; } diff --git a/src/vs/workbench/contrib/snippets/browser/snippets.contribution.ts b/src/vs/workbench/contrib/snippets/browser/snippets.contribution.ts index c0f886054d5..3498f2bf3e5 100644 --- a/src/vs/workbench/contrib/snippets/browser/snippets.contribution.ts +++ b/src/vs/workbench/contrib/snippets/browser/snippets.contribution.ts @@ -15,7 +15,7 @@ export const ISnippetsService = createDecorator('snippetServic export interface ISnippetsService { - _serviceBrand: any; + _serviceBrand: undefined; getSnippetFiles(): Promise; diff --git a/src/vs/workbench/contrib/snippets/browser/snippetsService.ts b/src/vs/workbench/contrib/snippets/browser/snippetsService.ts index 11cbeea9c87..241f485ed28 100644 --- a/src/vs/workbench/contrib/snippets/browser/snippetsService.ts +++ b/src/vs/workbench/contrib/snippets/browser/snippetsService.ts @@ -127,7 +127,7 @@ function watch(service: IFileService, resource: URI, callback: (type: FileChange class SnippetsService implements ISnippetsService { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; private readonly _disposables = new DisposableStore(); private readonly _pendingWork: Promise[] = []; diff --git a/src/vs/workbench/contrib/snippets/test/browser/snippetsService.test.ts b/src/vs/workbench/contrib/snippets/test/browser/snippetsService.test.ts index 03915648eb4..298f9a71b6c 100644 --- a/src/vs/workbench/contrib/snippets/test/browser/snippetsService.test.ts +++ b/src/vs/workbench/contrib/snippets/test/browser/snippetsService.test.ts @@ -15,7 +15,7 @@ import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageCo import { CompletionContext, CompletionTriggerKind } from 'vs/editor/common/modes'; class SimpleSnippetService implements ISnippetsService { - _serviceBrand: any; + _serviceBrand: undefined; constructor(readonly snippets: Snippet[]) { } getSnippets() { diff --git a/src/vs/workbench/contrib/stats/common/workspaceStats.ts b/src/vs/workbench/contrib/stats/common/workspaceStats.ts index 7bd69fc83cd..c8205e1a076 100644 --- a/src/vs/workbench/contrib/stats/common/workspaceStats.ts +++ b/src/vs/workbench/contrib/stats/common/workspaceStats.ts @@ -12,7 +12,7 @@ export type Tags = { [index: string]: boolean | number | string | undefined }; export const IWorkspaceStatsService = createDecorator('workspaceStatsService'); export interface IWorkspaceStatsService { - _serviceBrand: any; + _serviceBrand: undefined; getTags(): Promise; diff --git a/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts b/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts index 2cb249cba47..cf904ae6e7b 100644 --- a/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts +++ b/src/vs/workbench/contrib/stats/electron-browser/workspaceStatsService.ts @@ -90,7 +90,7 @@ const PyModulesToLookFor = [ ]; export class WorkspaceStatsService implements IWorkspaceStatsService { - _serviceBrand: any; + _serviceBrand: undefined; private _tags: Tags; constructor( diff --git a/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts b/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts index 461797d862c..09b49b993f0 100644 --- a/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts +++ b/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts @@ -173,7 +173,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer private static readonly IgnoreTask010DonotShowAgain_key = 'workbench.tasks.ignoreTask010Shown'; private static CustomizationTelemetryEventName: string = 'taskService.customize'; - public _serviceBrand: any; + public _serviceBrand: undefined; public static OutputChannelId: string = 'tasks'; public static OutputChannelLabel: string = nls.localize('tasks', "Tasks"); diff --git a/src/vs/workbench/contrib/tasks/common/taskService.ts b/src/vs/workbench/contrib/tasks/common/taskService.ts index b154aed1cbe..ed0b41e5c16 100644 --- a/src/vs/workbench/contrib/tasks/common/taskService.ts +++ b/src/vs/workbench/contrib/tasks/common/taskService.ts @@ -51,7 +51,7 @@ export interface WorkspaceFolderTaskResult extends WorkspaceTaskResult { } export interface ITaskService { - _serviceBrand: any; + _serviceBrand: undefined; onDidStateChange: Event; supportsMultipleTaskExecutions: boolean; diff --git a/src/vs/workbench/contrib/terminal/browser/terminal.ts b/src/vs/workbench/contrib/terminal/browser/terminal.ts index 42e98f25547..21244047743 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminal.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminal.ts @@ -19,7 +19,7 @@ export const ITerminalInstanceService = createDecorator; diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstanceService.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstanceService.ts index 8eff2daf466..d00ad6d0f78 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstanceService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstanceService.ts @@ -17,7 +17,7 @@ let WebLinksAddon: typeof XTermWebLinksAddon; let SearchAddon: typeof XTermSearchAddon; export class TerminalInstanceService implements ITerminalInstanceService { - public _serviceBrand: any; + public _serviceBrand: undefined; private readonly _onRequestDefaultShellAndArgs = new Emitter(); public get onRequestDefaultShellAndArgs(): Event { return this._onRequestDefaultShellAndArgs.event; } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalNativeService.ts b/src/vs/workbench/contrib/terminal/browser/terminalNativeService.ts index ce98262677e..09b7a5eae37 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalNativeService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalNativeService.ts @@ -9,7 +9,7 @@ import { Emitter, Event } from 'vs/base/common/event'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; export class TerminalNativeService implements ITerminalNativeService { - public _serviceBrand: any; + public _serviceBrand: undefined; public get linuxDistro(): LinuxDistro { return LinuxDistro.Unknown; } diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index 9d582c1ad67..3f67da5ab89 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -218,7 +218,7 @@ export interface IShellLaunchConfig { } export interface ITerminalService { - _serviceBrand: any; + _serviceBrand: undefined; activeTabIndex: number; configHelper: ITerminalConfigHelper; @@ -304,7 +304,7 @@ export interface ITerminalService { * Provides access to native or electron APIs to other terminal services. */ export interface ITerminalNativeService { - _serviceBrand: any; + _serviceBrand: undefined; readonly linuxDistro: LinuxDistro; diff --git a/src/vs/workbench/contrib/terminal/common/terminalService.ts b/src/vs/workbench/contrib/terminal/common/terminalService.ts index 74d2b5728dc..97a1158107e 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalService.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalService.ts @@ -30,7 +30,7 @@ interface IExtHostReadyEntry { } export abstract class TerminalService implements ITerminalService { - public _serviceBrand: any; + public _serviceBrand: undefined; protected _isShuttingDown: boolean; protected _terminalFocusContextKey: IContextKey; diff --git a/src/vs/workbench/contrib/terminal/electron-browser/terminalInstanceService.ts b/src/vs/workbench/contrib/terminal/electron-browser/terminalInstanceService.ts index a7c3813e987..dd0874bfced 100644 --- a/src/vs/workbench/contrib/terminal/electron-browser/terminalInstanceService.ts +++ b/src/vs/workbench/contrib/terminal/electron-browser/terminalInstanceService.ts @@ -27,7 +27,7 @@ let WebLinksAddon: typeof XTermWebLinksAddon; let SearchAddon: typeof XTermSearchAddon; export class TerminalInstanceService implements ITerminalInstanceService { - public _serviceBrand: any; + public _serviceBrand: undefined; constructor( @IInstantiationService private readonly _instantiationService: IInstantiationService, diff --git a/src/vs/workbench/contrib/terminal/electron-browser/terminalNativeService.ts b/src/vs/workbench/contrib/terminal/electron-browser/terminalNativeService.ts index d8591bc6172..30a6841ac76 100644 --- a/src/vs/workbench/contrib/terminal/electron-browser/terminalNativeService.ts +++ b/src/vs/workbench/contrib/terminal/electron-browser/terminalNativeService.ts @@ -17,7 +17,7 @@ import { registerRemoteContributions } from 'vs/workbench/contrib/terminal/node/ import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; export class TerminalNativeService implements ITerminalNativeService { - public _serviceBrand: any; + public _serviceBrand: undefined; public get linuxDistro(): LinuxDistro { return linuxDistro; } diff --git a/src/vs/workbench/contrib/terminal/test/electron-browser/terminalLinkHandler.test.ts b/src/vs/workbench/contrib/terminal/test/electron-browser/terminalLinkHandler.test.ts index 1aeea762f4f..a5b8dbedfbd 100644 --- a/src/vs/workbench/contrib/terminal/test/electron-browser/terminalLinkHandler.test.ts +++ b/src/vs/workbench/contrib/terminal/test/electron-browser/terminalLinkHandler.test.ts @@ -35,7 +35,7 @@ class MockTerminalInstanceService implements ITerminalInstanceService { getDefaultShellAndArgs(): Promise<{ shell: string; args: string | string[] | undefined; }> { throw new Error('Method not implemented.'); } - _serviceBrand: any; + _serviceBrand: undefined; getXtermConstructor(): Promise { throw new Error('Method not implemented.'); } diff --git a/src/vs/workbench/contrib/webview/browser/webview.ts b/src/vs/workbench/contrib/webview/browser/webview.ts index 13d66c71fea..eaf2e79f274 100644 --- a/src/vs/workbench/contrib/webview/browser/webview.ts +++ b/src/vs/workbench/contrib/webview/browser/webview.ts @@ -24,7 +24,7 @@ export const IWebviewService = createDecorator('webviewService' * Handles the creation of webview elements. */ export interface IWebviewService { - _serviceBrand: any; + _serviceBrand: undefined; createWebview( id: string, diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts index 17d4bbe919e..b768e65d1d2 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorService.ts @@ -26,7 +26,7 @@ export interface ICreateWebViewShowOptions { } export interface IWebviewEditorService { - _serviceBrand: any; + _serviceBrand: undefined; createWebview( id: string, @@ -120,7 +120,7 @@ class RevivalPool { } export class WebviewEditorService implements IWebviewEditorService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _revivers = new Set(); private readonly _revivalPool = new RevivalPool(); diff --git a/src/vs/workbench/contrib/webview/browser/webviewService.ts b/src/vs/workbench/contrib/webview/browser/webviewService.ts index eed1445c492..21333aca8bc 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewService.ts @@ -10,7 +10,7 @@ import { DynamicWebviewEditorOverlay } from './dynamicWebviewEditorOverlay'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; export class WebviewService implements IWebviewService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @IInstantiationService private readonly _instantiationService: IInstantiationService, diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts index dedb445ab5c..49ec194e743 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts @@ -11,7 +11,7 @@ import { IWebviewService, WebviewContentOptions, WebviewEditorOverlay, WebviewEl import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement'; export class ElectronWebviewService implements IWebviewService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @IInstantiationService private readonly _instantiationService: IInstantiationService, diff --git a/src/vs/workbench/services/accessibility/node/accessibilityService.ts b/src/vs/workbench/services/accessibility/node/accessibilityService.ts index 983db9c1e67..ac9bb03fd85 100644 --- a/src/vs/workbench/services/accessibility/node/accessibilityService.ts +++ b/src/vs/workbench/services/accessibility/node/accessibilityService.ts @@ -10,11 +10,10 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { AbstractAccessibilityService } from 'vs/platform/accessibility/common/abstractAccessibilityService'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class AccessibilityService extends AbstractAccessibilityService implements IAccessibilityService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private _accessibilitySupport = AccessibilitySupport.Unknown; diff --git a/src/vs/workbench/services/activity/browser/activityService.ts b/src/vs/workbench/services/activity/browser/activityService.ts index 47aa8030056..496375b3a19 100644 --- a/src/vs/workbench/services/activity/browser/activityService.ts +++ b/src/vs/workbench/services/activity/browser/activityService.ts @@ -11,7 +11,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; export class ActivityService implements IActivityService { - public _serviceBrand: any; + public _serviceBrand: undefined; constructor( @IPanelService private readonly panelService: IPanelService, diff --git a/src/vs/workbench/services/activity/common/activity.ts b/src/vs/workbench/services/activity/common/activity.ts index 0400cd7a46d..628590befc4 100644 --- a/src/vs/workbench/services/activity/common/activity.ts +++ b/src/vs/workbench/services/activity/common/activity.ts @@ -58,7 +58,7 @@ export class ProgressBadge extends BaseBadge { } export const IActivityService = createDecorator('activityService'); export interface IActivityService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Show activity in the panel for the given panel or in the activitybar for the given viewlet or global action. diff --git a/src/vs/workbench/services/activityBar/browser/activityBarService.ts b/src/vs/workbench/services/activityBar/browser/activityBarService.ts index a3527621d21..e5badcfbb96 100644 --- a/src/vs/workbench/services/activityBar/browser/activityBarService.ts +++ b/src/vs/workbench/services/activityBar/browser/activityBarService.ts @@ -10,7 +10,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; export const IActivityBarService = createDecorator('activityBarService'); export interface IActivityBarService { - _serviceBrand: any; + _serviceBrand: undefined; /** * Show an activity in a viewlet. diff --git a/src/vs/workbench/services/backup/common/backup.ts b/src/vs/workbench/services/backup/common/backup.ts index 771cba84a18..0f13f6c8a42 100644 --- a/src/vs/workbench/services/backup/common/backup.ts +++ b/src/vs/workbench/services/backup/common/backup.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { URI } from 'vs/base/common/uri'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { ITextBufferFactory, ITextSnapshot } from 'vs/editor/common/model'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { joinPath, relativePath } from 'vs/base/common/resources'; @@ -21,7 +21,7 @@ export interface IResolvedBackup { */ export interface IBackupFileService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * Finds out if there are any backups stored. @@ -91,4 +91,4 @@ export interface IBackupFileService { export function toBackupWorkspaceResource(backupWorkspacePath: string, environmentService: IEnvironmentService): URI { return joinPath(environmentService.userRoamingDataHome, relativePath(URI.file(environmentService.userDataPath), URI.file(backupWorkspacePath))!); -} \ No newline at end of file +} diff --git a/src/vs/workbench/services/backup/common/backupFileService.ts b/src/vs/workbench/services/backup/common/backupFileService.ts index 6725c5e2bb9..4f782cf641f 100644 --- a/src/vs/workbench/services/backup/common/backupFileService.ts +++ b/src/vs/workbench/services/backup/common/backupFileService.ts @@ -19,7 +19,6 @@ import { Schemas } from 'vs/base/common/network'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { VSBuffer } from 'vs/base/common/buffer'; import { TextSnapshotReadable } from 'vs/workbench/services/textfile/common/textfiles'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export interface IBackupFilesModel { resolve(backupRoot: URI): Promise; @@ -106,7 +105,7 @@ export class BackupFilesModel implements IBackupFilesModel { export class BackupFileService implements IBackupFileService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private impl: IBackupFileService; @@ -188,7 +187,7 @@ class BackupFileServiceImpl implements IBackupFileService { private static readonly PREAMBLE_META_SEPARATOR = ' '; // using a character that is know to be escaped in a URI as separator private static readonly PREAMBLE_MAX_LENGTH = 10000; - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private backupWorkspacePath!: URI; @@ -398,7 +397,7 @@ class BackupFileServiceImpl implements IBackupFileService { export class InMemoryBackupFileService implements IBackupFileService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private backups: Map = new Map(); diff --git a/src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts b/src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts index fff264d6463..671a8064710 100644 --- a/src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts +++ b/src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts @@ -374,7 +374,7 @@ export class BulkEdit { export class BulkEditService implements IBulkEditService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @ILogService private readonly _logService: ILogService, diff --git a/src/vs/workbench/services/commands/common/commandService.ts b/src/vs/workbench/services/commands/common/commandService.ts index f1826cd036a..8bd181690e0 100644 --- a/src/vs/workbench/services/commands/common/commandService.ts +++ b/src/vs/workbench/services/commands/common/commandService.ts @@ -14,7 +14,7 @@ import { timeout } from 'vs/base/common/async'; export class CommandService extends Disposable implements ICommandService { - _serviceBrand: any; + _serviceBrand: undefined; private _extensionHostIsReady: boolean = false; private _starActivation: Promise | null; diff --git a/src/vs/workbench/services/configuration/browser/configurationService.ts b/src/vs/workbench/services/configuration/browser/configurationService.ts index 6c51f691b9e..9e2c2252f90 100644 --- a/src/vs/workbench/services/configuration/browser/configurationService.ts +++ b/src/vs/workbench/services/configuration/browser/configurationService.ts @@ -31,7 +31,7 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/ export class WorkspaceService extends Disposable implements IConfigurationService, IWorkspaceContextService { - public _serviceBrand: any; + public _serviceBrand: undefined; private workspace: Workspace; private completeWorkspaceBarrier: Barrier; diff --git a/src/vs/workbench/services/configuration/common/configurationEditingService.ts b/src/vs/workbench/services/configuration/common/configurationEditingService.ts index 90b8895fc96..d0458c430a5 100644 --- a/src/vs/workbench/services/configuration/common/configurationEditingService.ts +++ b/src/vs/workbench/services/configuration/common/configurationEditingService.ts @@ -130,7 +130,7 @@ interface ConfigurationEditingOptions extends IConfigurationEditingOptions { export class ConfigurationEditingService { - public _serviceBrand: any; + public _serviceBrand: undefined; private queue: Queue; private remoteSettingsResource: URI | null = null; diff --git a/src/vs/workbench/services/configuration/common/jsonEditing.ts b/src/vs/workbench/services/configuration/common/jsonEditing.ts index df125f412cd..d420c7fba9f 100644 --- a/src/vs/workbench/services/configuration/common/jsonEditing.ts +++ b/src/vs/workbench/services/configuration/common/jsonEditing.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { URI } from 'vs/base/common/uri'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; export const IJSONEditingService = createDecorator('jsonEditingService'); @@ -34,7 +34,7 @@ export interface IJSONValue { export interface IJSONEditingService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; write(resource: URI, value: IJSONValue, save: boolean): Promise; -} \ No newline at end of file +} diff --git a/src/vs/workbench/services/configuration/common/jsonEditingService.ts b/src/vs/workbench/services/configuration/common/jsonEditingService.ts index 9313c53ccb9..74b3363505f 100644 --- a/src/vs/workbench/services/configuration/common/jsonEditingService.ts +++ b/src/vs/workbench/services/configuration/common/jsonEditingService.ts @@ -23,7 +23,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; export class JSONEditingService implements IJSONEditingService { - public _serviceBrand: any; + public _serviceBrand: undefined; private queue: Queue; diff --git a/src/vs/workbench/services/configuration/test/electron-browser/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/electron-browser/configurationEditingService.test.ts index 2a75dca343d..11587ed86d2 100644 --- a/src/vs/workbench/services/configuration/test/electron-browser/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/electron-browser/configurationEditingService.test.ts @@ -185,7 +185,7 @@ suite('ConfigurationEditingService', () => { test('do not notify error', () => { instantiationService.stub(ITextFileService, 'isDirty', true); const target = sinon.stub(); - instantiationService.stub(INotificationService, { prompt: target, _serviceBrand: null!, notify: null!, error: null!, info: null!, warn: null!, status: null! }); + instantiationService.stub(INotificationService, { prompt: target, _serviceBrand: undefined, notify: null!, error: null!, info: null!, warn: null!, status: null! }); return testObject.writeConfiguration(EditableConfigurationTarget.USER_LOCAL, { key: 'configurationEditing.service.testSetting', value: 'value' }, { donotNotifyError: true }) .then(() => assert.fail('Should fail with ERROR_CONFIGURATION_FILE_DIRTY error.'), (error: ConfigurationEditingError) => { diff --git a/src/vs/workbench/services/configurationResolver/common/configurationResolver.ts b/src/vs/workbench/services/configurationResolver/common/configurationResolver.ts index 47281663ce9..5559fd26ea8 100644 --- a/src/vs/workbench/services/configurationResolver/common/configurationResolver.ts +++ b/src/vs/workbench/services/configurationResolver/common/configurationResolver.ts @@ -10,7 +10,7 @@ import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace'; export const IConfigurationResolverService = createDecorator('configurationResolverService'); export interface IConfigurationResolverService { - _serviceBrand: any; + _serviceBrand: undefined; resolve(folder: IWorkspaceFolder | undefined, value: string): string; resolve(folder: IWorkspaceFolder | undefined, value: string[]): string[]; diff --git a/src/vs/workbench/services/configurationResolver/common/variableResolver.ts b/src/vs/workbench/services/configurationResolver/common/variableResolver.ts index a07fb3a264d..b9284cb24ad 100644 --- a/src/vs/workbench/services/configurationResolver/common/variableResolver.ts +++ b/src/vs/workbench/services/configurationResolver/common/variableResolver.ts @@ -29,7 +29,7 @@ export class AbstractVariableResolverService implements IConfigurationResolverSe static VARIABLE_REGEXP = /\$\{(.*?)\}/g; - _serviceBrand: any; + _serviceBrand: undefined; constructor( private _context: IVariableResolveContext, diff --git a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts index 66236f88de8..49a80b64df0 100644 --- a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts +++ b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts @@ -491,7 +491,7 @@ suite('Configuration Resolver Service', () => { class MockConfigurationService implements IConfigurationService { - public _serviceBrand: any; + public _serviceBrand: undefined; public serviceId = IConfigurationService; public constructor(private configuration: any = {}) { } public inspect(key: string, overrides?: IConfigurationOverrides): any { return { value: getConfigurationValue(this.getValue(), key), default: getConfigurationValue(this.getValue(), key), user: getConfigurationValue(this.getValue(), key), workspaceFolder: undefined, folder: undefined }; } @@ -518,7 +518,7 @@ class MockConfigurationService implements IConfigurationService { class MockCommandService implements ICommandService { - public _serviceBrand: any; + public _serviceBrand: undefined; public callCount = 0; onWillExecuteCommand = () => Disposable.None; @@ -538,7 +538,7 @@ class MockCommandService implements ICommandService { } class MockQuickInputService implements IQuickInputService { - _serviceBrand: any; + _serviceBrand: undefined; public pick(picks: Promise[]> | QuickPickInput[], options?: IPickOptions & { canPickMany: true }, token?: CancellationToken): Promise; public pick(picks: Promise[]> | QuickPickInput[], options?: IPickOptions & { canPickMany: false }, token?: CancellationToken): Promise; diff --git a/src/vs/workbench/services/contextmenu/electron-browser/contextmenuService.ts b/src/vs/workbench/services/contextmenu/electron-browser/contextmenuService.ts index 37d10c4d8fd..410b7e8ed50 100644 --- a/src/vs/workbench/services/contextmenu/electron-browser/contextmenuService.ts +++ b/src/vs/workbench/services/contextmenu/electron-browser/contextmenuService.ts @@ -28,7 +28,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; export class ContextMenuService extends Disposable implements IContextMenuService { - _serviceBrand: any; + _serviceBrand: undefined; get onDidContextMenu(): Event { return this.impl.onDidContextMenu; } @@ -63,7 +63,7 @@ export class ContextMenuService extends Disposable implements IContextMenuServic class NativeContextMenuService extends Disposable implements IContextMenuService { - _serviceBrand: any; + _serviceBrand: undefined; private _onDidContextMenu = this._register(new Emitter()); readonly onDidContextMenu: Event = this._onDidContextMenu.event; diff --git a/src/vs/workbench/services/credentials/browser/credentialsService.ts b/src/vs/workbench/services/credentials/browser/credentialsService.ts index 4abc7eae62b..82fe116286e 100644 --- a/src/vs/workbench/services/credentials/browser/credentialsService.ts +++ b/src/vs/workbench/services/credentials/browser/credentialsService.ts @@ -5,7 +5,6 @@ import { ICredentialsService } from 'vs/workbench/services/credentials/common/credentials'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; export interface ICredentialsProvider { @@ -18,7 +17,7 @@ export interface ICredentialsProvider { export class BrowserCredentialsService implements ICredentialsService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private credentialsProvider: ICredentialsProvider; diff --git a/src/vs/workbench/services/credentials/common/credentials.ts b/src/vs/workbench/services/credentials/common/credentials.ts index 3aab67233a1..6fcb7dffaa0 100644 --- a/src/vs/workbench/services/credentials/common/credentials.ts +++ b/src/vs/workbench/services/credentials/common/credentials.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; export const ICredentialsService = createDecorator('ICredentialsService'); export interface ICredentialsService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; getPassword(service: string, account: string): Promise; setPassword(service: string, account: string, password: string): Promise; diff --git a/src/vs/workbench/services/credentials/node/credentialsService.ts b/src/vs/workbench/services/credentials/node/credentialsService.ts index 575517e9c6e..970a5f82034 100644 --- a/src/vs/workbench/services/credentials/node/credentialsService.ts +++ b/src/vs/workbench/services/credentials/node/credentialsService.ts @@ -6,12 +6,11 @@ import { ICredentialsService } from 'vs/workbench/services/credentials/common/credentials'; import { IdleValue } from 'vs/base/common/async'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; type KeytarModule = typeof import('keytar'); export class KeytarCredentialsService implements ICredentialsService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private readonly _keytar = new IdleValue>(() => import('keytar')); diff --git a/src/vs/workbench/services/decorations/browser/decorations.ts b/src/vs/workbench/services/decorations/browser/decorations.ts index 063ec4ee52b..214118a2c2c 100644 --- a/src/vs/workbench/services/decorations/browser/decorations.ts +++ b/src/vs/workbench/services/decorations/browser/decorations.ts @@ -40,7 +40,7 @@ export interface IResourceDecorationChangeEvent { export interface IDecorationsService { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; readonly onDidChangeDecorations: Event; diff --git a/src/vs/workbench/services/decorations/browser/decorationsService.ts b/src/vs/workbench/services/decorations/browser/decorationsService.ts index b183a2629d8..7721cb6d802 100644 --- a/src/vs/workbench/services/decorations/browser/decorationsService.ts +++ b/src/vs/workbench/services/decorations/browser/decorationsService.ts @@ -336,7 +336,7 @@ class DecorationProviderWrapper { export class FileDecorationsService implements IDecorationsService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _data = new LinkedList(); private readonly _onDidChangeDecorationsDelayed = new Emitter(); diff --git a/src/vs/workbench/services/dialogs/browser/fileDialogService.ts b/src/vs/workbench/services/dialogs/browser/fileDialogService.ts index 512d28485d8..7e9d2b3763a 100644 --- a/src/vs/workbench/services/dialogs/browser/fileDialogService.ts +++ b/src/vs/workbench/services/dialogs/browser/fileDialogService.ts @@ -23,7 +23,7 @@ import { isWeb } from 'vs/base/common/platform'; export class FileDialogService implements IFileDialogService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @IWindowService private readonly windowService: IWindowService, diff --git a/src/vs/workbench/services/dialogs/electron-browser/dialogService.ts b/src/vs/workbench/services/dialogs/electron-browser/dialogService.ts index aa507c8c7c8..af8d88245d6 100644 --- a/src/vs/workbench/services/dialogs/electron-browser/dialogService.ts +++ b/src/vs/workbench/services/dialogs/electron-browser/dialogService.ts @@ -36,7 +36,7 @@ interface IMassagedMessageBoxOptions { } export class DialogService implements IDialogService { - _serviceBrand: any; + _serviceBrand: undefined; private impl: IDialogService; @@ -70,7 +70,7 @@ export class DialogService implements IDialogService { class NativeDialogService implements IDialogService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @IWindowService private readonly windowService: IWindowService, diff --git a/src/vs/workbench/services/editor/browser/editorService.ts b/src/vs/workbench/services/editor/browser/editorService.ts index 98bf63fcd3c..9c443dbd313 100644 --- a/src/vs/workbench/services/editor/browser/editorService.ts +++ b/src/vs/workbench/services/editor/browser/editorService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IInstantiationService, ServicesAccessor, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IResourceInput, ITextEditorOptions, IEditorOptions, EditorActivation } from 'vs/platform/editor/common/editor'; import { IEditorInput, IEditor, GroupIdentifier, IFileEditorInput, IUntitledResourceInput, IResourceDiffInput, IResourceSideBySideInput, IEditorInputFactoryRegistry, Extensions as EditorExtensions, IFileInputFactory, EditorInput, SideBySideEditorInput, IEditorInputWithOptions, isEditorInputWithOptions, EditorOptions, TextEditorOptions, IEditorIdentifier, IEditorCloseEvent, ITextEditor, ITextDiffEditor, ITextSideBySideEditor, toResource, SideBySideEditor } from 'vs/workbench/common/editor'; import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; @@ -34,7 +34,7 @@ type OpenInEditorGroup = IEditorGroup | GroupIdentifier | SIDE_GROUP_TYPE | ACTI export class EditorService extends Disposable implements EditorServiceImpl { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private static CACHE: ResourceMap = new ResourceMap(); diff --git a/src/vs/workbench/services/editor/common/editorGroupsService.ts b/src/vs/workbench/services/editor/common/editorGroupsService.ts index a53e5ce507e..f7708c300e8 100644 --- a/src/vs/workbench/services/editor/common/editorGroupsService.ts +++ b/src/vs/workbench/services/editor/common/editorGroupsService.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Event } from 'vs/base/common/event'; -import { createDecorator, ServiceIdentifier, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IEditorInput, IEditor, GroupIdentifier, IEditorInputWithOptions, CloseDirection, IEditorPartOptions } from 'vs/workbench/common/editor'; import { IEditorOptions, ITextEditorOptions } from 'vs/platform/editor/common/editor'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; @@ -149,7 +149,7 @@ export const enum EditorsOrder { export interface IEditorGroupsService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * An event for when the active editor group changes. The active editor diff --git a/src/vs/workbench/services/editor/common/editorService.ts b/src/vs/workbench/services/editor/common/editorService.ts index 5664c9c8c45..13825b028f0 100644 --- a/src/vs/workbench/services/editor/common/editorService.ts +++ b/src/vs/workbench/services/editor/common/editorService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createDecorator, ServiceIdentifier, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IResourceInput, IEditorOptions, ITextEditorOptions } from 'vs/platform/editor/common/editor'; import { IEditorInput, IEditor, GroupIdentifier, IEditorInputWithOptions, IUntitledResourceInput, IResourceDiffInput, IResourceSideBySideInput, ITextEditor, ITextDiffEditor, ITextSideBySideEditor } from 'vs/workbench/common/editor'; import { Event } from 'vs/base/common/event'; @@ -46,7 +46,7 @@ export interface IVisibleEditor extends IEditor { export interface IEditorService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * Emitted when the currently active editor changes. diff --git a/src/vs/workbench/services/environment/browser/environmentService.ts b/src/vs/workbench/services/environment/browser/environmentService.ts index 7c3b6ae53e0..6895dee4694 100644 --- a/src/vs/workbench/services/environment/browser/environmentService.ts +++ b/src/vs/workbench/services/environment/browser/environmentService.ts @@ -5,7 +5,6 @@ import { IWindowConfiguration, IPath, IPathsToWaitFor } from 'vs/platform/windows/common/windows'; import { IExtensionHostDebugParams, IDebugParams, BACKUPS } from 'vs/platform/environment/common/environment'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { URI } from 'vs/base/common/uri'; import { IProcessEnvironment } from 'vs/base/common/platform'; import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; @@ -69,7 +68,7 @@ interface IBrowserWorkbenchEnvironemntConstructionOptions extends IWorkbenchCons export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironmentService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; readonly configuration: IWindowConfiguration = new BrowserWindowConfiguration(); diff --git a/src/vs/workbench/services/environment/common/environmentService.ts b/src/vs/workbench/services/environment/common/environmentService.ts index 4ed892d7b02..d0e6e0a5b18 100644 --- a/src/vs/workbench/services/environment/common/environmentService.ts +++ b/src/vs/workbench/services/environment/common/environmentService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IWindowConfiguration } from 'vs/platform/windows/common/windows'; import { IEnvironmentService, IDebugParams } from 'vs/platform/environment/common/environment'; import { IWorkbenchConstructionOptions } from 'vs/workbench/workbench.web.api'; @@ -13,7 +13,7 @@ export const IWorkbenchEnvironmentService = createDecorator; + _serviceBrand: undefined; readonly configuration: IWindowConfiguration; diff --git a/src/vs/workbench/services/environment/node/environmentService.ts b/src/vs/workbench/services/environment/node/environmentService.ts index bedcfdc9995..24320328eb6 100644 --- a/src/vs/workbench/services/environment/node/environmentService.ts +++ b/src/vs/workbench/services/environment/node/environmentService.ts @@ -10,13 +10,12 @@ import { memoize } from 'vs/base/common/decorators'; import { URI } from 'vs/base/common/uri'; import { Schemas } from 'vs/base/common/network'; import { toBackupWorkspaceResource } from 'vs/workbench/services/backup/common/backup'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { join } from 'vs/base/common/path'; import { IDebugParams } from 'vs/platform/environment/common/environment'; export class WorkbenchEnvironmentService extends EnvironmentService implements IWorkbenchEnvironmentService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; readonly webviewResourceRoot = 'vscode-resource:{{resource}}'; readonly webviewCspSource = 'vscode-resource:'; diff --git a/src/vs/workbench/services/extensionManagement/common/extensionEnablementService.ts b/src/vs/workbench/services/extensionManagement/common/extensionEnablementService.ts index 3ceb5b20856..903b0122666 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionEnablementService.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionEnablementService.ts @@ -24,7 +24,7 @@ const ENABLED_EXTENSIONS_STORAGE_PATH = 'extensionsIdentifiers/enabled'; export class ExtensionEnablementService extends Disposable implements IExtensionEnablementService { - _serviceBrand: any; + _serviceBrand: undefined; private _onEnablementChanged = new Emitter(); public readonly onEnablementChanged: Event = this._onEnablementChanged.event; diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts index bd16a2ca85b..88dbaf94d49 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts @@ -19,7 +19,7 @@ export interface IExtensionManagementServer { } export interface IExtensionManagementServerService { - _serviceBrand: any; + _serviceBrand: undefined; readonly localExtensionManagementServer: IExtensionManagementServer | null; readonly remoteExtensionManagementServer: IExtensionManagementServer | null; getExtensionManagementServer(location: URI): IExtensionManagementServer | null; @@ -37,7 +37,7 @@ export const enum EnablementState { export const IExtensionEnablementService = createDecorator('extensionEnablementService'); export interface IExtensionEnablementService { - _serviceBrand: any; + _serviceBrand: undefined; readonly allUserExtensionsDisabled: boolean; @@ -97,7 +97,7 @@ export interface IExtensionRecommendation { export const IExtensionTipsService = createDecorator('extensionTipsService'); export interface IExtensionTipsService { - _serviceBrand: any; + _serviceBrand: undefined; getAllRecommendationsWithReason(): { [id: string]: { reasonId: ExtensionRecommendationReason, reasonText: string }; }; getFileBasedRecommendations(): IExtensionRecommendation[]; getOtherRecommendations(): Promise; diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts index 0a48d2989fb..c626a20c27e 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts @@ -15,7 +15,7 @@ import { ILabelService } from 'vs/platform/label/common/label'; export class ExtensionManagementServerService implements IExtensionManagementServerService { - _serviceBrand: any; + _serviceBrand: undefined; readonly localExtensionManagementServer: IExtensionManagementServer | null = null; readonly remoteExtensionManagementServer: IExtensionManagementServer | null = null; diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts index f1831bdbc19..1efb02f782d 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts @@ -22,7 +22,7 @@ import { IDownloadService } from 'vs/platform/download/common/download'; export class ExtensionManagementService extends Disposable implements IExtensionManagementService { - _serviceBrand: any; + _serviceBrand: undefined; readonly onInstallExtension: Event; readonly onDidInstallExtension: Event; diff --git a/src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts b/src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts index c3921f17a54..91c7ff07bce 100644 --- a/src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts +++ b/src/vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService.ts @@ -24,7 +24,7 @@ const localExtensionManagementServerAuthority: string = 'vscode-local'; export class ExtensionManagementServerService implements IExtensionManagementServerService { - _serviceBrand: any; + _serviceBrand: undefined; readonly localExtensionManagementServer: IExtensionManagementServer; readonly remoteExtensionManagementServer: IExtensionManagementServer | null = null; diff --git a/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts b/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts index 4536a5ad507..7c4c8ad2464 100644 --- a/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts +++ b/src/vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test.ts @@ -560,7 +560,7 @@ function aMultiExtensionManagementServerService(instantiationService: TestInstan extensionManagementService: instantiationService.get(IExtensionManagementService) }; return { - _serviceBrand: {}, + _serviceBrand: undefined, localExtensionManagementServer, remoteExtensionManagementServer, getExtensionManagementServer: (location: URI) => { diff --git a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts index 6445a03a6e6..bcfa887b1a4 100644 --- a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts +++ b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts @@ -30,7 +30,7 @@ const NO_OP_VOID_PROMISE = Promise.resolve(undefined); export abstract class AbstractExtensionService extends Disposable implements IExtensionService { - public _serviceBrand: any; + public _serviceBrand: undefined; protected readonly _onDidRegisterExtensions: Emitter = this._register(new Emitter()); public readonly onDidRegisterExtensions = this._onDidRegisterExtensions.event; diff --git a/src/vs/workbench/services/extensions/common/extensions.ts b/src/vs/workbench/services/extensions/common/extensions.ts index 7c26e61e181..b127082c0c3 100644 --- a/src/vs/workbench/services/extensions/common/extensions.ts +++ b/src/vs/workbench/services/extensions/common/extensions.ts @@ -130,7 +130,7 @@ export interface IResponsiveStateChangeEvent { } export interface IExtensionService { - _serviceBrand: any; + _serviceBrand: undefined; /** * An event emitted when extensions are registered after their extension points got handled. @@ -258,7 +258,7 @@ export function toExtension(extensionDescription: IExtensionDescription): IExten export class NullExtensionService implements IExtensionService { - _serviceBrand: any; + _serviceBrand: undefined; onDidRegisterExtensions: Event = Event.None; onDidChangeExtensionsStatus: Event = Event.None; onDidChangeExtensions: Event = Event.None; diff --git a/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts b/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts index 22f8c02a13c..8b53e669f63 100644 --- a/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts +++ b/src/vs/workbench/services/extensions/common/inactiveExtensionUrlHandler.ts @@ -37,7 +37,7 @@ function isExtensionId(value: string): boolean { export const IExtensionUrlHandler = createDecorator('inactiveExtensionUrlHandler'); export interface IExtensionUrlHandler { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; registerExtensionHandler(extensionId: ExtensionIdentifier, handler: IURLHandler): void; unregisterExtensionHandler(extensionId: ExtensionIdentifier): void; } @@ -53,7 +53,7 @@ export interface IExtensionUrlHandler { */ class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { - readonly _serviceBrand: any; + readonly _serviceBrand: undefined; private extensionHandlers = new Map(); private uriBuffer = new Map(); diff --git a/src/vs/workbench/services/extensions/common/staticExtensions.ts b/src/vs/workbench/services/extensions/common/staticExtensions.ts index 1d5e3f57b05..8eebb7aa782 100644 --- a/src/vs/workbench/services/extensions/common/staticExtensions.ts +++ b/src/vs/workbench/services/extensions/common/staticExtensions.ts @@ -12,13 +12,13 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/ export const IStaticExtensionsService = createDecorator('IStaticExtensionsService'); export interface IStaticExtensionsService { - _serviceBrand: any; + _serviceBrand: undefined; getExtensions(): Promise; } export class StaticExtensionsService implements IStaticExtensionsService { - _serviceBrand: any; + _serviceBrand: undefined; private readonly _descriptions: IExtensionDescription[] = []; diff --git a/src/vs/workbench/services/extensions/electron-browser/remoteExtensionManagementIpc.ts b/src/vs/workbench/services/extensions/electron-browser/remoteExtensionManagementIpc.ts index f94d89adb16..f0ce35d8a34 100644 --- a/src/vs/workbench/services/extensions/electron-browser/remoteExtensionManagementIpc.ts +++ b/src/vs/workbench/services/extensions/electron-browser/remoteExtensionManagementIpc.ts @@ -22,7 +22,7 @@ import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagemen export class RemoteExtensionManagementChannelClient extends ExtensionManagementChannelClient { - _serviceBrand: any; + _serviceBrand: undefined; constructor( channel: IChannel, diff --git a/src/vs/workbench/services/extensions/worker/extensionHostWorker.ts b/src/vs/workbench/services/extensions/worker/extensionHostWorker.ts index 7f30bf8d7b2..bda2aa21f4e 100644 --- a/src/vs/workbench/services/extensions/worker/extensionHostWorker.ts +++ b/src/vs/workbench/services/extensions/worker/extensionHostWorker.ts @@ -38,7 +38,7 @@ self.caches.open = () => console.trace(`'indexedDB.caches' has been blocked`); //#endregion --- const hostUtil = new class implements IHostUtils { - _serviceBrand: any; + _serviceBrand: undefined; exit(_code?: number | undefined): void { nativeClose(); } diff --git a/src/vs/workbench/services/history/browser/history.ts b/src/vs/workbench/services/history/browser/history.ts index 23ad652c71c..70c64a2895c 100644 --- a/src/vs/workbench/services/history/browser/history.ts +++ b/src/vs/workbench/services/history/browser/history.ts @@ -24,7 +24,7 @@ import { getCodeEditor, ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { getExcludes, ISearchConfiguration } from 'vs/workbench/services/search/common/search'; import { IExpression } from 'vs/base/common/glob'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ResourceGlobMatcher } from 'vs/workbench/common/resources'; import { EditorServiceImpl } from 'vs/workbench/browser/parts/editor/editor'; import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService'; @@ -99,7 +99,7 @@ interface IRecentlyClosedFile { export class HistoryService extends Disposable implements IHistoryService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private static readonly STORAGE_KEY = 'history.entries'; private static readonly MAX_HISTORY_ITEMS = 200; diff --git a/src/vs/workbench/services/history/common/history.ts b/src/vs/workbench/services/history/common/history.ts index ac9830923f9..89b3e4a76c0 100644 --- a/src/vs/workbench/services/history/common/history.ts +++ b/src/vs/workbench/services/history/common/history.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IResourceInput } from 'vs/platform/editor/common/editor'; import { IEditorInput } from 'vs/workbench/common/editor'; import { URI } from 'vs/base/common/uri'; @@ -12,7 +12,7 @@ export const IHistoryService = createDecorator('historyService' export interface IHistoryService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * Re-opens the last closed editor if any. diff --git a/src/vs/workbench/services/integrity/browser/integrityService.ts b/src/vs/workbench/services/integrity/browser/integrityService.ts index 5ddf9d5b3f9..0d0e5681cef 100644 --- a/src/vs/workbench/services/integrity/browser/integrityService.ts +++ b/src/vs/workbench/services/integrity/browser/integrityService.ts @@ -5,11 +5,10 @@ import { IIntegrityService, IntegrityTestResult } from 'vs/workbench/services/integrity/common/integrity'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class BrowserIntegrityServiceImpl implements IIntegrityService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; async isPure(): Promise { return { isPure: true, proof: [] }; diff --git a/src/vs/workbench/services/integrity/common/integrity.ts b/src/vs/workbench/services/integrity/common/integrity.ts index 37c0fe97ed6..07d34aef076 100644 --- a/src/vs/workbench/services/integrity/common/integrity.ts +++ b/src/vs/workbench/services/integrity/common/integrity.ts @@ -21,7 +21,7 @@ export interface IntegrityTestResult { } export interface IIntegrityService { - _serviceBrand: any; + _serviceBrand: undefined; isPure(): Promise; } diff --git a/src/vs/workbench/services/integrity/node/integrityService.ts b/src/vs/workbench/services/integrity/node/integrityService.ts index 36c80d8c148..e4e84b69c51 100644 --- a/src/vs/workbench/services/integrity/node/integrityService.ts +++ b/src/vs/workbench/services/integrity/node/integrityService.ts @@ -14,7 +14,6 @@ import product from 'vs/platform/product/node/product'; import { INotificationService } from 'vs/platform/notification/common/notification'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { IOpenerService } from 'vs/platform/opener/common/opener'; interface IStorageData { @@ -57,7 +56,7 @@ class IntegrityStorage { export class IntegrityServiceImpl implements IIntegrityService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private _storage: IntegrityStorage; private _isPurePromise: Promise; diff --git a/src/vs/workbench/services/keybinding/browser/keymapService.ts b/src/vs/workbench/services/keybinding/browser/keymapService.ts index e3744643efd..988fd218f35 100644 --- a/src/vs/workbench/services/keybinding/browser/keymapService.ts +++ b/src/vs/workbench/services/keybinding/browser/keymapService.ts @@ -495,7 +495,7 @@ class UserKeyboardLayout extends Disposable { } class BrowserKeymapService extends Disposable implements IKeymapService { - public _serviceBrand: any; + public _serviceBrand: undefined; private readonly _onDidChangeKeyboardMapper = new Emitter(); public readonly onDidChangeKeyboardMapper: Event = this._onDidChangeKeyboardMapper.event; diff --git a/src/vs/workbench/services/keybinding/common/keybindingEditing.ts b/src/vs/workbench/services/keybinding/common/keybindingEditing.ts index b3d4e77869f..a267b3a2634 100644 --- a/src/vs/workbench/services/keybinding/common/keybindingEditing.ts +++ b/src/vs/workbench/services/keybinding/common/keybindingEditing.ts @@ -20,7 +20,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IFileService } from 'vs/platform/files/common/files'; -import { ServiceIdentifier, createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IUserFriendlyKeybinding } from 'vs/platform/keybinding/common/keybinding'; import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; @@ -30,7 +30,7 @@ export const IKeybindingEditingService = createDecorator; + _serviceBrand: undefined; editKeybinding(keybindingItem: ResolvedKeybindingItem, key: string, when: string | undefined): Promise; @@ -41,7 +41,7 @@ export interface IKeybindingEditingService { export class KeybindingsEditingService extends Disposable implements IKeybindingEditingService { - public _serviceBrand: any; + public _serviceBrand: undefined; private queue: Queue; private resource: URI = this.environmentService.keybindingsResource; @@ -259,4 +259,4 @@ export class KeybindingsEditingService extends Disposable implements IKeybinding } } -registerSingleton(IKeybindingEditingService, KeybindingsEditingService, true); \ No newline at end of file +registerSingleton(IKeybindingEditingService, KeybindingsEditingService, true); diff --git a/src/vs/workbench/services/keybinding/common/keymapInfo.ts b/src/vs/workbench/services/keybinding/common/keymapInfo.ts index 5282815cd9a..b521f80faa6 100644 --- a/src/vs/workbench/services/keybinding/common/keymapInfo.ts +++ b/src/vs/workbench/services/keybinding/common/keymapInfo.ts @@ -5,7 +5,7 @@ import { Event } from 'vs/base/common/event'; import { isWindows, isLinux } from 'vs/base/common/platform'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { DispatchConfig } from 'vs/workbench/services/keybinding/common/dispatchConfig'; import { IKeyboardMapper } from 'vs/workbench/services/keybinding/common/keyboardMapper'; import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; @@ -94,7 +94,7 @@ export type IKeyboardLayoutInfo = (IWindowsKeyboardLayoutInfo | ILinuxKeyboardLa export const IKeymapService = createDecorator('keymapService'); export interface IKeymapService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; onDidChangeKeyboardMapper: Event; getKeyboardMapper(dispatchConfig: DispatchConfig): IKeyboardMapper; getCurrentKeyboardLayout(): IKeyboardLayoutInfo | null; diff --git a/src/vs/workbench/services/keybinding/electron-browser/nativeKeymapService.ts b/src/vs/workbench/services/keybinding/electron-browser/nativeKeymapService.ts index 475c881af9f..757f632c3a7 100644 --- a/src/vs/workbench/services/keybinding/electron-browser/nativeKeymapService.ts +++ b/src/vs/workbench/services/keybinding/electron-browser/nativeKeymapService.ts @@ -132,7 +132,7 @@ export class KeyboardMapperFactory { } class NativeKeymapService extends Disposable implements IKeymapService { - public _serviceBrand: any; + public _serviceBrand: undefined; private readonly _onDidChangeKeyboardMapper = new Emitter(); public readonly onDidChangeKeyboardMapper: Event = this._onDidChangeKeyboardMapper.event; diff --git a/src/vs/workbench/services/label/common/labelService.ts b/src/vs/workbench/services/label/common/labelService.ts index f383c481e29..4f138914750 100644 --- a/src/vs/workbench/services/label/common/labelService.ts +++ b/src/vs/workbench/services/label/common/labelService.ts @@ -92,7 +92,7 @@ class ResourceLabelFormattersHandler implements IWorkbenchContribution { Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution(ResourceLabelFormattersHandler, LifecyclePhase.Restored); export class LabelService implements ILabelService { - _serviceBrand: any; + _serviceBrand: undefined; private formatters: ResourceLabelFormatter[] = []; private readonly _onDidChangeFormatters = new Emitter(); diff --git a/src/vs/workbench/services/layout/browser/layoutService.ts b/src/vs/workbench/services/layout/browser/layoutService.ts index d59582f7421..ef47e1a1551 100644 --- a/src/vs/workbench/services/layout/browser/layoutService.ts +++ b/src/vs/workbench/services/layout/browser/layoutService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ServiceIdentifier, createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { Event } from 'vs/base/common/event'; import { MenuBarVisibility } from 'vs/platform/windows/common/windows'; import { ILayoutService } from 'vs/platform/layout/browser/layoutService'; @@ -34,7 +34,7 @@ export interface ILayoutOptions { export interface IWorkbenchLayoutService extends ILayoutService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * Emits when the visibility of the title bar changes. diff --git a/src/vs/workbench/services/notification/common/notificationService.ts b/src/vs/workbench/services/notification/common/notificationService.ts index e701a079c29..552e4e9fc51 100644 --- a/src/vs/workbench/services/notification/common/notificationService.ts +++ b/src/vs/workbench/services/notification/common/notificationService.ts @@ -9,13 +9,12 @@ import { INotificationsModel, NotificationsModel, ChoiceAction } from 'vs/workbe import { Disposable, DisposableStore, IDisposable } from 'vs/base/common/lifecycle'; import { Event } from 'vs/base/common/event'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { IAction, Action } from 'vs/base/common/actions'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; export class NotificationService extends Disposable implements INotificationService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private _model: INotificationsModel = this._register(new NotificationsModel()); diff --git a/src/vs/workbench/services/output/common/outputChannelModel.ts b/src/vs/workbench/services/output/common/outputChannelModel.ts index f92624f44e8..f3a8ec8ad94 100644 --- a/src/vs/workbench/services/output/common/outputChannelModel.ts +++ b/src/vs/workbench/services/output/common/outputChannelModel.ts @@ -31,7 +31,7 @@ export interface IOutputChannelModel extends IDisposable { export const IOutputChannelModelService = createDecorator('outputChannelModelService'); export interface IOutputChannelModelService { - _serviceBrand: any; + _serviceBrand: undefined; createOutputChannelModel(id: string, modelUri: URI, mimeType: string, file?: URI): IOutputChannelModel; diff --git a/src/vs/workbench/services/output/common/outputChannelModelService.ts b/src/vs/workbench/services/output/common/outputChannelModelService.ts index 6aceb81e99e..c7a9060afb3 100644 --- a/src/vs/workbench/services/output/common/outputChannelModelService.ts +++ b/src/vs/workbench/services/output/common/outputChannelModelService.ts @@ -7,7 +7,7 @@ import { IOutputChannelModelService, AsbtractOutputChannelModelService } from 'v import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; export class OutputChannelModelService extends AsbtractOutputChannelModelService implements IOutputChannelModelService { - _serviceBrand: any; + _serviceBrand: undefined; } registerSingleton(IOutputChannelModelService, OutputChannelModelService); diff --git a/src/vs/workbench/services/output/node/outputChannelModelService.ts b/src/vs/workbench/services/output/node/outputChannelModelService.ts index e841597dcac..6e3c6e3e905 100644 --- a/src/vs/workbench/services/output/node/outputChannelModelService.ts +++ b/src/vs/workbench/services/output/node/outputChannelModelService.ts @@ -198,7 +198,7 @@ class DelegatedOutputChannelModel extends Disposable implements IOutputChannelMo export class OutputChannelModelService extends AsbtractOutputChannelModelService implements IOutputChannelModelService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @IInstantiationService instantiationService: IInstantiationService, diff --git a/src/vs/workbench/services/panel/common/panelService.ts b/src/vs/workbench/services/panel/common/panelService.ts index 9e957d61747..d686236e30a 100644 --- a/src/vs/workbench/services/panel/common/panelService.ts +++ b/src/vs/workbench/services/panel/common/panelService.ts @@ -5,7 +5,7 @@ import { Event } from 'vs/base/common/event'; import { IPanel } from 'vs/workbench/common/panel'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IBadge } from 'vs/workbench/services/activity/common/activity'; import { IDisposable } from 'vs/base/common/lifecycle'; import { IProgressIndicator } from 'vs/platform/progress/common/progress'; @@ -20,7 +20,7 @@ export interface IPanelIdentifier { export interface IPanelService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; readonly onDidPanelOpen: Event<{ panel: IPanel, focus: boolean }>; readonly onDidPanelClose: Event; diff --git a/src/vs/workbench/services/preferences/browser/preferencesService.ts b/src/vs/workbench/services/preferences/browser/preferencesService.ts index c95a6138545..fb67e8aa447 100644 --- a/src/vs/workbench/services/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/services/preferences/browser/preferencesService.ts @@ -44,7 +44,7 @@ const emptyEditableSettingsContent = '{\n}'; export class PreferencesService extends Disposable implements IPreferencesService { - _serviceBrand: any; + _serviceBrand: undefined; private lastOpenedSettingsInput: PreferencesEditorInput | null = null; diff --git a/src/vs/workbench/services/preferences/common/preferences.ts b/src/vs/workbench/services/preferences/common/preferences.ts index 239a7409001..14572bc2df7 100644 --- a/src/vs/workbench/services/preferences/common/preferences.ts +++ b/src/vs/workbench/services/preferences/common/preferences.ts @@ -183,7 +183,7 @@ export interface IKeybindingsEditorModel extends IPreferencesEditorModel { export const IPreferencesService = createDecorator('preferencesService'); export interface IPreferencesService { - _serviceBrand: any; + _serviceBrand: undefined; userSettingsResource: URI; workspaceSettingsResource: URI | null; diff --git a/src/vs/workbench/services/progress/browser/editorProgressService.ts b/src/vs/workbench/services/progress/browser/editorProgressService.ts index 73ecabab26a..b05c6305b84 100644 --- a/src/vs/workbench/services/progress/browser/editorProgressService.ts +++ b/src/vs/workbench/services/progress/browser/editorProgressService.ts @@ -3,11 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IEditorProgressService } from 'vs/platform/progress/common/progress'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { ProgressBarIndicator } from 'vs/workbench/services/progress/browser/progressIndicator'; export class EditorProgressService extends ProgressBarIndicator { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; } diff --git a/src/vs/workbench/services/progress/browser/progressService.ts b/src/vs/workbench/services/progress/browser/progressService.ts index ce204f1c0f6..220006ccbd1 100644 --- a/src/vs/workbench/services/progress/browser/progressService.ts +++ b/src/vs/workbench/services/progress/browser/progressService.ts @@ -23,12 +23,11 @@ import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { EventHelper } from 'vs/base/browser/dom'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; export class ProgressService extends Disposable implements IProgressService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private readonly stack: [IProgressOptions, Progress][] = []; private readonly globalStatusEntry = this._register(new MutableDisposable()); diff --git a/src/vs/workbench/services/remote/common/abstractRemoteAgentService.ts b/src/vs/workbench/services/remote/common/abstractRemoteAgentService.ts index 977a224418b..c889524ee61 100644 --- a/src/vs/workbench/services/remote/common/abstractRemoteAgentService.ts +++ b/src/vs/workbench/services/remote/common/abstractRemoteAgentService.ts @@ -24,7 +24,7 @@ import { ILogService } from 'vs/platform/log/common/log'; export abstract class AbstractRemoteAgentService extends Disposable { - _serviceBrand: any; + _serviceBrand: undefined; private _environment: Promise | null; diff --git a/src/vs/workbench/services/remote/common/remoteAgentService.ts b/src/vs/workbench/services/remote/common/remoteAgentService.ts index fdd61483fd5..1cda189b53e 100644 --- a/src/vs/workbench/services/remote/common/remoteAgentService.ts +++ b/src/vs/workbench/services/remote/common/remoteAgentService.ts @@ -15,7 +15,7 @@ export const RemoteExtensionLogFileName = 'remoteagent'; export const IRemoteAgentService = createDecorator('remoteAgentService'); export interface IRemoteAgentService { - _serviceBrand: any; + _serviceBrand: undefined; readonly socketFactory: ISocketFactory; diff --git a/src/vs/workbench/services/remote/node/tunnelService.ts b/src/vs/workbench/services/remote/node/tunnelService.ts index 1cab2997a37..1a6ca2412fa 100644 --- a/src/vs/workbench/services/remote/node/tunnelService.ts +++ b/src/vs/workbench/services/remote/node/tunnelService.ts @@ -86,7 +86,7 @@ class NodeRemoteTunnel extends Disposable implements RemoteTunnel { } export class TunnelService implements ITunnelService { - _serviceBrand: any; + _serviceBrand: undefined; public constructor( @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService, diff --git a/src/vs/workbench/services/search/common/search.ts b/src/vs/workbench/services/search/common/search.ts index da4e3edb333..bb47b117377 100644 --- a/src/vs/workbench/services/search/common/search.ts +++ b/src/vs/workbench/services/search/common/search.ts @@ -32,7 +32,7 @@ export const ISearchService = createDecorator('searchService'); * A service that enables to search for files or with in files. */ export interface ISearchService { - _serviceBrand: any; + _serviceBrand: undefined; textSearch(query: ITextQuery, token?: CancellationToken, onProgress?: (result: ISearchProgressItem) => void): Promise; fileSearch(query: IFileQuery, token?: CancellationToken): Promise; clearCache(cacheKey: string): Promise; diff --git a/src/vs/workbench/services/search/common/searchService.ts b/src/vs/workbench/services/search/common/searchService.ts index 8325ceb8317..c6c01de1548 100644 --- a/src/vs/workbench/services/search/common/searchService.ts +++ b/src/vs/workbench/services/search/common/searchService.ts @@ -21,11 +21,10 @@ import { deserializeSearchError, FileMatch, ICachedSearchStats, IFileMatch, IFil import { addContextToEditorMatches, editorMatchesToTextSearchResults } from 'vs/workbench/services/search/common/searchHelpers'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class SearchService extends Disposable implements ISearchService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; protected diskSearch: ISearchResultProvider; private readonly fileSearchProviders = new Map(); diff --git a/src/vs/workbench/services/telemetry/browser/telemetryService.ts b/src/vs/workbench/services/telemetry/browser/telemetryService.ts index eac9dcfb1d0..68069d6746c 100644 --- a/src/vs/workbench/services/telemetry/browser/telemetryService.ts +++ b/src/vs/workbench/services/telemetry/browser/telemetryService.ts @@ -66,7 +66,7 @@ export class WebTelemetryAppender implements ITelemetryAppender { export class TelemetryService extends Disposable implements ITelemetryService { - _serviceBrand: any; + _serviceBrand: undefined; private impl: ITelemetryService; diff --git a/src/vs/workbench/services/telemetry/electron-browser/telemetryService.ts b/src/vs/workbench/services/telemetry/electron-browser/telemetryService.ts index b9dd1dd7b4a..002216c6092 100644 --- a/src/vs/workbench/services/telemetry/electron-browser/telemetryService.ts +++ b/src/vs/workbench/services/telemetry/electron-browser/telemetryService.ts @@ -20,7 +20,7 @@ import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/pla export class TelemetryService extends Disposable implements ITelemetryService { - _serviceBrand: any; + _serviceBrand: undefined; private impl: ITelemetryService; diff --git a/src/vs/workbench/services/textMate/browser/abstractTextMateService.ts b/src/vs/workbench/services/textMate/browser/abstractTextMateService.ts index 935cde35146..0fb7101230f 100644 --- a/src/vs/workbench/services/textMate/browser/abstractTextMateService.ts +++ b/src/vs/workbench/services/textMate/browser/abstractTextMateService.ts @@ -31,7 +31,7 @@ import { IValidGrammarDefinition, IValidEmbeddedLanguagesMap, IValidTokenTypeMap import { TMGrammarFactory } from 'vs/workbench/services/textMate/common/TMGrammarFactory'; export abstract class AbstractTextMateService extends Disposable implements ITextMateService { - public _serviceBrand: any; + public _serviceBrand: undefined; private readonly _onDidEncounterLanguage: Emitter = this._register(new Emitter()); public readonly onDidEncounterLanguage: Event = this._onDidEncounterLanguage.event; diff --git a/src/vs/workbench/services/textMate/common/textMateService.ts b/src/vs/workbench/services/textMate/common/textMateService.ts index 34bd21a09e8..2b61bb56cb8 100644 --- a/src/vs/workbench/services/textMate/common/textMateService.ts +++ b/src/vs/workbench/services/textMate/common/textMateService.ts @@ -10,7 +10,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' export const ITextMateService = createDecorator('textMateService'); export interface ITextMateService { - _serviceBrand: any; + _serviceBrand: undefined; onDidEncounterLanguage: Event; diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index 74ebec020c7..539de46fea9 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -22,7 +22,7 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/ import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { UntitledEditorModel } from 'vs/workbench/common/editor/untitledEditorModel'; import { TextFileEditorModelManager } from 'vs/workbench/services/textfile/common/textFileEditorModelManager'; -import { IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ResourceMap } from 'vs/base/common/map'; import { Schemas } from 'vs/base/common/network'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; @@ -46,7 +46,7 @@ import { PLAINTEXT_MODE_ID } from 'vs/editor/common/modes/modesRegistry'; */ export abstract class TextFileService extends Disposable implements ITextFileService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private readonly _onAutoSaveConfigurationChange: Emitter = this._register(new Emitter()); readonly onAutoSaveConfigurationChange: Event = this._onAutoSaveConfigurationChange.event; diff --git a/src/vs/workbench/services/textfile/common/textResourcePropertiesService.ts b/src/vs/workbench/services/textfile/common/textResourcePropertiesService.ts index 653da4a83c4..940794852e2 100644 --- a/src/vs/workbench/services/textfile/common/textResourcePropertiesService.ts +++ b/src/vs/workbench/services/textfile/common/textResourcePropertiesService.ts @@ -13,11 +13,10 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { IRemoteAgentEnvironment } from 'vs/platform/remote/common/remoteAgentEnvironment'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class TextResourcePropertiesService implements ITextResourcePropertiesService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private remoteEnvironment: IRemoteAgentEnvironment | null = null; diff --git a/src/vs/workbench/services/textfile/common/textfiles.ts b/src/vs/workbench/services/textfile/common/textfiles.ts index 4f770994393..7a624c0761d 100644 --- a/src/vs/workbench/services/textfile/common/textfiles.ts +++ b/src/vs/workbench/services/textfile/common/textfiles.ts @@ -8,7 +8,7 @@ import { Event } from 'vs/base/common/event'; import { IDisposable } from 'vs/base/common/lifecycle'; import { IEncodingSupport, ConfirmResult, IRevertOptions, IModeSupport } from 'vs/workbench/common/editor'; import { IBaseStatWithMetadata, IFileStatWithMetadata, IReadFileOptions, IWriteFileOptions, FileOperationError, FileOperationResult } from 'vs/platform/files/common/files'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { ITextBufferFactory, ITextModel, ITextSnapshot } from 'vs/editor/common/model'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; @@ -19,7 +19,7 @@ export const ITextFileService = createDecorator('textFileServi export interface ITextFileService extends IDisposable { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; readonly onWillMove: Event; @@ -253,7 +253,7 @@ export const enum ModelState { PENDING_SAVE, /** - * A model is marked for being saved after a specific timeout. + * A model is marked for being saved after a specific timeout. */ PENDING_AUTO_SAVE, diff --git a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts index a2f3269ecd0..aaa60c08768 100644 --- a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts +++ b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts @@ -121,7 +121,7 @@ class ResourceModelCollection extends ReferenceCollection; getColorTheme(): IColorTheme; getColorThemes(): Promise; diff --git a/src/vs/workbench/services/timer/electron-browser/timerService.ts b/src/vs/workbench/services/timer/electron-browser/timerService.ts index 139822af63b..3bf0c2fee4e 100644 --- a/src/vs/workbench/services/timer/electron-browser/timerService.ts +++ b/src/vs/workbench/services/timer/electron-browser/timerService.ts @@ -297,13 +297,13 @@ export interface IStartupMetrics { } export interface ITimerService { - _serviceBrand: any; + _serviceBrand: undefined; readonly startupMetrics: Promise; } class TimerService implements ITimerService { - _serviceBrand: any; + _serviceBrand: undefined; private _startupMetrics?: Promise; diff --git a/src/vs/workbench/services/title/common/titleService.ts b/src/vs/workbench/services/title/common/titleService.ts index 1745a6a2449..b3476f94deb 100644 --- a/src/vs/workbench/services/title/common/titleService.ts +++ b/src/vs/workbench/services/title/common/titleService.ts @@ -14,7 +14,7 @@ export interface ITitleProperties { } export interface ITitleService { - _serviceBrand: any; + _serviceBrand: undefined; /** * An event when the menubar visibility changes. diff --git a/src/vs/workbench/services/untitled/common/untitledEditorService.ts b/src/vs/workbench/services/untitled/common/untitledEditorService.ts index 3571e4f6c0a..ca8614f26aa 100644 --- a/src/vs/workbench/services/untitled/common/untitledEditorService.ts +++ b/src/vs/workbench/services/untitled/common/untitledEditorService.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { URI } from 'vs/base/common/uri'; -import { createDecorator, IInstantiationService, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import * as arrays from 'vs/base/common/arrays'; import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; import { IFilesConfiguration, IFileService } from 'vs/platform/files/common/files'; @@ -29,7 +29,7 @@ export interface IModelLoadOrCreateOptions { export interface IUntitledEditorService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; /** * Events for when untitled editors content changes (e.g. any keystroke). @@ -112,7 +112,7 @@ export interface IUntitledEditorService { export class UntitledEditorService extends Disposable implements IUntitledEditorService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private mapResourceToInput = new ResourceMap(); private mapResourceToAssociatedFilePath = new ResourceMap(); diff --git a/src/vs/workbench/services/url/browser/urlService.ts b/src/vs/workbench/services/url/browser/urlService.ts index 61c2278813d..dfbca795c40 100644 --- a/src/vs/workbench/services/url/browser/urlService.ts +++ b/src/vs/workbench/services/url/browser/urlService.ts @@ -5,7 +5,7 @@ import { IURLService } from 'vs/platform/url/common/url'; import { URI, UriComponents } from 'vs/base/common/uri'; -import { ServiceIdentifier, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { AbstractURLService } from 'vs/platform/url/common/urlService'; import { Event, Emitter } from 'vs/base/common/event'; @@ -45,7 +45,7 @@ export interface IURLCallbackProvider { export class BrowserURLService extends AbstractURLService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; private provider: IURLCallbackProvider; diff --git a/src/vs/workbench/services/viewlet/browser/viewlet.ts b/src/vs/workbench/services/viewlet/browser/viewlet.ts index 92349b87a4b..ffc1a81d63a 100644 --- a/src/vs/workbench/services/viewlet/browser/viewlet.ts +++ b/src/vs/workbench/services/viewlet/browser/viewlet.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { IViewlet } from 'vs/workbench/common/viewlet'; -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { Event } from 'vs/base/common/event'; import { ViewletDescriptor } from 'vs/workbench/browser/viewlet'; import { IProgressIndicator } from 'vs/platform/progress/common/progress'; @@ -13,7 +13,7 @@ export const IViewletService = createDecorator('viewletService' export interface IViewletService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; readonly onDidViewletRegister: Event; readonly onDidViewletDeregister: Event; diff --git a/src/vs/workbench/services/window/electron-browser/windowService.ts b/src/vs/workbench/services/window/electron-browser/windowService.ts index 031e015589c..5c25f1f9a55 100644 --- a/src/vs/workbench/services/window/electron-browser/windowService.ts +++ b/src/vs/workbench/services/window/electron-browser/windowService.ts @@ -19,7 +19,7 @@ export class WindowService extends Disposable implements IWindowService { readonly onDidChangeFocus: Event; readonly onDidChangeMaximize: Event; - _serviceBrand: any; + _serviceBrand: undefined; private _windowId: number; private remoteAuthority: string | undefined; diff --git a/src/vs/workbench/services/workspace/common/workspaceEditing.ts b/src/vs/workbench/services/workspace/common/workspaceEditing.ts index c1656dab17f..6bf3b4019e1 100644 --- a/src/vs/workbench/services/workspace/common/workspaceEditing.ts +++ b/src/vs/workbench/services/workspace/common/workspaceEditing.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IWorkspaceIdentifier, IWorkspaceFolderCreationData } from 'vs/platform/workspaces/common/workspaces'; import { URI } from 'vs/base/common/uri'; @@ -11,7 +11,7 @@ export const IWorkspaceEditingService = createDecorator; + _serviceBrand: undefined; /** * Add folders to the existing workspace. @@ -56,4 +56,4 @@ export interface IWorkspaceEditingService { * picks a new workspace path */ pickNewWorkspacePath(): Promise; -} \ No newline at end of file +} diff --git a/src/vs/workbench/services/workspace/electron-browser/workspaceEditingService.ts b/src/vs/workbench/services/workspace/electron-browser/workspaceEditingService.ts index abf9f135d3d..55c9404ea62 100644 --- a/src/vs/workbench/services/workspace/electron-browser/workspaceEditingService.ts +++ b/src/vs/workbench/services/workspace/electron-browser/workspaceEditingService.ts @@ -32,11 +32,10 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { ILabelService } from 'vs/platform/label/common/label'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; export class WorkspaceEditingService implements IWorkspaceEditingService { - _serviceBrand!: ServiceIdentifier; + _serviceBrand: undefined; constructor( @IJSONEditingService private readonly jsonEditingService: IJSONEditingService, diff --git a/src/vs/workbench/test/browser/quickopen.test.ts b/src/vs/workbench/test/browser/quickopen.test.ts index 1adbabeb09c..1a264a7e25c 100644 --- a/src/vs/workbench/test/browser/quickopen.test.ts +++ b/src/vs/workbench/test/browser/quickopen.test.ts @@ -11,7 +11,7 @@ import { Registry } from 'vs/platform/registry/common/platform'; import { QuickOpenHandlerDescriptor, IQuickOpenRegistry, Extensions as QuickOpenExtensions, QuickOpenAction, QuickOpenHandler } from 'vs/workbench/browser/quickopen'; export class TestQuickOpenService implements IQuickOpenService { - public _serviceBrand: any; + public _serviceBrand: undefined; private callback?: (prefix?: string) => void; diff --git a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts index f2c5b0043fe..81d4d5d7fa6 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts @@ -78,7 +78,7 @@ suite('ExtHostLanguageFeatureCommands', function () { }); instantiationService.stub(IMarkerService, new MarkerService()); instantiationService.stub(IModelService, { - _serviceBrand: IModelService, + _serviceBrand: undefined, getModel(): any { return model; }, createModel() { throw new Error(); }, updateModel() { throw new Error(); }, diff --git a/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts b/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts index 991bfbede8a..54dd9f1a9af 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts @@ -9,11 +9,10 @@ import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { INotificationService, INotification, NoOpNotification, INotificationHandle, Severity, IPromptChoice, IPromptOptions, IStatusMessageOptions } from 'vs/platform/notification/common/notification'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { mock } from 'vs/workbench/test/electron-browser/api/mock'; -import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; const emptyDialogService = new class implements IDialogService { - _serviceBrand: 'dialogService'; + _serviceBrand: undefined; show(): never { throw new Error('not implemented'); } @@ -33,7 +32,7 @@ const emptyCommandService: ICommandService = { }; const emptyNotificationService = new class implements INotificationService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; notify(...args: any[]): never { throw new Error('not implemented'); } @@ -55,7 +54,7 @@ const emptyNotificationService = new class implements INotificationService { }; class EmptyNotificationService implements INotificationService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; constructor(private withNotify: (notification: INotification) => void) { } diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts index 1dc37b2b274..aa5453e5f6c 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts @@ -75,7 +75,7 @@ suite('MainThreadDocumentsAndEditors', () => { editorGroupService, null!, new class extends mock() implements IPanelService { - _serviceBrand: any; + _serviceBrand: undefined; onDidPanelOpen = Event.None; onDidPanelClose = Event.None; getActivePanel() { diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts index 35489e8cbeb..bd1397d06fb 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts @@ -107,7 +107,7 @@ suite('MainThreadEditors', () => { editorGroupService, bulkEditService, new class extends mock() implements IPanelService { - _serviceBrand: any; + _serviceBrand: undefined; onDidPanelOpen = Event.None; onDidPanelClose = Event.None; getActivePanel() { diff --git a/src/vs/workbench/test/electron-browser/api/testRPCProtocol.ts b/src/vs/workbench/test/electron-browser/api/testRPCProtocol.ts index 4eef6eb559c..7f8fc49d50e 100644 --- a/src/vs/workbench/test/electron-browser/api/testRPCProtocol.ts +++ b/src/vs/workbench/test/electron-browser/api/testRPCProtocol.ts @@ -25,7 +25,7 @@ export function SingleProxyRPCProtocol(thing: any): IExtHostContext & IExtHostRp export class TestRPCProtocol implements IExtHostContext, IExtHostRpcService { - public _serviceBrand = undefined; + public _serviceBrand: undefined; public remoteAuthority = null!; private _callCountValue: number = 0; diff --git a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts index b23a042280b..0c8f3e9a711 100644 --- a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts @@ -160,7 +160,7 @@ suite.skip('QuickOpen performance (integration)', () => { class TestTelemetryService implements ITelemetryService { - public _serviceBrand: any; + public _serviceBrand: undefined; public isOptedIn = true; public events: any[] = []; diff --git a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts index ee857b6b8b3..c0d3abb9cdc 100644 --- a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts @@ -145,7 +145,7 @@ suite.skip('TextSearch performance (integration)', () => { }); class TestTelemetryService implements ITelemetryService { - public _serviceBrand: any; + public _serviceBrand: undefined; public isOptedIn = true; public events: any[] = []; diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index af49603b3aa..69c2ed28f11 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -33,7 +33,7 @@ import { ITextFileStreamContent, ITextFileService, IResourceEncoding, IReadTextF import { parseArgs } from 'vs/platform/environment/node/argv'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; -import { IInstantiationService, ServicesAccessor, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; import { IWindowsService, IWindowService, INativeOpenDialogOptions, IEnterWorkspaceResult, IMessageBoxResult, MenuBarVisibility, IURIToOpen, IOpenSettings, IWindowConfiguration } from 'vs/platform/windows/common/windows'; import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; @@ -94,7 +94,7 @@ export function createFileInput(instantiationService: IInstantiationService, res export const TestEnvironmentService = new WorkbenchEnvironmentService(parseArgs(process.argv) as IWindowConfiguration, process.execPath); export class TestContextService implements IWorkspaceContextService { - public _serviceBrand: any; + public _serviceBrand: undefined; private workspace: Workspace; private options: any; @@ -325,7 +325,7 @@ export function workbenchInstantiationService(): IInstantiationService { } export class TestDecorationsService implements IDecorationsService { - _serviceBrand: any; + _serviceBrand: undefined; onDidChangeDecorations: Event = Event.None; registerDecorationsProvider(_provider: IDecorationsProvider): IDisposable { return Disposable.None; } getDecoration(_uri: URI, _includeChildren: boolean, _overwrite?: IDecorationData): IDecoration | undefined { return undefined; } @@ -335,7 +335,7 @@ export class TestExtensionService extends NullExtensionService { } export class TestMenuService implements IMenuService { - public _serviceBrand: any; + public _serviceBrand: undefined; createMenu(_id: MenuId, _scopedKeybindingService: IContextKeyService): IMenu { return { @@ -348,7 +348,7 @@ export class TestMenuService implements IMenuService { export class TestHistoryService implements IHistoryService { - public _serviceBrand: any; + public _serviceBrand: undefined; constructor(private root?: URI) { } @@ -392,7 +392,7 @@ export class TestHistoryService implements IHistoryService { export class TestDialogService implements IDialogService { - public _serviceBrand: any; + public _serviceBrand: undefined; public confirm(_confirmation: IConfirmation): Promise { return Promise.resolve({ confirmed: false }); @@ -405,7 +405,7 @@ export class TestDialogService implements IDialogService { export class TestFileDialogService implements IFileDialogService { - public _serviceBrand: any; + public _serviceBrand: undefined; public defaultFilePath(_schemeFilter?: string): URI | undefined { return undefined; @@ -441,7 +441,7 @@ export class TestFileDialogService implements IFileDialogService { export class TestLayoutService implements IWorkbenchLayoutService { - public _serviceBrand: any; + public _serviceBrand: undefined; dimension: IDimension = { width: 800, height: 600 }; @@ -560,7 +560,7 @@ export class TestLayoutService implements IWorkbenchLayoutService { let activeViewlet: Viewlet = {} as any; export class TestViewletService implements IViewletService { - public _serviceBrand: any; + public _serviceBrand: undefined; onDidViewletRegisterEmitter = new Emitter(); onDidViewletDeregisterEmitter = new Emitter(); @@ -611,7 +611,7 @@ export class TestViewletService implements IViewletService { } export class TestPanelService implements IPanelService { - public _serviceBrand: any; + public _serviceBrand: undefined; onDidPanelOpen = new Emitter<{ panel: IPanel, focus: boolean }>().event; onDidPanelClose = new Emitter().event; @@ -660,7 +660,7 @@ export class TestStorageService extends InMemoryStorageService { } export class TestEditorGroupsService implements IEditorGroupsService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; constructor(public groups: TestEditorGroup[] = []) { } @@ -860,7 +860,7 @@ export class TestEditorGroup implements IEditorGroupView { export class TestEditorService implements EditorServiceImpl { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; onDidActiveEditorChange: Event = Event.None; onDidVisibleEditorsChange: Event = Event.None; @@ -910,7 +910,7 @@ export class TestEditorService implements EditorServiceImpl { export class TestFileService implements IFileService { - public _serviceBrand: any; + public _serviceBrand: undefined; private readonly _onFileChanges: Emitter; private readonly _onAfterOperation: Emitter; @@ -1081,7 +1081,7 @@ export class TestFileService implements IFileService { } export class TestBackupFileService implements IBackupFileService { - public _serviceBrand: any; + public _serviceBrand: undefined; public hasBackups(): Promise { return Promise.resolve(false); @@ -1146,7 +1146,7 @@ export class TestBackupFileService implements IBackupFileService { } export class TestCodeEditorService implements ICodeEditorService { - _serviceBrand: any; + _serviceBrand: undefined; onCodeEditorAdd: Event = Event.None; onCodeEditorRemove: Event = Event.None; @@ -1172,7 +1172,7 @@ export class TestCodeEditorService implements ICodeEditorService { export class TestWindowService implements IWindowService { - public _serviceBrand: any; + public _serviceBrand: undefined; onDidChangeFocus: Event = new Emitter().event; onDidChangeMaximize: Event; @@ -1303,7 +1303,7 @@ export class TestWindowService implements IWindowService { export class TestLifecycleService implements ILifecycleService { - public _serviceBrand: any; + public _serviceBrand: undefined; public phase: LifecyclePhase; public startupKind: StartupKind; @@ -1342,7 +1342,7 @@ export class TestLifecycleService implements ILifecycleService { export class TestWindowsService implements IWindowsService { - _serviceBrand: any; + _serviceBrand: undefined; public windowCount = 1; @@ -1563,7 +1563,7 @@ export class TestWindowsService implements IWindowsService { export class TestTextResourceConfigurationService implements ITextResourceConfigurationService { - _serviceBrand: any; + _serviceBrand: undefined; constructor(private configurationService = new TestConfigurationService()) { } @@ -1581,7 +1581,7 @@ export class TestTextResourceConfigurationService implements ITextResourceConfig export class TestTextResourcePropertiesService implements ITextResourcePropertiesService { - _serviceBrand: any; + _serviceBrand: undefined; constructor( @IConfigurationService private readonly configurationService: IConfigurationService, @@ -1602,7 +1602,7 @@ export class TestTextResourcePropertiesService implements ITextResourcePropertie export class TestSharedProcessService implements ISharedProcessService { - _serviceBrand: ServiceIdentifier; + _serviceBrand: undefined; getChannel(channelName: string): any { return undefined; diff --git a/test/smoke/src/vscode/puppeteerDriver.ts b/test/smoke/src/vscode/puppeteerDriver.ts index e7ae860b551..d8f8bd19091 100644 --- a/test/smoke/src/vscode/puppeteerDriver.ts +++ b/test/smoke/src/vscode/puppeteerDriver.ts @@ -168,7 +168,7 @@ export interface IElement { } export interface IDriver { - _serviceBrand: any; + _serviceBrand: undefined; getWindowIds(): Promise; capturePage(windowId: number): Promise;