From 4a130c40ed876644ed8af2943809d08221375408 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 2 Feb 2022 14:34:41 +0100 Subject: [PATCH] enable `@typescript-eslint/member-delimiter-style`, https://github.com/microsoft/vscode/issues/140391 --- .eslintrc.json | 1 + build/azure-pipelines/mixin.ts | 2 +- build/azure-pipelines/upload-nlsmetadata.ts | 6 +- build/azure-pipelines/upload-sourcemaps.ts | 2 +- build/lib/asar.ts | 6 +- build/lib/builtInExtensions.ts | 2 +- build/lib/builtInExtensionsCG.ts | 2 +- build/lib/bundle.ts | 12 +-- build/lib/compilation.ts | 2 +- build/lib/electron.ts | 10 +- .../eslint/code-no-unexternalized-strings.ts | 2 +- build/lib/eslint/vscode-dts-event-naming.ts | 2 +- build/lib/extensions.ts | 6 +- build/lib/i18n.ts | 4 +- build/lib/monaco-api.ts | 10 +- build/lib/standalone.ts | 6 +- build/lib/treeshaking.ts | 8 +- build/lib/watch/watch-win32.ts | 4 +- .../src/configurationEditingMain.ts | 2 +- .../src/settingsDocumentHelper.ts | 2 +- .../client/src/browser/cssClientMain.ts | 2 +- .../client/src/cssClient.ts | 2 +- .../client/src/requests.ts | 4 +- .../server/src/cssServer.ts | 2 +- .../server/src/languageModelCache.ts | 2 +- .../server/src/requests.ts | 2 +- .../server/src/test/completion.test.ts | 2 +- extensions/emmet/src/imageSizeHelper.ts | 8 +- extensions/emmet/src/updateTag.ts | 4 +- .../src/packageDocumentHelper.ts | 2 +- extensions/git-base/src/remoteSource.ts | 2 +- extensions/git/src/api/api1.ts | 6 +- extensions/git/src/askpass.ts | 4 +- extensions/git/src/commands.ts | 12 +-- extensions/git/src/decorationProvider.ts | 2 +- extensions/git/src/git.ts | 18 ++-- extensions/git/src/ipc/ipcServer.ts | 4 +- extensions/git/src/main.ts | 4 +- extensions/git/src/repository.ts | 16 +-- extensions/git/src/util.ts | 4 +- .../github-authentication/src/common/utils.ts | 2 +- .../github-authentication/src/github.ts | 6 +- .../github-authentication/src/githubServer.ts | 16 +-- extensions/github/src/publish.ts | 2 +- extensions/github/src/pushErrorHandler.ts | 2 +- extensions/github/src/remoteSourceProvider.ts | 2 +- .../client/src/browser/htmlClientMain.ts | 2 +- .../client/src/htmlClient.ts | 4 +- .../server/src/htmlServer.ts | 2 +- .../server/src/languageModelCache.ts | 2 +- .../server/src/modes/embeddedSupport.ts | 2 +- .../server/src/modes/javascriptMode.ts | 4 +- .../server/src/modes/languageModes.ts | 4 +- .../server/src/modes/semanticTokens.ts | 2 +- .../server/src/test/completions.test.ts | 4 +- .../server/src/test/words.test.ts | 2 +- .../server/src/utils/strings.ts | 2 +- .../client/src/jsonClient.ts | 4 +- .../server/src/jsonServer.ts | 10 +- .../server/src/languageModelCache.ts | 2 +- .../preview-src/scroll-sync.ts | 6 +- .../preview-src/settings.ts | 2 +- .../src/features/documentLinkProvider.ts | 4 +- .../src/features/foldingProvider.ts | 2 +- .../src/features/pathCompletions.ts | 2 +- .../src/features/preview.ts | 6 +- .../src/features/smartSelect.ts | 2 +- .../src/util/topmostLineMonitor.ts | 2 +- .../merge-conflict/src/contentProvider.ts | 2 +- .../src/documentMergeConflict.ts | 4 +- extensions/merge-conflict/src/interfaces.ts | 2 +- .../microsoft-authentication/src/AADHelper.ts | 16 +-- .../src/authServer.ts | 4 +- .../src/betterSecretStorage.ts | 4 +- .../microsoft-authentication/src/extension.ts | 2 +- .../npm/src/features/bowerJSONContribution.ts | 2 +- .../src/features/packageJSONContribution.ts | 6 +- extensions/npm/src/preferred-pm.ts | 2 +- extensions/npm/src/tasks.ts | 10 +- .../src/features/phpGlobals.ts | 4 +- extensions/search-result/src/extension.ts | 6 +- extensions/simple-browser/src/extension.ts | 4 +- .../src/languageFeatures/completions.ts | 6 +- .../src/languageFeatures/quickFix.ts | 2 +- .../src/languageFeatures/refactor.ts | 2 +- .../src/languageProvider.ts | 2 +- .../src/lazyClientHost.ts | 16 +-- .../src/test/testUtils.ts | 2 +- .../src/test/unit/cachedResponse.test.ts | 2 +- .../src/tsServer/server.ts | 12 +-- .../src/tsServer/spawner.ts | 2 +- .../src/typeScriptServiceClientHost.ts | 22 ++-- .../src/typescriptService.ts | 4 +- .../src/typescriptServiceClient.ts | 22 ++-- .../src/utils/languageDescription.ts | 2 +- .../src/utils/plugins.ts | 4 +- .../src/utils/previewer.ts | 2 +- .../src/utils/resourceMap.ts | 6 +- .../src/utils/snippetForFunctionCall.ts | 4 +- .../src/utils/tracer.ts | 2 +- extensions/vscode-api-tests/src/memfs.ts | 2 +- .../src/singlefolder-tests/terminal.test.ts | 2 +- .../workspace.watcher.test.ts | 2 +- .../src/test/customEditor.test.ts | 2 +- .../src/test/utils.ts | 2 +- extensions/vscode-notebook-tests/src/utils.ts | 2 +- .../vscode-test-resolver/src/extension.ts | 4 +- src/vs/base/browser/contextmenu.ts | 2 +- src/vs/base/browser/dom.ts | 8 +- src/vs/base/browser/globalMouseMoveMonitor.ts | 2 +- src/vs/base/browser/markdownRenderer.ts | 4 +- src/vs/base/browser/touch.ts | 2 +- .../browser/ui/centered/centeredViewLayout.ts | 8 +- src/vs/base/browser/ui/grid/grid.ts | 10 +- src/vs/base/browser/ui/hover/hoverWidget.ts | 4 +- src/vs/base/browser/ui/list/list.ts | 6 +- src/vs/base/browser/ui/menu/menu.ts | 2 +- src/vs/base/browser/ui/menu/menubar.ts | 4 +- src/vs/base/browser/ui/sash/sash.ts | 2 +- src/vs/base/browser/ui/splitview/paneview.ts | 6 +- src/vs/base/browser/ui/splitview/splitview.ts | 4 +- src/vs/base/browser/ui/tree/asyncDataTree.ts | 8 +- .../ui/tree/compressedObjectTreeModel.ts | 2 +- src/vs/base/browser/ui/tree/dataTree.ts | 2 +- src/vs/base/browser/ui/tree/indexTreeModel.ts | 6 +- src/vs/base/browser/ui/tree/objectTree.ts | 2 +- .../base/browser/ui/tree/objectTreeModel.ts | 2 +- src/vs/base/browser/ui/tree/tree.ts | 2 +- src/vs/base/common/actions.ts | 6 +- src/vs/base/common/arrays.ts | 8 +- src/vs/base/common/async.ts | 2 +- src/vs/base/common/buffer.ts | 2 +- src/vs/base/common/collections.ts | 6 +- src/vs/base/common/comparers.ts | 2 +- src/vs/base/common/console.ts | 2 +- src/vs/base/common/event.ts | 10 +- src/vs/base/common/fuzzyScorer.ts | 2 +- src/vs/base/common/glob.ts | 2 +- src/vs/base/common/htmlContent.ts | 4 +- src/vs/base/common/keyCodes.ts | 8 +- src/vs/base/common/labels.ts | 10 +- src/vs/base/common/lifecycle.ts | 2 +- src/vs/base/common/network.ts | 6 +- src/vs/base/common/objects.ts | 2 +- src/vs/base/common/platform.ts | 2 +- src/vs/base/common/process.ts | 2 +- src/vs/base/common/processes.ts | 2 +- src/vs/base/common/product.ts | 48 ++++----- src/vs/base/common/resources.ts | 2 +- src/vs/base/common/worker/simpleWorker.ts | 2 +- src/vs/base/node/pfs.ts | 6 +- src/vs/base/parts/ipc/common/ipc.net.ts | 2 +- src/vs/base/parts/ipc/common/ipc.ts | 10 +- .../parts/ipc/electron-main/ipc.electron.ts | 2 +- src/vs/base/parts/ipc/electron-main/ipc.mp.ts | 2 +- src/vs/base/parts/ipc/node/ipc.cp.ts | 2 +- src/vs/base/parts/ipc/node/ipc.net.ts | 6 +- .../base/parts/ipc/test/node/testService.ts | 6 +- .../parts/quickinput/browser/quickInput.ts | 2 +- .../quickinput/browser/quickInputUtils.ts | 2 +- .../parts/quickinput/common/quickInput.ts | 6 +- src/vs/base/parts/storage/node/storage.ts | 2 +- .../test/browser/markdownRenderer.test.ts | 2 +- src/vs/base/test/browser/ui/grid/util.ts | 6 +- .../test/browser/ui/tree/dataTree.test.ts | 2 +- .../test/browser/ui/tree/objectTree.test.ts | 2 +- src/vs/base/test/common/filters.test.ts | 4 +- src/vs/base/test/common/iconLabels.test.ts | 2 +- .../base/test/common/timeTravelScheduler.ts | 2 +- src/vs/code/browser/workbench/workbench.ts | 12 +-- src/vs/code/electron-main/app.ts | 14 +-- .../issue/issueReporterMain.ts | 4 +- .../processExplorer/processExplorerMain.ts | 2 +- src/vs/code/node/cli.ts | 2 +- .../editor/browser/config/fontMeasurements.ts | 4 +- .../editor/browser/controller/mouseTarget.ts | 8 +- src/vs/editor/browser/coreCommands.ts | 24 ++--- src/vs/editor/browser/editorBrowser.ts | 6 +- src/vs/editor/browser/editorExtensions.ts | 10 +- .../services/abstractCodeEditorService.ts | 10 +- .../browser/services/editorWorkerService.ts | 10 +- .../editor/browser/services/openerService.ts | 2 +- src/vs/editor/browser/view.ts | 2 +- src/vs/editor/browser/view/viewLayer.ts | 4 +- .../contentWidgets/contentWidgets.ts | 6 +- .../browser/viewParts/lines/viewLines.ts | 2 +- .../browser/viewParts/minimap/minimap.ts | 8 +- .../browser/viewParts/viewZones/viewZones.ts | 4 +- .../editor/browser/widget/codeEditorWidget.ts | 14 +-- .../editor/browser/widget/diffEditorWidget.ts | 8 +- src/vs/editor/common/commands/shiftCommand.ts | 2 +- .../config/editorConfigurationSchema.ts | 8 +- src/vs/editor/common/config/editorOptions.ts | 10 +- src/vs/editor/common/config/fontInfo.ts | 2 +- .../common/core/wordCharacterClassifier.ts | 2 +- src/vs/editor/common/cursor/cursor.ts | 4 +- .../common/cursor/cursorTypeOperations.ts | 2 +- src/vs/editor/common/cursorCommon.ts | 4 +- .../editor/common/languageFeatureRegistry.ts | 2 +- src/vs/editor/common/languages.ts | 18 ++-- .../languageConfigurationRegistry.ts | 4 +- .../languages/supports/richEditBrackets.ts | 4 +- src/vs/editor/common/model.ts | 2 +- .../bracketPairsTree/brackets.ts | 2 +- .../pieceTreeTextBuffer/pieceTreeBase.ts | 8 +- .../pieceTreeTextBuffer.ts | 2 +- .../pieceTreeTextBufferBuilder.ts | 2 +- src/vs/editor/common/model/textModel.ts | 6 +- .../editor/common/modelLineProjectionData.ts | 2 +- .../common/services/editorSimpleWorker.ts | 4 +- .../services/languageFeatureDebounce.ts | 4 +- .../common/services/languagesRegistry.ts | 8 +- src/vs/editor/common/services/model.ts | 2 +- src/vs/editor/common/services/modelService.ts | 6 +- .../common/services/semanticTokensDto.ts | 4 +- .../services/unicodeTextModelHighlighter.ts | 2 +- src/vs/editor/common/textModelGuides.ts | 6 +- src/vs/editor/common/tokens/lineTokens.ts | 2 +- .../editor/common/tokens/sparseTokensStore.ts | 2 +- src/vs/editor/common/viewEvents.ts | 2 +- .../editor/common/viewLayout/linesLayout.ts | 4 +- src/vs/editor/common/viewLayout/viewLayout.ts | 2 +- src/vs/editor/common/viewModel.ts | 2 +- .../common/viewModel/overviewZoneManager.ts | 2 +- .../common/viewModel/viewModelDecorations.ts | 2 +- .../editor/common/viewModel/viewModelImpl.ts | 10 +- .../contrib/codeAction/browser/codeAction.ts | 2 +- .../codeAction/browser/codeActionCommands.ts | 6 +- .../codeAction/browser/codeActionMenu.ts | 4 +- .../codeAction/browser/codeActionUi.ts | 2 +- .../contrib/codeAction/browser/types.ts | 2 +- .../codelens/browser/codelensController.ts | 2 +- .../contrib/colorPicker/browser/color.ts | 2 +- .../colorPicker/browser/colorPickerWidget.ts | 6 +- .../documentSymbols/browser/outlineModel.ts | 2 +- .../browser/keybindingCancellation.ts | 2 +- .../test/browser/editorState.test.ts | 4 +- .../editor/contrib/find/browser/findState.ts | 4 +- .../find/test/browser/findController.test.ts | 4 +- .../editor/contrib/folding/browser/folding.ts | 4 +- .../gotoSymbol/browser/goToCommands.ts | 2 +- .../gotoSymbol/browser/peek/referencesTree.ts | 4 +- .../contrib/hover/browser/contentHover.ts | 2 +- .../contrib/hover/browser/hoverTypes.ts | 2 +- .../hover/browser/markerHoverParticipant.ts | 2 +- .../indentation/browser/indentation.ts | 4 +- .../contrib/inlayHints/browser/inlayHints.ts | 2 +- .../browser/inlayHintsController.ts | 4 +- .../inlineCompletions/browser/ghostText.ts | 2 +- .../browser/inlineCompletionToGhostText.ts | 2 +- .../browser/inlineCompletionsProvider.test.ts | 4 +- .../test/browser/suggestWidgetModel.test.ts | 4 +- .../test/browser/linkedEditing.test..ts | 2 +- src/vs/editor/contrib/links/browser/links.ts | 2 +- .../test/browser/multicursor.test.ts | 2 +- .../contrib/peekView/browser/peekView.ts | 2 +- .../browser/editorNavigationQuickAccess.ts | 2 +- .../browser/gotoSymbolQuickAccess.ts | 8 +- .../smartSelect/browser/smartSelect.ts | 2 +- .../contrib/snippet/browser/snippetParser.ts | 2 +- .../contrib/snippet/browser/snippetSession.ts | 2 +- .../editor/contrib/suggest/browser/suggest.ts | 2 +- .../suggest/browser/suggestController.ts | 12 +-- .../contrib/suggest/browser/suggestModel.ts | 6 +- .../contrib/suggest/browser/suggestWidget.ts | 2 +- .../suggest/browser/suggestWidgetDetails.ts | 2 +- .../contrib/zoneWidget/browser/zoneWidget.ts | 2 +- .../standalone/browser/standaloneEditor.ts | 4 +- .../standalone/browser/standaloneLanguages.ts | 4 +- .../standalone/browser/standaloneServices.ts | 4 +- .../browser/standaloneThemeService.ts | 4 +- .../common/monarch/monarchCommon.ts | 4 +- .../standalone/common/monarch/monarchLexer.ts | 10 +- .../standalone/common/standaloneTheme.ts | 2 +- .../test/browser/controller/cursor.test.ts | 2 +- .../browser/controller/imeRecordedTypes.ts | 6 +- .../beforeEditPositionMapper.test.ts | 2 +- .../getBracketPairsInRange.test.ts | 2 +- .../common/model/modelDecorations.test.ts | 4 +- .../pieceTreeTextBuffer.test.ts | 2 +- .../common/model/textModelWithTokens.test.ts | 2 +- .../test/common/model/tokensStore.test.ts | 2 +- .../common/services/semanticTokensDto.test.ts | 2 +- .../monospaceLineBreaksComputer.test.ts | 2 +- .../browser/menuEntryActionViewItem.ts | 8 +- src/vs/platform/actions/common/actions.ts | 10 +- src/vs/platform/backup/node/backup.ts | 4 +- .../electron-main/backupMainService.test.ts | 2 +- .../configuration/common/configuration.ts | 16 +-- .../common/configurationModels.ts | 6 +- .../common/configurationRegistry.ts | 26 ++--- .../test/common/configurationService.test.ts | 2 +- .../contextkey/browser/contextKeyService.ts | 8 +- .../platform/contextkey/common/contextkey.ts | 2 +- .../contextview/browser/contextView.ts | 2 +- .../credentials/common/credentials.ts | 8 +- .../node/credentialsMainService.ts | 2 +- .../diagnostics/node/diagnosticsService.ts | 14 +-- src/vs/platform/dialogs/common/dialogs.ts | 6 +- src/vs/platform/driver/browser/baseDriver.ts | 4 +- src/vs/platform/driver/common/driver.ts | 8 +- src/vs/platform/driver/common/driverIpc.ts | 2 +- .../platform/driver/electron-main/driver.ts | 2 +- .../driver/electron-sandbox/driver.ts | 2 +- src/vs/platform/driver/node/driver.ts | 4 +- .../environment/common/environmentService.ts | 4 +- src/vs/platform/environment/node/argv.ts | 2 +- .../abstractExtensionManagementService.ts | 10 +- .../common/extensionEnablementService.ts | 4 +- .../common/extensionGalleryService.ts | 42 ++++---- .../common/extensionManagement.ts | 38 +++---- .../common/extensionManagementCLIService.ts | 2 +- .../electron-sandbox/extensionTipsService.ts | 22 ++-- .../node/extensionLifecycle.ts | 4 +- .../node/extensionsScanner.ts | 4 +- .../node/extensionsWatcher.ts | 2 +- .../extensions/common/extensionHostStarter.ts | 8 +- .../platform/extensions/common/extensions.ts | 28 ++--- .../workerMainProcessExtensionHostStarter.ts | 8 +- .../node/extensionHostStarterWorker.ts | 12 +-- .../common/externalTerminal.ts | 8 +- .../node/externalTerminalService.ts | 2 +- .../browser/indexedDBFileSystemProvider.ts | 18 ++-- .../common/diskFileSystemProviderClient.ts | 4 +- src/vs/platform/files/common/fileService.ts | 20 ++-- src/vs/platform/files/common/files.ts | 12 +-- src/vs/platform/files/common/watcher.ts | 4 +- .../node/watcher/parcel/parcelWatcher.ts | 4 +- .../files/test/node/watcherCoalescer.test.ts | 6 +- .../browser/contextScopedHistoryWidget.ts | 6 +- .../instantiation/common/instantiation.ts | 2 +- .../common/instantiationService.ts | 2 +- .../platform/ipc/electron-sandbox/services.ts | 2 +- src/vs/platform/issue/common/issue.ts | 2 +- .../issue/electron-main/issueMainService.ts | 2 +- .../keybinding/common/keybindingsRegistry.ts | 2 +- .../common/abstractKeybindingService.test.ts | 4 +- .../keyboardLayout/common/keyboardLayout.ts | 2 +- src/vs/platform/label/common/label.ts | 2 +- .../launch/electron-main/launchMainService.ts | 2 +- .../electron-main/lifecycleMainService.ts | 4 +- src/vs/platform/list/browser/listService.ts | 6 +- .../platform/markers/common/markerService.ts | 2 +- src/vs/platform/markers/common/markers.ts | 4 +- .../platform/menubar/electron-main/menubar.ts | 4 +- src/vs/platform/native/common/native.ts | 8 +- .../electron-main/nativeHostMainService.ts | 8 +- .../notification/common/notification.ts | 2 +- src/vs/platform/opener/common/opener.ts | 8 +- src/vs/platform/product/common/product.ts | 2 +- src/vs/platform/profiling/common/profiling.ts | 4 +- .../profiling/node/profilingService.ts | 2 +- src/vs/platform/progress/common/progress.ts | 2 +- .../quickinput/browser/commandsQuickAccess.ts | 4 +- .../quickinput/browser/helpQuickAccess.ts | 2 +- .../quickinput/browser/pickerQuickAccess.ts | 4 +- .../quickinput/browser/quickAccess.ts | 6 +- .../remote/common/remoteAgentConnection.ts | 10 +- .../remote/common/remoteAuthorityResolver.ts | 8 +- .../sharedProcessWorkerMain.ts | 2 +- .../sharedProcessWorkerService.ts | 2 +- .../electron-main/sharedProcess.ts | 2 +- src/vs/platform/state/electron-main/state.ts | 2 +- .../state/electron-main/stateMainService.ts | 6 +- src/vs/platform/storage/common/storage.ts | 6 +- src/vs/platform/storage/common/storageIpc.ts | 2 +- .../storage/electron-main/storageMain.ts | 2 +- .../test/common/storageService.test.ts | 2 +- .../electron-main/storageMainService.test.ts | 2 +- .../telemetry/common/commonProperties.ts | 4 +- .../telemetry/common/errorTelemetry.ts | 16 +-- .../telemetry/common/telemetryService.ts | 4 +- .../telemetry/common/telemetryUtils.ts | 6 +- src/vs/platform/terminal/common/terminal.ts | 50 ++++----- .../common/terminalPlatformConfiguration.ts | 2 +- .../terminal/common/terminalProcess.ts | 2 +- .../terminal/common/terminalProfiles.ts | 12 +-- .../platform/terminal/node/ptyHostService.ts | 14 +-- src/vs/platform/terminal/node/ptyService.ts | 20 ++-- .../platform/terminal/node/terminalProcess.ts | 10 +- .../terminal/node/terminalProfiles.ts | 6 +- .../terminal/test/common/requestStore.test.ts | 2 +- src/vs/platform/theme/common/colorRegistry.ts | 4 +- src/vs/platform/theme/common/iconRegistry.ts | 4 +- .../common/tokenClassificationRegistry.ts | 10 +- .../theme/test/common/testThemeService.ts | 2 +- src/vs/platform/tunnel/common/tunnel.ts | 18 ++-- .../undoRedo/common/undoRedoService.ts | 6 +- src/vs/platform/update/common/update.ts | 14 +-- .../electron-main/abstractUpdateService.ts | 2 +- .../electron-main/updateService.darwin.ts | 2 +- .../url/electron-main/electronUrlListener.ts | 6 +- .../common/abstractSynchronizer.ts | 4 +- .../userDataSync/common/extensionsMerge.ts | 8 +- .../userDataSync/common/extensionsSync.ts | 2 +- .../userDataSync/common/globalStateMerge.ts | 8 +- .../userDataSync/common/globalStateSync.ts | 8 +- .../userDataSync/common/keybindingsMerge.ts | 4 +- .../userDataSync/common/keybindingsSync.ts | 2 +- .../userDataSync/common/settingsMerge.ts | 6 +- .../userDataSync/common/settingsSync.ts | 2 +- .../userDataSync/common/snippetsMerge.ts | 2 +- .../userDataSync/common/snippetsSync.ts | 2 +- .../platform/userDataSync/common/tasksSync.ts | 2 +- .../common/userDataAutoSyncService.ts | 12 +-- .../userDataSync/common/userDataSync.ts | 8 +- .../common/userDataSyncEnablementService.ts | 2 +- .../common/userDataSyncService.ts | 16 +-- .../common/userDataSyncServiceIpc.ts | 14 +-- .../common/userDataSyncStoreService.ts | 10 +- .../test/common/synchronizer.test.ts | 4 +- .../test/common/userDataSyncClient.ts | 8 +- .../electron-main/webviewMainService.ts | 2 +- src/vs/platform/windows/common/windows.ts | 6 +- .../platform/windows/electron-main/window.ts | 12 +-- .../electron-main/windowsMainService.ts | 4 +- src/vs/platform/windows/node/windowTracker.ts | 6 +- .../test/electron-main/windowsFinder.test.ts | 4 +- .../workspace/common/virtualWorkspace.ts | 2 +- .../workspace/common/workspaceTrust.ts | 8 +- .../platform/workspaces/common/workspaces.ts | 4 +- .../workspacesManagementMainService.ts | 2 +- .../server/node/remoteAgentEnvironmentImpl.ts | 4 +- .../node/remoteExtensionHostAgentServer.ts | 12 +-- src/vs/server/node/remoteTelemetryService.ts | 2 +- src/vs/server/node/remoteTerminalChannel.ts | 4 +- src/vs/server/node/server.cli.ts | 2 +- .../server/node/serverEnvironmentService.ts | 2 +- src/vs/server/node/serverServices.ts | 2 +- .../api/browser/mainThreadAuthentication.ts | 6 +- .../api/browser/mainThreadCLICommands.ts | 2 +- .../api/browser/mainThreadCustomEditors.ts | 4 +- .../api/browser/mainThreadDocuments.ts | 8 +- .../api/browser/mainThreadEditorTabs.ts | 2 +- .../api/browser/mainThreadEditors.ts | 4 +- .../api/browser/mainThreadExtensionService.ts | 2 +- .../workbench/api/browser/mainThreadKeytar.ts | 2 +- .../api/browser/mainThreadLanguageFeatures.ts | 2 +- .../api/browser/mainThreadLanguages.ts | 2 +- .../api/browser/mainThreadMessageService.ts | 8 +- .../api/browser/mainThreadNotebook.ts | 4 +- .../browser/mainThreadNotebookDocuments.ts | 2 +- .../api/browser/mainThreadNotebookKernels.ts | 2 +- .../api/browser/mainThreadProgress.ts | 2 +- .../api/browser/mainThreadQuickOpen.ts | 2 +- src/vs/workbench/api/browser/mainThreadSCM.ts | 2 +- .../api/browser/mainThreadSaveParticipant.ts | 2 +- .../api/browser/mainThreadStatusBar.ts | 2 +- .../workbench/api/browser/mainThreadTask.ts | 2 +- .../api/browser/mainThreadTerminalService.ts | 2 +- .../api/browser/mainThreadTesting.ts | 2 +- .../api/browser/mainThreadTreeViews.ts | 4 +- .../api/browser/mainThreadTunnelService.ts | 2 +- .../workbench/api/browser/mainThreadUrls.ts | 2 +- .../api/browser/mainThreadWebviewViews.ts | 2 +- .../api/browser/mainThreadWorkspace.ts | 4 +- .../api/browser/viewsExtensionPoint.ts | 2 +- .../workbench/api/common/exHostSecretState.ts | 4 +- .../workbench/api/common/extHost.api.impl.ts | 16 +-- .../workbench/api/common/extHost.protocol.ts | 102 +++++++++--------- .../api/common/extHostApiCommands.ts | 10 +- .../common/extHostApiDeprecationService.ts | 4 +- .../workbench/api/common/extHostCodeInsets.ts | 2 +- .../workbench/api/common/extHostComments.ts | 12 +-- .../api/common/extHostConfiguration.ts | 8 +- .../api/common/extHostCustomEditors.ts | 2 +- .../api/common/extHostDebugService.ts | 2 +- .../common/extHostDocumentSaveParticipant.ts | 2 +- .../workbench/api/common/extHostEditorTabs.ts | 2 +- .../api/common/extHostExtensionActivator.ts | 16 +-- .../api/common/extHostExtensionService.ts | 24 ++--- .../workbench/api/common/extHostFileSystem.ts | 2 +- .../api/common/extHostFileSystemConsumer.ts | 6 +- .../api/common/extHostInteractive.ts | 2 +- .../api/common/extHostLanguageFeatures.ts | 10 +- src/vs/workbench/api/common/extHostMemento.ts | 2 +- .../api/common/extHostMessageService.ts | 2 +- .../workbench/api/common/extHostNotebook.ts | 2 +- .../api/common/extHostNotebookKernels.ts | 12 +-- .../api/common/extHostNotebookRenderers.ts | 4 +- .../workbench/api/common/extHostQuickOpen.ts | 16 +-- .../api/common/extHostRequireInterceptor.ts | 10 +- src/vs/workbench/api/common/extHostSCM.ts | 6 +- .../workbench/api/common/extHostStatusBar.ts | 4 +- src/vs/workbench/api/common/extHostTask.ts | 10 +- .../api/common/extHostTerminalService.ts | 4 +- src/vs/workbench/api/common/extHostTesting.ts | 8 +- .../workbench/api/common/extHostTextEditor.ts | 6 +- .../api/common/extHostTextEditors.ts | 2 +- .../workbench/api/common/extHostTreeViews.ts | 4 +- .../api/common/extHostTunnelService.ts | 12 +-- .../api/common/extHostTypeConverters.ts | 30 +++--- src/vs/workbench/api/common/extHostTypes.ts | 32 +++--- .../workbench/api/common/extHostUriOpener.ts | 2 +- .../api/common/extHostWebviewMessaging.ts | 4 +- .../api/common/extHostWebviewPanels.ts | 6 +- .../api/common/extHostWebviewView.ts | 2 +- .../workbench/api/common/extHostWorkspace.ts | 10 +- src/vs/workbench/api/node/extHostCLIServer.ts | 2 +- .../workbench/api/node/extHostDebugService.ts | 2 +- .../api/node/extHostExtensionService.ts | 2 +- src/vs/workbench/api/node/extHostTask.ts | 4 +- .../api/node/extHostTunnelService.ts | 32 +++--- src/vs/workbench/api/node/proxyResolver.ts | 26 ++--- .../test/browser/extHostApiCommands.test.ts | 2 +- .../test/browser/extHostDocumentData.test.ts | 2 +- .../browser/extHostLanguageFeatures.test.ts | 2 +- .../extHostNotebookConcatDocument.test.ts | 4 +- .../browser/extHostNotebookKernel.test.ts | 2 +- .../api/test/browser/extHostTreeViews.test.ts | 2 +- .../api/test/browser/extHostWorkspace.test.ts | 2 +- .../api/test/common/testRPCProtocol.ts | 4 +- .../api/test/node/extHostSearch.test.ts | 4 +- .../test/node/extHostTunnelService.test.ts | 2 +- .../api/worker/extensionHostWorker.ts | 4 +- .../browser/actions/layoutActions.ts | 2 +- .../browser/actions/windowActions.ts | 2 +- src/vs/workbench/browser/composite.ts | 2 +- src/vs/workbench/browser/dnd.ts | 2 +- src/vs/workbench/browser/labels.ts | 6 +- src/vs/workbench/browser/layout.ts | 62 +++++------ src/vs/workbench/browser/layoutState.ts | 12 +-- .../parts/activitybar/activitybarActions.ts | 8 +- .../parts/activitybar/activitybarPart.ts | 12 +-- .../browser/parts/banner/bannerPart.ts | 2 +- .../workbench/browser/parts/compositeBar.ts | 4 +- .../browser/parts/compositeBarActions.ts | 2 +- .../workbench/browser/parts/compositePart.ts | 2 +- .../parts/editor/breadcrumbsControl.ts | 4 +- .../browser/parts/editor/breadcrumbsModel.ts | 2 +- .../browser/parts/editor/breadcrumbsPicker.ts | 8 +- .../parts/editor/editor.contribution.ts | 2 +- .../browser/parts/editor/editorActions.ts | 2 +- .../browser/parts/editor/editorCommands.ts | 4 +- .../browser/parts/editor/editorDropTarget.ts | 2 +- .../browser/parts/editor/editorGroupView.ts | 18 ++-- .../browser/parts/editor/editorPanes.ts | 4 +- .../browser/parts/editor/editorPart.ts | 10 +- .../browser/parts/editor/editorStatus.ts | 20 ++-- .../browser/parts/editor/sideBySideEditor.ts | 6 +- .../browser/parts/editor/titleControl.ts | 2 +- .../notifications/notificationsActions.ts | 8 +- .../notifications/notificationsTelemetry.ts | 6 +- .../browser/parts/paneCompositePart.ts | 4 +- .../browser/parts/panel/panelPart.ts | 10 +- .../browser/parts/sidebar/sidebarPart.ts | 4 +- .../browser/parts/statusbar/statusbarModel.ts | 2 +- .../browser/parts/titlebar/menubarControl.ts | 4 +- .../workbench/browser/parts/views/treeView.ts | 8 +- .../workbench/browser/parts/views/viewPane.ts | 6 +- .../browser/parts/views/viewPaneContainer.ts | 22 ++-- .../browser/parts/views/viewsService.ts | 10 +- src/vs/workbench/browser/quickaccess.ts | 4 +- src/vs/workbench/browser/web.api.ts | 20 ++-- src/vs/workbench/browser/web.main.ts | 2 +- src/vs/workbench/browser/workbench.ts | 2 +- src/vs/workbench/common/editor.ts | 16 +-- src/vs/workbench/common/notifications.ts | 2 +- src/vs/workbench/common/views.ts | 72 ++++++------- src/vs/workbench/common/webview.ts | 4 +- .../contrib/bulkEdit/browser/bulkTextEdits.ts | 2 +- .../bulkEdit/browser/preview/bulkEditTree.ts | 2 +- .../browser/callHierarchyTree.ts | 2 +- .../callHierarchy/common/callHierarchy.ts | 2 +- .../inspectEditorTokens.ts | 6 +- .../browser/outline/documentSymbolsTree.ts | 4 +- .../quickaccess/gotoLineQuickAccess.ts | 2 +- .../quickaccess/gotoSymbolQuickAccess.ts | 2 +- .../codeEditor/browser/saveParticipants.ts | 12 +-- .../suggestEnabledInput.ts | 14 +-- .../electron-sandbox/selectionClipboard.ts | 2 +- .../contrib/comments/browser/commentNode.ts | 4 +- .../comments/browser/commentService.ts | 18 ++-- .../browser/commentsEditorContribution.ts | 6 +- .../customEditor/browser/customEditorInput.ts | 4 +- .../browser/customEditorInputFactory.ts | 2 +- .../customEditor/common/customEditor.ts | 4 +- .../common/customEditorModelManager.ts | 6 +- .../browser/breakpointEditorContribution.ts | 6 +- .../contrib/debug/browser/breakpointsView.ts | 2 +- .../debug/browser/debugActionViewItems.ts | 4 +- .../debug/browser/debugAdapterManager.ts | 4 +- .../browser/debugConfigurationManager.ts | 16 +-- .../contrib/debug/browser/debugProgress.ts | 2 +- .../contrib/debug/browser/debugService.ts | 8 +- .../contrib/debug/browser/debugSession.ts | 10 +- .../contrib/debug/browser/debugToolBar.ts | 2 +- .../contrib/debug/browser/debugViewlet.ts | 4 +- .../browser/extensionHostDebugService.ts | 2 +- .../contrib/debug/browser/rawDebugSession.ts | 2 +- .../workbench/contrib/debug/browser/repl.ts | 2 +- .../contrib/debug/browser/replFilter.ts | 8 +- .../workbench/contrib/debug/common/debug.ts | 30 +++--- .../contrib/debug/common/debugModel.ts | 12 +-- .../contrib/debug/common/debugSource.ts | 2 +- .../contrib/debug/common/debugStorage.ts | 2 +- .../contrib/debug/common/debugUtils.ts | 2 +- .../contrib/debug/common/debugViewModel.ts | 4 +- .../contrib/debug/common/replModel.ts | 2 +- .../workbench/contrib/debug/node/terminals.ts | 2 +- .../debug/test/browser/callStack.test.ts | 2 +- .../test/browser/debugANSIHandling.test.ts | 2 +- .../contrib/debug/test/browser/mockDebug.ts | 10 +- .../experiments/browser/experimentalPrompt.ts | 2 +- .../experiments/common/experimentService.ts | 12 +-- .../experimentService.test.ts | 2 +- .../experimentalPrompts.test.ts | 2 +- .../abstractRuntimeExtensionsEditor.ts | 4 +- .../dynamicWorkspaceRecommendations.ts | 10 +- .../browser/exeBasedRecommendations.ts | 2 +- .../extensions/browser/extensionEditor.ts | 10 +- ...ensionRecommendationNotificationService.ts | 30 +++--- .../browser/extensionRecommendations.ts | 2 +- .../extensionRecommendationsService.ts | 14 +-- .../browser/extensions.contribution.ts | 4 +- .../extensions/browser/extensionsActions.ts | 16 +-- .../extensions/browser/extensionsList.ts | 4 +- .../extensions/browser/extensionsViews.ts | 12 +-- .../browser/extensionsWorkbenchService.ts | 10 +- .../browser/fileBasedRecommendations.ts | 10 +- .../browser/workspaceRecommendations.ts | 2 +- .../contrib/extensions/common/extensions.ts | 4 +- .../extensions/common/extensionsUtils.ts | 2 +- .../electron-sandbox/extensionsSlowActions.ts | 2 +- .../reportExtensionIssueAction.ts | 4 +- .../common/contributedOpeners.ts | 2 +- .../common/externalUriOpenerService.ts | 12 +-- .../contrib/files/browser/explorerService.ts | 6 +- .../contrib/files/browser/fileActions.ts | 8 +- .../contrib/files/browser/fileCommands.ts | 2 +- .../contrib/files/browser/fileImportExport.ts | 6 +- .../workbench/contrib/files/browser/files.ts | 4 +- .../files/browser/views/explorerViewer.ts | 2 +- .../files/browser/views/openEditorsView.ts | 2 +- .../contrib/files/common/explorerModel.ts | 2 +- .../workbench/contrib/files/common/files.ts | 6 +- .../browser/interactive.contribution.ts | 22 ++-- .../browser/interactiveDocumentService.ts | 8 +- .../interactive/browser/interactiveEditor.ts | 2 +- .../contrib/markers/browser/markers.ts | 4 +- .../markers/browser/markersFilterOptions.ts | 10 +- .../markers/browser/markersTreeViewer.ts | 2 +- .../contrib/markers/browser/markersView.ts | 12 +-- .../editorStatusBar/editorStatusBar.ts | 4 +- .../browser/contrib/find/findModel.ts | 2 +- .../contrib/find/notebookFindReplaceWidget.ts | 4 +- .../contrib/outline/notebookOutline.ts | 2 +- .../notebook/browser/controller/apiActions.ts | 6 +- .../browser/controller/cellOperations.ts | 2 +- .../browser/controller/foldingController.ts | 4 +- .../browser/diff/diffElementViewModel.ts | 18 ++-- .../browser/diff/notebookDiffActions.ts | 8 +- .../browser/diff/notebookDiffEditorBrowser.ts | 4 +- .../browser/diff/notebookTextDiffEditor.ts | 12 +-- .../notebook/browser/extensionPoint.ts | 2 +- .../notebook/browser/notebook.contribution.ts | 10 +- .../notebook/browser/notebookBrowser.ts | 20 ++-- .../notebook/browser/notebookEditor.ts | 16 +-- .../browser/notebookEditorExtensions.ts | 4 +- .../browser/notebookEditorServiceImpl.ts | 4 +- .../notebook/browser/notebookEditorWidget.ts | 24 ++--- .../browser/notebookKernelServiceImpl.ts | 2 +- .../notebook/browser/notebookServiceImpl.ts | 4 +- .../services/notebookWorkerServiceImpl.ts | 4 +- .../browser/view/cellParts/cellDnd.ts | 4 +- .../view/cellParts/cellEditorOptions.ts | 2 +- .../browser/view/cellParts/cellOutput.ts | 2 +- .../browser/view/cellParts/cellToolbars.ts | 2 +- .../view/cellParts/codeCellRunToolbar.ts | 2 +- .../view/renderers/backLayerWebView.ts | 14 +-- .../browser/view/renderers/webviewMessages.ts | 12 +-- .../browser/view/renderers/webviewPreloads.ts | 50 ++++----- .../browser/viewModel/baseCellViewModel.ts | 4 +- .../browser/viewModel/foldingModel.ts | 2 +- .../viewModel/notebookViewModelImpl.ts | 12 +-- .../viewParts/notebookEditorDecorations.ts | 2 +- .../viewParts/notebookEditorToolbar.ts | 2 +- .../viewParts/notebookTopCellToolbar.ts | 2 +- .../common/model/notebookCellTextModel.ts | 2 +- .../common/notebookCellStatusBarService.ts | 2 +- .../contrib/notebook/common/notebookCommon.ts | 18 ++-- .../notebook/common/notebookEditorInput.ts | 2 +- .../common/notebookExecutionService.ts | 4 +- .../common/notebookExecutionStateService.ts | 2 +- .../notebook/common/notebookKernelService.ts | 4 +- .../notebook/common/notebookOptions.ts | 12 +-- .../notebook/common/notebookProvider.ts | 4 +- .../notebook/common/notebookService.ts | 6 +- .../common/services/notebookSimpleWorker.ts | 2 +- .../notebookExecutionStateService.test.ts | 2 +- .../browser/notebookKernelService.test.ts | 2 +- .../test/browser/testNotebookEditor.ts | 4 +- .../contrib/outline/browser/outlinePane.ts | 2 +- .../outline/browser/outlineViewState.ts | 2 +- .../output/browser/output.contribution.ts | 2 +- .../browser/performance.web.contribution.ts | 6 +- .../preferences/browser/keybindingsEditor.ts | 8 +- .../browser/preferencesRenderers.ts | 6 +- .../preferences/browser/settingsEditor2.ts | 6 +- .../preferences/browser/settingsTree.ts | 6 +- .../preferences/browser/settingsTreeModels.ts | 2 +- .../preferences/browser/settingsWidgets.ts | 12 +-- .../contrib/preferences/common/preferences.ts | 2 +- .../browser/relauncher.contribution.ts | 2 +- .../contrib/remote/browser/remote.ts | 42 ++++---- .../contrib/remote/browser/remoteExplorer.ts | 2 +- .../contrib/remote/browser/tunnelView.ts | 14 +-- .../contrib/remote/browser/urlFinder.ts | 4 +- .../electron-sandbox/remote.contribution.ts | 2 +- .../contrib/scm/browser/dirtydiffDecorator.ts | 6 +- src/vs/workbench/contrib/scm/browser/menus.ts | 2 +- .../contrib/scm/browser/scmViewPane.ts | 6 +- src/vs/workbench/contrib/scm/common/scm.ts | 2 +- .../search/browser/anythingQuickAccess.ts | 14 +-- .../contrib/search/browser/searchActions.ts | 4 +- .../contrib/search/browser/searchView.ts | 2 +- .../contrib/search/browser/searchWidget.ts | 4 +- .../search/browser/symbolsQuickAccess.ts | 6 +- .../workbench/contrib/search/common/search.ts | 4 +- .../contrib/search/common/searchModel.ts | 8 +- .../browser/searchEditor.contribution.ts | 28 ++--- .../searchEditor/browser/searchEditorInput.ts | 26 ++--- .../searchEditor/browser/searchEditorModel.ts | 2 +- .../browser/searchEditorSerialization.ts | 12 +-- .../browser/snippetCompletionProvider.ts | 4 +- .../contrib/tags/common/javaWorkspaceTags.ts | 2 +- .../tags/electron-sandbox/workspaceTags.ts | 4 +- .../tasks/browser/abstractTaskService.ts | 30 +++--- .../tasks/browser/runAutomaticTasks.ts | 2 +- .../contrib/tasks/browser/taskQuickPick.ts | 4 +- .../tasks/browser/terminalTaskSystem.ts | 6 +- .../contrib/tasks/common/problemCollectors.ts | 2 +- .../contrib/tasks/common/taskConfiguration.ts | 14 +-- .../contrib/tasks/common/taskService.ts | 2 +- .../workbench/contrib/tasks/common/tasks.ts | 4 +- .../tasks/test/common/configuration.test.ts | 6 +- .../browser/telemetry.contribution.ts | 46 ++++---- .../browser/links/terminalLinkManager.ts | 2 +- .../browser/links/terminalLinkQuickpick.ts | 2 +- .../links/terminalProtocolLinkProvider.ts | 2 +- .../terminalValidatedLocalLinkProvider.ts | 6 +- .../terminal/browser/remoteTerminalBackend.ts | 2 +- .../contrib/terminal/browser/terminal.ts | 16 +-- .../terminal/browser/terminalActions.ts | 2 +- .../terminal/browser/terminalContextMenu.ts | 2 +- .../browser/terminalDecorationsProvider.ts | 6 +- .../browser/terminalEditorSerializer.ts | 4 +- .../terminal/browser/terminalGroupService.ts | 8 +- .../terminal/browser/terminalInstance.ts | 8 +- .../contrib/terminal/browser/terminalMenus.ts | 10 +- .../browser/terminalProcessExtHostProxy.ts | 4 +- .../browser/terminalProfileQuickpick.ts | 2 +- .../browser/terminalProfileResolverService.ts | 2 +- .../terminal/browser/terminalService.ts | 4 +- .../browser/widgets/terminalHoverWidget.ts | 4 +- .../terminal/browser/xterm/xtermTerminal.ts | 2 +- .../common/environmentVariableService.ts | 4 +- .../terminal/common/remoteTerminalChannel.ts | 32 +++--- .../contrib/terminal/common/terminal.ts | 12 +-- .../terminal/common/terminalColorRegistry.ts | 2 +- .../terminal/common/terminalEnvironment.ts | 2 +- .../electron-sandbox/localTerminalBackend.ts | 4 +- .../browser/links/terminalLinkHelpers.test.ts | 2 +- .../terminalProtocolLinkProvider.test.ts | 4 +- ...terminalValidatedLocalLinkProvider.test.ts | 4 +- .../links/terminalWordLinkProvider.test.ts | 6 +- .../browser/terminalProfileService.test.ts | 4 +- .../test/browser/terminalTypeahead.test.ts | 4 +- .../test/browser/xterm/xtermTerminal.test.ts | 2 +- .../test/node/terminalProfiles.test.ts | 2 +- .../testing/browser/testingConfigurationUi.ts | 2 +- .../testing/browser/testingDecorations.ts | 10 +- .../testing/browser/testingOutputPeek.ts | 2 +- .../contrib/testing/browser/theme.ts | 4 +- .../testing/common/ownedTestCollection.ts | 2 +- .../contrib/testing/common/testCollection.ts | 4 +- .../contrib/testing/common/testCoverage.ts | 4 +- .../testing/common/testProfileService.ts | 8 +- .../testing/common/testResultStorage.ts | 4 +- .../contrib/testing/common/testService.ts | 2 +- .../testing/test/browser/testObjectTree.ts | 2 +- .../themes/browser/themes.contribution.ts | 4 +- .../browser/themes.test.contribution.ts | 6 +- .../contrib/timeline/browser/timelinePane.ts | 2 +- .../contrib/timeline/common/timeline.ts | 10 +- .../browser/typeHierarchyTree.ts | 2 +- .../typeHierarchy/common/typeHierarchy.ts | 2 +- .../contrib/url/browser/trustedDomains.ts | 4 +- .../url/browser/trustedDomainsValidator.ts | 2 +- .../userDataSync/browser/userDataSync.ts | 16 +-- .../userDataSync/browser/userDataSyncViews.ts | 4 +- .../contrib/webview/browser/overlayWebview.ts | 6 +- .../webview/browser/resourceLoading.ts | 2 +- .../contrib/webview/browser/themeing.ts | 2 +- .../contrib/webview/browser/webview.ts | 2 +- .../contrib/webview/browser/webviewElement.ts | 14 +-- .../browser/webviewWorkbenchService.ts | 36 +++---- .../webviewView/browser/webviewViewService.ts | 2 +- .../browser/gettingStarted.contribution.ts | 2 +- .../browser/gettingStarted.ts | 24 ++--- .../browser/gettingStartedInput.ts | 2 +- .../browser/gettingStartedList.ts | 2 +- .../browser/gettingStartedService.ts | 74 ++++++------- .../common/gettingStartedContent.ts | 44 ++++---- .../welcomePage/browser/welcomePage.ts | 2 +- .../common/newFile.contribution.ts | 2 +- .../common/viewsWelcomeContribution.ts | 2 +- .../browser/walkThroughInput.ts | 2 +- .../browser/walkThroughPart.ts | 12 +-- .../browser/workspace.contribution.ts | 44 ++++---- .../workspace/browser/workspaceTrustEditor.ts | 2 +- .../electron-sandbox/desktop.main.ts | 2 +- src/vs/workbench/electron-sandbox/window.ts | 2 +- .../electron-sandbox/accessibilityService.ts | 2 +- .../actions/common/menusExtensionPoint.ts | 10 +- .../assignment/common/assignmentService.ts | 4 +- .../browser/authenticationService.ts | 22 ++-- .../configuration/browser/configuration.ts | 2 +- .../browser/configurationService.ts | 8 +- .../configuration/common/configuration.ts | 2 +- .../browser/configurationResolverService.ts | 4 +- .../common/configurationResolver.ts | 4 +- .../common/variableResolver.ts | 2 +- .../configurationResolverService.test.ts | 6 +- .../electron-sandbox/contextmenuService.ts | 2 +- .../credentials/browser/credentialsService.ts | 2 +- .../browser/abstractFileDialogService.ts | 4 +- .../electron-sandbox/fileDialogService.ts | 2 +- .../editor/browser/editorResolverService.ts | 22 ++-- .../services/editor/browser/editorService.ts | 4 +- .../editor/common/editorGroupsService.ts | 12 +-- .../environment/common/environmentService.ts | 2 +- .../browser/extensionBisect.ts | 4 +- .../browser/extensionEnablementService.ts | 4 +- .../browser/webExtensionsScannerService.ts | 10 +- .../common/extensionRecommendations.ts | 8 +- .../common/extensionResourceLoader.ts | 4 +- .../extensions/browser/extensionUrlHandler.ts | 6 +- .../common/abstractExtensionService.ts | 18 ++-- .../extensions/common/extensionHostManager.ts | 14 +-- .../common/extensionHostProtocol.ts | 2 +- .../extensions/common/extensionHostProxy.ts | 2 +- .../extensionManifestPropertiesService.ts | 12 +-- .../services/extensions/common/extensions.ts | 2 +- .../services/extensions/common/rpcProtocol.ts | 16 +-- .../cachedExtensionScanner.ts | 2 +- .../electron-browser/extensionService.ts | 12 +-- .../localProcessExtensionHost.ts | 6 +- .../extensions/node/extensionPoints.ts | 10 +- .../test/common/rpcProtocol.test.ts | 2 +- .../common/filesConfigurationService.ts | 2 +- .../host/browser/browserHostService.ts | 4 +- .../workbench/services/hover/browser/hover.ts | 2 +- .../services/hover/browser/hoverWidget.ts | 14 +-- .../browser/keyboardLayoutService.ts | 2 +- .../keybinding/browser/navigatorKeyboard.ts | 2 +- .../keybinding/common/keybindingEditing.ts | 2 +- .../services/keybinding/common/keymapInfo.ts | 2 +- .../common/macLinuxKeyboardMapper.ts | 2 +- .../test/browser/keybindingEditing.test.ts | 4 +- .../services/label/common/labelService.ts | 4 +- .../languageDetectionWorkerServiceImpl.ts | 8 +- .../common/languageDetectionWorkerService.ts | 10 +- .../common/languageStatusService.ts | 2 +- .../services/layout/browser/layoutService.ts | 4 +- .../electron-sandbox/lifecycleService.ts | 4 +- .../services/outline/browser/outline.ts | 2 +- .../panecomposite/browser/panecomposite.ts | 4 +- .../preferences/browser/preferencesService.ts | 2 +- .../preferences/common/preferences.ts | 8 +- .../preferences/common/preferencesModels.ts | 4 +- .../common/preferencesValidation.ts | 6 +- .../browser/keybindingsEditorModel.test.ts | 4 +- .../remote/browser/remoteAgentService.ts | 6 +- .../remote/common/remoteExplorerService.ts | 62 +++++------ .../electron-sandbox/remoteAgentService.ts | 6 +- .../services/search/browser/searchService.ts | 6 +- .../services/search/common/getFileResults.ts | 4 +- .../common/localFileSearchWorkerTypes.ts | 20 ++-- .../services/search/common/queryBuilder.ts | 2 +- .../services/search/common/search.ts | 8 +- .../services/search/common/searchExtTypes.ts | 12 +-- .../services/search/common/searchHelpers.ts | 2 +- .../services/search/common/searchService.ts | 60 +++++------ .../services/search/node/fileSearch.ts | 2 +- .../services/search/node/rawSearchService.ts | 6 +- .../search/node/ripgrepTextSearchEngine.ts | 2 +- .../search/test/common/ignoreFile.test.ts | 2 +- .../node/ripgrepTextSearchEngineUtils.test.ts | 2 +- .../services/search/worker/localFileSearch.ts | 14 +-- .../services/statusbar/browser/statusbar.ts | 2 +- .../telemetry/browser/telemetryService.ts | 2 +- .../browser/workbenchCommonProperties.ts | 2 +- .../textMate/browser/nativeTextMateService.ts | 2 +- .../textMate/browser/textMateWorker.ts | 2 +- .../textMate/common/TMGrammarFactory.ts | 4 +- .../textMate/common/TMScopeRegistry.ts | 2 +- .../textfile/browser/textFileService.ts | 4 +- .../common/textFileEditorModelManager.ts | 6 +- .../common/textFileSaveParticipant.ts | 2 +- .../services/textfile/common/textfiles.ts | 4 +- .../electron-sandbox/nativeTextFileService.ts | 2 +- .../test/common/textFileService.io.test.ts | 8 +- .../themes/browser/fileIconThemeData.ts | 14 +-- .../themes/browser/workbenchThemeService.ts | 12 +-- .../themes/common/colorExtensionPoint.ts | 2 +- .../services/themes/common/colorThemeData.ts | 8 +- .../themes/common/iconExtensionPoint.ts | 2 +- .../themes/common/themeCompatibility.ts | 2 +- .../tokenStyleResolving.test.ts | 4 +- .../services/timer/browser/timerService.ts | 12 +-- .../common/untitledTextEditorInput.ts | 2 +- .../common/untitledTextEditorService.ts | 2 +- .../browser/userDataSyncWorkbenchService.ts | 12 +-- .../views/browser/viewDescriptorService.ts | 42 ++++---- .../views/common/viewContainerModel.ts | 36 +++---- .../common/fileWorkingCopyManager.ts | 2 +- .../common/storedFileWorkingCopyManager.ts | 4 +- .../storedFileWorkingCopySaveParticipant.ts | 2 +- .../common/untitledFileWorkingCopyManager.ts | 2 +- .../common/workingCopyBackupService.ts | 6 +- .../common/workingCopyFileService.ts | 10 +- .../workingCopyBackupTracker.ts | 2 +- .../browser/workingCopyBackupTracker.test.ts | 2 +- .../browser/workingCopyFileService.test.ts | 2 +- .../workingCopyBackupTracker.test.ts | 4 +- .../test/browser/parts/editor/editor.test.ts | 48 ++++----- .../parts/editor/editorGroupModel.test.ts | 6 +- .../browser/parts/editor/editorPane.test.ts | 4 +- .../parts/statusbar/statusbarModel.test.ts | 2 +- .../test/browser/workbenchTestServices.ts | 32 +++--- .../test/common/workbenchTestServices.ts | 2 +- .../electron-browser/workbenchTestServices.ts | 4 +- src/vscode-dts/vscode.d.ts | 56 +++++----- .../vscode.proposed.externalUriOpener.d.ts | 2 +- src/vscode-dts/vscode.proposed.fsChunks.d.ts | 2 +- .../vscode.proposed.notebookDebugOptions.d.ts | 2 +- .../vscode.proposed.notebookEditor.d.ts | 2 +- .../vscode.proposed.notebookLiveShare.d.ts | 2 +- .../vscode.proposed.notebookMessaging.d.ts | 2 +- .../vscode.proposed.portsAttributes.d.ts | 2 +- src/vscode-dts/vscode.proposed.resolvers.d.ts | 8 +- src/vscode-dts/vscode.proposed.tabs.d.ts | 4 +- .../vscode.proposed.testCoverage.d.ts | 2 +- .../vscode.proposed.textSearchProvider.d.ts | 6 +- src/vscode-dts/vscode.proposed.timeline.d.ts | 4 +- .../vscode.proposed.treeViewReveal.d.ts | 2 +- test/automation/src/application.ts | 2 +- test/automation/src/code.ts | 2 +- test/automation/src/electronDriver.ts | 2 +- test/automation/src/playwrightDriver.ts | 2 +- test/automation/src/terminal.ts | 6 +- test/integration/browser/src/index.ts | 2 +- test/smoke/src/main.ts | 18 ++-- 954 files changed, 3017 insertions(+), 3016 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 22cf0af001632..2a9157a07a765 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -45,6 +45,7 @@ "jsdoc/no-types": "warn", "semi": "off", "@typescript-eslint/semi": "warn", + "@typescript-eslint/member-delimiter-style": "warn", "@typescript-eslint/naming-convention": [ "warn", { diff --git a/build/azure-pipelines/mixin.ts b/build/azure-pipelines/mixin.ts index 35a2d7ae0ec1d..ccd98d6e77374 100644 --- a/build/azure-pipelines/mixin.ts +++ b/build/azure-pipelines/mixin.ts @@ -29,7 +29,7 @@ interface OSSProduct { } interface Product { - readonly builtInExtensions?: IBuiltInExtension[] | { 'include'?: IBuiltInExtension[], 'exclude'?: string[] }; + readonly builtInExtensions?: IBuiltInExtension[] | { 'include'?: IBuiltInExtension[]; 'exclude'?: string[] }; readonly webBuiltInExtensions?: IBuiltInExtension[]; } diff --git a/build/azure-pipelines/upload-nlsmetadata.ts b/build/azure-pipelines/upload-nlsmetadata.ts index f26efddcf6a22..82f2349f9f9a0 100644 --- a/build/azure-pipelines/upload-nlsmetadata.ts +++ b/build/azure-pipelines/upload-nlsmetadata.ts @@ -20,9 +20,9 @@ const commit = util.getVersion(root); const credential = new ClientSecretCredential(process.env['AZURE_TENANT_ID']!, process.env['AZURE_CLIENT_ID']!, process.env['AZURE_CLIENT_SECRET']!); interface NlsMetadata { - keys: { [module: string]: string }, - messages: { [module: string]: string }, - bundles: { [bundle: string]: string[] }, + keys: { [module: string]: string }; + messages: { [module: string]: string }; + bundles: { [bundle: string]: string[] }; } function main(): Promise { diff --git a/build/azure-pipelines/upload-sourcemaps.ts b/build/azure-pipelines/upload-sourcemaps.ts index f065ff2cf3866..ed092c0df1cbd 100644 --- a/build/azure-pipelines/upload-sourcemaps.ts +++ b/build/azure-pipelines/upload-sourcemaps.ts @@ -38,7 +38,7 @@ function main(): Promise { const vs = src('out-vscode-min'); // client source-maps only sources.push(vs); - const productionDependencies: { name: string, path: string, version: string }[] = deps.getProductionDependencies(root); + const productionDependencies: { name: string; path: string; version: string }[] = deps.getProductionDependencies(root); const productionDependenciesSrc = productionDependencies.map(d => path.relative(root, d.path)).map(d => `./${d}/**/*.map`); const nodeModules = vfs.src(productionDependenciesSrc, { base: '.' }) .pipe(util.cleanNodeModules(path.join(root, 'build', '.moduleignore'))); diff --git a/build/lib/asar.ts b/build/lib/asar.ts index 5cdbe4f4681e0..18ab7b01946d1 100644 --- a/build/lib/asar.ts +++ b/build/lib/asar.ts @@ -16,7 +16,7 @@ declare class AsarFilesystem { readonly header: unknown; constructor(src: string); insertDirectory(path: string, shouldUnpack?: boolean): unknown; - insertFile(path: string, shouldUnpack: boolean, file: { stat: { size: number; mode: number; }; }, options: {}): Promise; + insertFile(path: string, shouldUnpack: boolean, file: { stat: { size: number; mode: number } }, options: {}): Promise; } export function createAsar(folderPath: string, unpackGlobs: string[], destFilename: string): NodeJS.ReadWriteStream { @@ -38,7 +38,7 @@ export function createAsar(folderPath: string, unpackGlobs: string[], destFilena let onFileInserted = () => { pendingInserts--; }; // Do not insert twice the same directory - const seenDir: { [key: string]: boolean; } = {}; + const seenDir: { [key: string]: boolean } = {}; const insertDirectoryRecursive = (dir: string) => { if (seenDir[dir]) { return; @@ -65,7 +65,7 @@ export function createAsar(folderPath: string, unpackGlobs: string[], destFilena } }; - const insertFile = (relativePath: string, stat: { size: number; mode: number; }, shouldUnpack: boolean) => { + const insertFile = (relativePath: string, stat: { size: number; mode: number }, shouldUnpack: boolean) => { insertDirectoryForFile(relativePath); pendingInserts++; // Do not pass `onFileInserted` directly because it gets overwritten below. diff --git a/build/lib/builtInExtensions.ts b/build/lib/builtInExtensions.ts index 2c1cb3abba2c0..b41477161c944 100644 --- a/build/lib/builtInExtensions.ts +++ b/build/lib/builtInExtensions.ts @@ -31,7 +31,7 @@ export interface IExtensionDefinition { flags: string; }; publisherDisplayName: string; - } + }; } const root = path.dirname(path.dirname(__dirname)); diff --git a/build/lib/builtInExtensionsCG.ts b/build/lib/builtInExtensionsCG.ts index 2b758da5c9123..09b0bedd126d3 100644 --- a/build/lib/builtInExtensionsCG.ts +++ b/build/lib/builtInExtensionsCG.ts @@ -27,7 +27,7 @@ async function downloadExtensionDetails(extension: IExtensionDefinition): Promis const promises = []; for (const fileName of contentFileNames) { - promises.push(new Promise<{ fileName: string, body: Buffer | undefined | null }>(resolve => { + promises.push(new Promise<{ fileName: string; body: Buffer | undefined | null }>(resolve => { got(`${repositoryContentBaseUrl}/${fileName}`) .then(response => { resolve({ fileName, body: response.rawBody }); diff --git a/build/lib/bundle.ts b/build/lib/bundle.ts index ce1f6e61662f6..892ced8b85bfa 100644 --- a/build/lib/bundle.ts +++ b/build/lib/bundle.ts @@ -75,7 +75,7 @@ export interface IConcatFile { export interface IBundleData { graph: IGraph; - bundles: { [moduleId: string]: string[]; }; + bundles: { [moduleId: string]: string[] }; } export interface IBundleResult { @@ -91,7 +91,7 @@ interface IPartialBundleResult { export interface ILoaderConfig { isBuild?: boolean; - paths?: { [path: string]: any; }; + paths?: { [path: string]: any }; } /** @@ -106,7 +106,7 @@ export function bundle(entryPoints: IEntryPoint[], config: ILoaderConfig, callba entryPointsMap[module.name] = module; }); - const allMentionedModulesMap: { [modules: string]: boolean; } = {}; + const allMentionedModulesMap: { [modules: string]: boolean } = {}; entryPoints.forEach((module: IEntryPoint) => { allMentionedModulesMap[module.name] = true; (module.include || []).forEach(function (includedModule) { @@ -283,7 +283,7 @@ function extractStrings(destFiles: IConcatFile[]): IConcatFile[] { } // Do one pass to record the usage counts for each module id - const useCounts: { [moduleId: string]: number; } = {}; + const useCounts: { [moduleId: string]: number } = {}; destFile.sources.forEach((source) => { const matches = source.contents.match(/define\(("[^"]+"),\s*\[(((, )?("|')[^"']+("|'))+)\]/); if (!matches) { @@ -302,7 +302,7 @@ function extractStrings(destFiles: IConcatFile[]): IConcatFile[] { return useCounts[b] - useCounts[a]; }); - const replacementMap: { [moduleId: string]: number; } = {}; + const replacementMap: { [moduleId: string]: number } = {}; sortedByUseModules.forEach((module, index) => { replacementMap[module] = index; }); @@ -599,7 +599,7 @@ function visit(rootNodes: string[], graph: IGraph): INodeSet { function topologicalSort(graph: IGraph): string[] { const allNodes: INodeSet = {}, - outgoingEdgeCount: { [node: string]: number; } = {}, + outgoingEdgeCount: { [node: string]: number } = {}, inverseEdges: IGraph = {}; Object.keys(graph).forEach((fromNode: string) => { diff --git a/build/lib/compilation.ts b/build/lib/compilation.ts index a4c8441effc17..1325f89fd0484 100644 --- a/build/lib/compilation.ts +++ b/build/lib/compilation.ts @@ -132,7 +132,7 @@ class MonacoGenerator { private readonly _isWatch: boolean; public readonly stream: NodeJS.ReadWriteStream; - private readonly _watchedFiles: { [filePath: string]: boolean; }; + private readonly _watchedFiles: { [filePath: string]: boolean }; private readonly _fsProvider: monacodts.FSProvider; private readonly _declarationResolver: monacodts.DeclarationResolver; diff --git a/build/lib/electron.ts b/build/lib/electron.ts index 12f9013745e6b..a3d696b75cc5f 100644 --- a/build/lib/electron.ts +++ b/build/lib/electron.ts @@ -14,11 +14,11 @@ import * as util from './util'; type DarwinDocumentSuffix = 'document' | 'script' | 'file' | 'source code'; type DarwinDocumentType = { - name: string, - role: string, - ostypes: string[], - extensions: string[], - iconFile: string, + name: string; + role: string; + ostypes: string[]; + extensions: string[]; + iconFile: string; }; function isDocumentSuffix(str?: string): str is DarwinDocumentSuffix { diff --git a/build/lib/eslint/code-no-unexternalized-strings.ts b/build/lib/eslint/code-no-unexternalized-strings.ts index 8d9e142bb7f38..056a99868ea10 100644 --- a/build/lib/eslint/code-no-unexternalized-strings.ts +++ b/build/lib/eslint/code-no-unexternalized-strings.ts @@ -29,7 +29,7 @@ export = new class NoUnexternalizedStrings implements eslint.Rule.RuleModule { create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener { - const externalizedStringLiterals = new Map(); + const externalizedStringLiterals = new Map(); const doubleQuotedStringLiterals = new Set(); function collectDoubleQuotedStrings(node: TSESTree.Literal) { diff --git a/build/lib/eslint/vscode-dts-event-naming.ts b/build/lib/eslint/vscode-dts-event-naming.ts index 3f91c65049f95..956ba346087ef 100644 --- a/build/lib/eslint/vscode-dts-event-naming.ts +++ b/build/lib/eslint/vscode-dts-event-naming.ts @@ -24,7 +24,7 @@ export = new class ApiEventNaming implements eslint.Rule.RuleModule { create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener { - const config = <{ allowed: string[], verbs: string[] }>context.options[0]; + const config = <{ allowed: string[]; verbs: string[] }>context.options[0]; const allowed = new Set(config.allowed); const verbs = new Set(config.verbs); diff --git a/build/lib/extensions.ts b/build/lib/extensions.ts index 3578bf1bd0ba7..b75215b4ef21b 100644 --- a/build/lib/extensions.ts +++ b/build/lib/extensions.ts @@ -409,7 +409,7 @@ export function scanBuiltinExtensions(extensionsRoot: string, exclude: string[] export function translatePackageJSON(packageJSON: string, packageNLSPath: string) { interface NLSFormat { - [key: string]: string | { message: string, comment: string[] }; + [key: string]: string | { message: string; comment: string[] }; } const CharCode_PC = '%'.charCodeAt(0); const packageNls: NLSFormat = JSON.parse(fs.readFileSync(packageNLSPath).toString()); @@ -446,7 +446,7 @@ const esbuildMediaScripts = [ 'markdown-math/esbuild.js', ]; -export async function webpackExtensions(taskName: string, isWatch: boolean, webpackConfigLocations: { configPath: string, outputRoot?: string }[]) { +export async function webpackExtensions(taskName: string, isWatch: boolean, webpackConfigLocations: { configPath: string; outputRoot?: string }[]) { const webpack = require('webpack') as typeof import('webpack'); const webpackConfigs: webpack.Configuration[] = []; @@ -515,7 +515,7 @@ export async function webpackExtensions(taskName: string, isWatch: boolean, webp }); } -async function esbuildExtensions(taskName: string, isWatch: boolean, scripts: { script: string, outputRoot?: string }[]) { +async function esbuildExtensions(taskName: string, isWatch: boolean, scripts: { script: string; outputRoot?: string }[]) { function reporter(stdError: string, script: string) { const matches = (stdError || '').match(/\> (.+): error: (.+)?/g); fancyLog(`Finished ${ansiColors.green(taskName)} ${script} with ${matches ? matches.length : 0} errors.`); diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts index b3f7e0b518a10..308dc94a95028 100644 --- a/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -277,7 +277,7 @@ export class XLF { static parsePseudo = function (xlfString: string): Promise { return new Promise((resolve) => { let parser = new xml2js.Parser(); - let files: { messages: Map, originalFilePath: string, language: string }[] = []; + let files: { messages: Map; originalFilePath: string; language: string }[] = []; parser.parseString(xlfString, function (_err: any, result: any) { const fileNodes: any[] = result['xliff']['file']; fileNodes.forEach(file => { @@ -304,7 +304,7 @@ export class XLF { return new Promise((resolve, reject) => { let parser = new xml2js.Parser(); - let files: { messages: Map, originalFilePath: string, language: string }[] = []; + let files: { messages: Map; originalFilePath: string; language: string }[] = []; parser.parseString(xlfString, function (err: any, result: any) { if (err) { diff --git a/build/lib/monaco-api.ts b/build/lib/monaco-api.ts index 31487baf0a971..69deaf7471c99 100644 --- a/build/lib/monaco-api.ts +++ b/build/lib/monaco-api.ts @@ -111,7 +111,7 @@ function getTopLevelDeclaration(ts: typeof import('typescript'), sourceFile: ts. } -function getNodeText(sourceFile: ts.SourceFile, node: { pos: number; end: number; }): string { +function getNodeText(sourceFile: ts.SourceFile, node: { pos: number; end: number }): string { return sourceFile.getFullText().substring(node.pos, node.end); } @@ -461,7 +461,7 @@ function generateDeclarationFile(ts: typeof import('typescript'), recipe: string let replacer = createReplacer(m2[2]); let typeNames = m2[3].split(/,/); - let typesToExcludeMap: { [typeName: string]: boolean; } = {}; + let typesToExcludeMap: { [typeName: string]: boolean } = {}; let typesToExcludeArr: string[] = []; typeNames.forEach((typeName) => { typeName = typeName.trim(); @@ -599,7 +599,7 @@ class CacheEntry { export class DeclarationResolver { public readonly ts: typeof import('typescript'); - private _sourceFileCache: { [moduleId: string]: CacheEntry | null; }; + private _sourceFileCache: { [moduleId: string]: CacheEntry | null }; constructor(private readonly _fsProvider: FSProvider) { this.ts = require('typescript') as typeof import('typescript'); @@ -667,8 +667,8 @@ export function run3(resolver: DeclarationResolver): IMonacoDeclarationResult | -interface ILibMap { [libName: string]: string; } -interface IFileMap { [fileName: string]: string; } +interface ILibMap { [libName: string]: string } +interface IFileMap { [fileName: string]: string } class TypeScriptLanguageServiceHost implements ts.LanguageServiceHost { diff --git a/build/lib/standalone.ts b/build/lib/standalone.ts index 8b87b9fa4ae56..3483de02a3966 100644 --- a/build/lib/standalone.ts +++ b/build/lib/standalone.ts @@ -10,7 +10,7 @@ import * as tss from './treeshaking'; const REPO_ROOT = path.join(__dirname, '../../'); const SRC_DIR = path.join(REPO_ROOT, 'src'); -let dirCache: { [dir: string]: boolean; } = {}; +let dirCache: { [dir: string]: boolean } = {}; function writeFile(filePath: string, contents: Buffer | string): void { function ensureDirs(dirPath: string): void { @@ -69,7 +69,7 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str writeFile(path.join(options.destRoot, fileName), result[fileName]); } } - let copied: { [fileName: string]: boolean; } = {}; + let copied: { [fileName: string]: boolean } = {}; const copyFile = (fileName: string) => { if (copied[fileName]) { return; @@ -131,7 +131,7 @@ export interface IOptions2 { outFolder: string; outResourcesFolder: string; ignores: string[]; - renames: { [filename: string]: string; }; + renames: { [filename: string]: string }; } export function createESMSourcesAndResources2(options: IOptions2): void { diff --git a/build/lib/treeshaking.ts b/build/lib/treeshaking.ts index 0ce7e8c0a0187..9ea3a2e0c4855 100644 --- a/build/lib/treeshaking.ts +++ b/build/lib/treeshaking.ts @@ -59,7 +59,7 @@ export interface ITreeShakingOptions { */ importIgnorePattern: RegExp; - redirects: { [module: string]: string; }; + redirects: { [module: string]: string }; } export interface ITreeShakingResult { @@ -140,7 +140,7 @@ function createTypeScriptLanguageService(ts: typeof import('typescript'), option function discoverAndReadFiles(ts: typeof import('typescript'), options: ITreeShakingOptions): IFileMap { const FILES: IFileMap = {}; - const in_queue: { [module: string]: boolean; } = Object.create(null); + const in_queue: { [module: string]: boolean } = Object.create(null); const queue: string[] = []; const enqueue = (moduleId: string) => { @@ -225,8 +225,8 @@ function processLibFiles(ts: typeof import('typescript'), options: ITreeShakingO return result; } -interface ILibMap { [libName: string]: string; } -interface IFileMap { [fileName: string]: string; } +interface ILibMap { [libName: string]: string } +interface IFileMap { [fileName: string]: string } /** * A TypeScript language service host diff --git a/build/lib/watch/watch-win32.ts b/build/lib/watch/watch-win32.ts index 833c8d9c67240..fa65a5bdeb280 100644 --- a/build/lib/watch/watch-win32.ts +++ b/build/lib/watch/watch-win32.ts @@ -68,9 +68,9 @@ function watch(root: string): Stream { return result; } -const cache: { [cwd: string]: Stream; } = Object.create(null); +const cache: { [cwd: string]: Stream } = Object.create(null); -module.exports = function (pattern: string | string[] | filter.FileFunction, options?: { cwd?: string; base?: string; }) { +module.exports = function (pattern: string | string[] | filter.FileFunction, options?: { cwd?: string; base?: string }) { options = options || {}; const cwd = path.normalize(options.cwd || process.cwd()); diff --git a/extensions/configuration-editing/src/configurationEditingMain.ts b/extensions/configuration-editing/src/configurationEditingMain.ts index 9e7f2d247def6..cc8fc81576f7c 100644 --- a/extensions/configuration-editing/src/configurationEditingMain.ts +++ b/extensions/configuration-editing/src/configurationEditingMain.ts @@ -142,7 +142,7 @@ vscode.languages.registerDocumentSymbolProvider({ pattern: '**/launch.json', lan }, { label: 'Launch Targets' }); function registerContextKeyCompletions(): vscode.Disposable { - type ContextKeyInfo = { key: string, type?: string, description?: string }; + type ContextKeyInfo = { key: string; type?: string; description?: string }; const paths = new Map([ [{ language: 'jsonc', pattern: '**/keybindings.json' }, [ diff --git a/extensions/configuration-editing/src/settingsDocumentHelper.ts b/extensions/configuration-editing/src/settingsDocumentHelper.ts index 11282899b81f0..d5928592b5a02 100644 --- a/extensions/configuration-editing/src/settingsDocumentHelper.ts +++ b/extensions/configuration-editing/src/settingsDocumentHelper.ts @@ -277,7 +277,7 @@ export class SettingsDocument { return item; } - private newSnippetCompletionItem(o: { label: string; documentation?: string; snippet: string; range: vscode.Range; }): vscode.CompletionItem { + private newSnippetCompletionItem(o: { label: string; documentation?: string; snippet: string; range: vscode.Range }): vscode.CompletionItem { const item = new vscode.CompletionItem(o.label); item.kind = vscode.CompletionItemKind.Value; item.documentation = o.documentation; diff --git a/extensions/css-language-features/client/src/browser/cssClientMain.ts b/extensions/css-language-features/client/src/browser/cssClientMain.ts index 2a5e3e1f2c24e..0cfde9025f3a3 100644 --- a/extensions/css-language-features/client/src/browser/cssClientMain.ts +++ b/extensions/css-language-features/client/src/browser/cssClientMain.ts @@ -12,7 +12,7 @@ declare const Worker: { new(stringUrl: string): any; }; declare const TextDecoder: { - new(encoding?: string): { decode(buffer: ArrayBuffer): string; }; + new(encoding?: string): { decode(buffer: ArrayBuffer): string }; }; // this method is called when vs code is activated diff --git a/extensions/css-language-features/client/src/cssClient.ts b/extensions/css-language-features/client/src/cssClient.ts index ca97338f35f81..8cf472d0a1694 100644 --- a/extensions/css-language-features/client/src/cssClient.ts +++ b/extensions/css-language-features/client/src/cssClient.ts @@ -18,7 +18,7 @@ const localize = nls.loadMessageBundle(); export type LanguageClientConstructor = (name: string, description: string, clientOptions: LanguageClientOptions) => CommonLanguageClient; export interface Runtime { - TextDecoder: { new(encoding?: string): { decode(buffer: ArrayBuffer): string; } }; + TextDecoder: { new(encoding?: string): { decode(buffer: ArrayBuffer): string } }; fs?: RequestService; } diff --git a/extensions/css-language-features/client/src/requests.ts b/extensions/css-language-features/client/src/requests.ts index f06ce978c6474..6aea3ab8fade3 100644 --- a/extensions/css-language-features/client/src/requests.ts +++ b/extensions/css-language-features/client/src/requests.ts @@ -8,7 +8,7 @@ import { RequestType, CommonLanguageClient } from 'vscode-languageclient'; import { Runtime } from './cssClient'; export namespace FsContentRequest { - export const type: RequestType<{ uri: string; encoding?: string; }, string, any> = new RequestType('fs/content'); + export const type: RequestType<{ uri: string; encoding?: string }, string, any> = new RequestType('fs/content'); } export namespace FsStatRequest { export const type: RequestType = new RequestType('fs/stat'); @@ -19,7 +19,7 @@ export namespace FsReadDirRequest { } export function serveFileSystemRequests(client: CommonLanguageClient, runtime: Runtime) { - client.onRequest(FsContentRequest.type, (param: { uri: string; encoding?: string; }) => { + client.onRequest(FsContentRequest.type, (param: { uri: string; encoding?: string }) => { const uri = Uri.parse(param.uri); if (uri.scheme === 'file' && runtime.fs) { return runtime.fs.getContent(param.uri); diff --git a/extensions/css-language-features/server/src/cssServer.ts b/extensions/css-language-features/server/src/cssServer.ts index 2108b64dd2c73..89810d0ae41e7 100644 --- a/extensions/css-language-features/server/src/cssServer.ts +++ b/extensions/css-language-features/server/src/cssServer.ts @@ -30,7 +30,7 @@ export interface RuntimeEnvironment { readonly timer: { setImmediate(callback: (...args: any[]) => void, ...args: any[]): Disposable; setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; - } + }; } export function startServer(connection: Connection, runtime: RuntimeEnvironment) { diff --git a/extensions/css-language-features/server/src/languageModelCache.ts b/extensions/css-language-features/server/src/languageModelCache.ts index d069af0f7b6c4..343d57a9ad6d2 100644 --- a/extensions/css-language-features/server/src/languageModelCache.ts +++ b/extensions/css-language-features/server/src/languageModelCache.ts @@ -12,7 +12,7 @@ export interface LanguageModelCache { } export function getLanguageModelCache(maxEntries: number, cleanupIntervalTimeInSec: number, parse: (document: TextDocument) => T): LanguageModelCache { - let languageModels: { [uri: string]: { version: number, languageId: string, cTime: number, languageModel: T } } = {}; + let languageModels: { [uri: string]: { version: number; languageId: string; cTime: number; languageModel: T } } = {}; let nModels = 0; let cleanupInterval: NodeJS.Timer | undefined = undefined; diff --git a/extensions/css-language-features/server/src/requests.ts b/extensions/css-language-features/server/src/requests.ts index 8ace0b0c8994b..0726af35c562b 100644 --- a/extensions/css-language-features/server/src/requests.ts +++ b/extensions/css-language-features/server/src/requests.ts @@ -7,7 +7,7 @@ import { RequestType, Connection } from 'vscode-languageserver'; import { RuntimeEnvironment } from './cssServer'; export namespace FsContentRequest { - export const type: RequestType<{ uri: string; encoding?: string; }, string, any> = new RequestType('fs/content'); + export const type: RequestType<{ uri: string; encoding?: string }, string, any> = new RequestType('fs/content'); } export namespace FsStatRequest { export const type: RequestType = new RequestType('fs/stat'); diff --git a/extensions/css-language-features/server/src/test/completion.test.ts b/extensions/css-language-features/server/src/test/completion.test.ts index ec336448a5048..6881dd0e3e351 100644 --- a/extensions/css-language-features/server/src/test/completion.test.ts +++ b/extensions/css-language-features/server/src/test/completion.test.ts @@ -31,7 +31,7 @@ suite('Completions', () => { } }; - async function assertCompletions(value: string, expected: { count?: number, items?: ItemDescription[] }, testUri: string, workspaceFolders?: WorkspaceFolder[], lang: string = 'css'): Promise { + async function assertCompletions(value: string, expected: { count?: number; items?: ItemDescription[] }, testUri: string, workspaceFolders?: WorkspaceFolder[], lang: string = 'css'): Promise { const offset = value.indexOf('|'); value = value.substr(0, offset) + value.substr(offset + 1); diff --git a/extensions/emmet/src/imageSizeHelper.ts b/extensions/emmet/src/imageSizeHelper.ts index b012ab624ee34..28817dfbf3933 100644 --- a/extensions/emmet/src/imageSizeHelper.ts +++ b/extensions/emmet/src/imageSizeHelper.ts @@ -14,10 +14,10 @@ import { ISizeCalculationResult } from 'image-size/dist/types/interface'; const reUrl = /^https?:/; export type ImageInfoWithScale = { - realWidth: number, - realHeight: number, - width: number, - height: number + realWidth: number; + realHeight: number; + width: number; + height: number; }; /** diff --git a/extensions/emmet/src/updateTag.ts b/extensions/emmet/src/updateTag.ts index bfb766719933b..d58cd31505cd2 100644 --- a/extensions/emmet/src/updateTag.ts +++ b/extensions/emmet/src/updateTag.ts @@ -9,8 +9,8 @@ import { HtmlNode as HtmlFlatNode } from 'EmmetFlatNode'; import { getRootNode } from './parseDocument'; interface TagRange { - name: string, - range: vscode.Range + name: string; + range: vscode.Range; } export async function updateTag(tagName: string | undefined): Promise { diff --git a/extensions/extension-editing/src/packageDocumentHelper.ts b/extensions/extension-editing/src/packageDocumentHelper.ts index cbc868014920d..1df613ed645c4 100644 --- a/extensions/extension-editing/src/packageDocumentHelper.ts +++ b/extensions/extension-editing/src/packageDocumentHelper.ts @@ -74,7 +74,7 @@ export class PackageDocument { return item; } - private newSnippetCompletionItem(o: { label: string; documentation?: string; snippet: string; range: vscode.Range; }): vscode.CompletionItem { + private newSnippetCompletionItem(o: { label: string; documentation?: string; snippet: string; range: vscode.Range }): vscode.CompletionItem { const item = new vscode.CompletionItem(o.label); item.kind = vscode.CompletionItemKind.Value; item.documentation = o.documentation; diff --git a/extensions/git-base/src/remoteSource.ts b/extensions/git-base/src/remoteSource.ts index 8f51ad0d39906..50dec70863e97 100644 --- a/extensions/git-base/src/remoteSource.ts +++ b/extensions/git-base/src/remoteSource.ts @@ -81,7 +81,7 @@ class RemoteSourceProviderQuickPick { export async function pickRemoteSource(model: Model, options: PickRemoteSourceOptions & { branch?: false | undefined }): Promise; export async function pickRemoteSource(model: Model, options: PickRemoteSourceOptions & { branch: true }): Promise; export async function pickRemoteSource(model: Model, options: PickRemoteSourceOptions = {}): Promise { - const quickpick = window.createQuickPick<(QuickPickItem & { provider?: RemoteSourceProvider, url?: string })>(); + const quickpick = window.createQuickPick<(QuickPickItem & { provider?: RemoteSourceProvider; url?: string })>(); quickpick.ignoreFocusOut = true; if (options.providerName) { diff --git a/extensions/git/src/api/api1.ts b/extensions/git/src/api/api1.ts index f6ae052e177ba..41be52f18785f 100644 --- a/extensions/git/src/api/api1.ts +++ b/extensions/git/src/api/api1.ts @@ -68,7 +68,7 @@ export class ApiRepository implements Repository { return this._repository.apply(patch, reverse); } - getConfigs(): Promise<{ key: string; value: string; }[]> { + getConfigs(): Promise<{ key: string; value: string }[]> { return this._repository.getConfigs(); } @@ -84,11 +84,11 @@ export class ApiRepository implements Repository { return this._repository.getGlobalConfig(key); } - getObjectDetails(treeish: string, path: string): Promise<{ mode: string; object: string; size: number; }> { + getObjectDetails(treeish: string, path: string): Promise<{ mode: string; object: string; size: number }> { return this._repository.getObjectDetails(treeish, path); } - detectObjectType(object: string): Promise<{ mimetype: string, encoding?: string }> { + detectObjectType(object: string): Promise<{ mimetype: string; encoding?: string }> { return this._repository.detectObjectType(object); } diff --git a/extensions/git/src/askpass.ts b/extensions/git/src/askpass.ts index f4ba1e84573ce..e19340425131e 100644 --- a/extensions/git/src/askpass.ts +++ b/extensions/git/src/askpass.ts @@ -30,7 +30,7 @@ export class Askpass implements IIPCHandler { } } - async handle({ request, host }: { request: string, host: string }): Promise { + async handle({ request, host }: { request: string; host: string }): Promise { const config = workspace.getConfiguration('git', null); const enabled = config.get('enabled'); @@ -72,7 +72,7 @@ export class Askpass implements IIPCHandler { return await window.showInputBox(options) || ''; } - getEnv(): { [key: string]: string; } { + getEnv(): { [key: string]: string } { if (!this.ipc) { return { GIT_ASKPASS: path.join(__dirname, 'askpass-empty.sh') diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 913627c892257..eaff2861937d2 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -186,7 +186,7 @@ function command(commandId: string, options: ScmCommandOptions = {}): Function { // 'image/bmp' // ]; -async function categorizeResourceByResolution(resources: Resource[]): Promise<{ merge: Resource[], resolved: Resource[], unresolved: Resource[], deletionConflicts: Resource[] }> { +async function categorizeResourceByResolution(resources: Resource[]): Promise<{ merge: Resource[]; resolved: Resource[]; unresolved: Resource[]; deletionConflicts: Resource[] }> { const selection = resources.filter(s => s instanceof Resource) as Resource[]; const merge = selection.filter(s => s.resourceGroupType === ResourceGroupType.Merge); const isBothAddedOrModified = (s: Resource) => s.type === Status.BOTH_MODIFIED || s.type === Status.BOTH_ADDED; @@ -282,7 +282,7 @@ interface PushOptions { remote?: string; refspec?: string; setUpstream?: boolean; - } + }; } class CommandErrorOutputTextDocumentContentProvider implements TextDocumentContentProvider { @@ -544,7 +544,7 @@ export class CommandCenter { } else { const placeHolder = localize('init', "Pick workspace folder to initialize git repo in"); const pick = { label: localize('choose', "Choose Folder...") }; - const items: { label: string, folder?: WorkspaceFolder }[] = [ + const items: { label: string; folder?: WorkspaceFolder }[] = [ ...workspace.workspaceFolders.map(folder => ({ label: folder.name, description: folder.uri.fsPath, folder })), pick ]; @@ -1683,7 +1683,7 @@ export class CommandCenter { return this._checkout(repository, { detached: true, treeish }); } - private async _checkout(repository: Repository, opts?: { detached?: boolean, treeish?: string }): Promise { + private async _checkout(repository: Repository, opts?: { detached?: boolean; treeish?: string }): Promise { if (typeof opts?.treeish === 'string') { await repository.checkout(opts?.treeish, opts); return true; @@ -2698,7 +2698,7 @@ export class CommandCenter { env.clipboard.writeText(item.message); } - private _selectedForCompare: { uri: Uri, item: GitTimelineItem } | undefined; + private _selectedForCompare: { uri: Uri; item: GitTimelineItem } | undefined; @command('git.timeline.selectForCompare', { repository: false }) async timelineSelectForCompare(item: TimelineItem, uri: Uri | undefined, _source: string) { @@ -2959,7 +2959,7 @@ export class CommandCenter { } return result; - }, [] as { repository: Repository, resources: Uri[] }[]); + }, [] as { repository: Repository; resources: Uri[] }[]); const promises = groups .map(({ repository, resources }) => fn(repository as Repository, isSingleResource ? resources[0] : resources)); diff --git a/extensions/git/src/decorationProvider.ts b/extensions/git/src/decorationProvider.ts index 63c0260519232..637b30d198a5e 100644 --- a/extensions/git/src/decorationProvider.ts +++ b/extensions/git/src/decorationProvider.ts @@ -16,7 +16,7 @@ class GitIgnoreDecorationProvider implements FileDecorationProvider { private static Decoration: FileDecoration = { color: new ThemeColor('gitDecoration.ignoredResourceForeground') }; readonly onDidChangeFileDecorations: Event; - private queue = new Map>; }>(); + private queue = new Map> }>(); private disposables: Disposable[] = []; constructor(private model: Model) { diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 76ded13313dc1..3d29790f58fa4 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -858,7 +858,7 @@ export class Repository { return result.stdout.trim(); } - async getConfigs(scope: string): Promise<{ key: string; value: string; }[]> { + async getConfigs(scope: string): Promise<{ key: string; value: string }[]> { const args = ['config']; if (scope) { @@ -960,7 +960,7 @@ export class Repository { return stdout; } - async getObjectDetails(treeish: string, path: string): Promise<{ mode: string, object: string, size: number }> { + async getObjectDetails(treeish: string, path: string): Promise<{ mode: string; object: string; size: number }> { if (!treeish) { // index const elements = await this.lsfiles(path); @@ -998,7 +998,7 @@ export class Repository { async getGitRelativePath(ref: string, relativePath: string): Promise { const relativePathLowercase = relativePath.toLowerCase(); const dirname = path.posix.dirname(relativePath) + '/'; - const elements: { file: string; }[] = ref ? await this.lstree(ref, dirname) : await this.lsfiles(dirname); + const elements: { file: string }[] = ref ? await this.lstree(ref, dirname) : await this.lsfiles(dirname); const element = elements.filter(file => file.file.toLowerCase() === relativePathLowercase)[0]; if (!element) { @@ -1008,7 +1008,7 @@ export class Repository { return element.file; } - async detectObjectType(object: string): Promise<{ mimetype: string, encoding?: string }> { + async detectObjectType(object: string): Promise<{ mimetype: string; encoding?: string }> { const child = await this.stream(['show', '--textconv', object]); const buffer = await readBytes(child.stdout!, 4100); @@ -1308,7 +1308,7 @@ export class Repository { await this.exec(['update-index', add, '--cacheinfo', mode, hash, path]); } - async checkout(treeish: string, paths: string[], opts: { track?: boolean, detached?: boolean } = Object.create(null)): Promise { + async checkout(treeish: string, paths: string[], opts: { track?: boolean; detached?: boolean } = Object.create(null)): Promise { const args = ['checkout', '-q']; if (opts.track) { @@ -1570,7 +1570,7 @@ export class Repository { await this.exec(args); } - async fetch(options: { remote?: string, ref?: string, all?: boolean, prune?: boolean, depth?: number, silent?: boolean, readonly cancellationToken?: CancellationToken } = {}): Promise { + async fetch(options: { remote?: string; ref?: string; all?: boolean; prune?: boolean; depth?: number; silent?: boolean; readonly cancellationToken?: CancellationToken } = {}): Promise { const args = ['fetch']; const spawnOptions: SpawnOptions = { cancellationToken: options.cancellationToken, @@ -1813,8 +1813,8 @@ export class Repository { } } - getStatus(opts?: { limit?: number, ignoreSubmodules?: boolean }): Promise<{ status: IFileStatus[]; statusLength: number; didHitLimit: boolean; }> { - return new Promise<{ status: IFileStatus[]; statusLength: number; didHitLimit: boolean; }>((c, e) => { + getStatus(opts?: { limit?: number; ignoreSubmodules?: boolean }): Promise<{ status: IFileStatus[]; statusLength: number; didHitLimit: boolean }> { + return new Promise<{ status: IFileStatus[]; statusLength: number; didHitLimit: boolean }>((c, e) => { const parser = new GitStatusParser(); const env = { GIT_OPTIONAL_LOCKS: '0' }; const args = ['status', '-z', '-u']; @@ -1894,7 +1894,7 @@ export class Repository { .map(([ref]) => ({ name: ref, type: RefType.Head } as Branch)); } - async getRefs(opts?: { sort?: 'alphabetically' | 'committerdate', contains?: string, pattern?: string, count?: number }): Promise { + async getRefs(opts?: { sort?: 'alphabetically' | 'committerdate'; contains?: string; pattern?: string; count?: number }): Promise { const args = ['for-each-ref']; if (opts?.count) { diff --git a/extensions/git/src/ipc/ipcServer.ts b/extensions/git/src/ipc/ipcServer.ts index 5cea9faf98fdd..ad4583cbfe1ae 100644 --- a/extensions/git/src/ipc/ipcServer.ts +++ b/extensions/git/src/ipc/ipcServer.ts @@ -61,7 +61,7 @@ export async function createIPCServer(context?: string): Promise { export interface IIPCServer extends Disposable { readonly ipcHandlePath: string | undefined; - getEnv(): { [key: string]: string; }; + getEnv(): { [key: string]: string }; registerHandler(name: string, handler: IIPCHandler): Disposable; } @@ -106,7 +106,7 @@ class IPCServer implements IIPCServer, Disposable { }); } - getEnv(): { [key: string]: string; } { + getEnv(): { [key: string]: string } { return { VSCODE_GIT_IPC_HANDLE: this.ipcHandlePath }; } diff --git a/extensions/git/src/main.ts b/extensions/git/src/main.ts index f31a64d9c33d9..97ac84b27cbf6 100644 --- a/extensions/git/src/main.ts +++ b/extensions/git/src/main.ts @@ -25,7 +25,7 @@ import { GitTimelineProvider } from './timelineProvider'; import { registerAPICommands } from './api/api1'; import { TerminalEnvironmentManager } from './terminal'; -const deactivateTasks: { (): Promise; }[] = []; +const deactivateTasks: { (): Promise }[] = []; export async function deactivate(): Promise { for (const task of deactivateTasks) { @@ -165,7 +165,7 @@ export async function _activate(context: ExtensionContext): Promise outputChannel.show()); disposables.push(outputChannel); - const { name, version, aiKey } = require('../package.json') as { name: string, version: string, aiKey: string }; + const { name, version, aiKey } = require('../package.json') as { name: string; version: string; aiKey: string }; const telemetryReporter = new TelemetryReporter(name, version, aiKey); deactivateTasks.push(() => telemetryReporter.dispose()); diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 6b2205ddcb724..3d9aa32a46c9b 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -1071,7 +1071,7 @@ export class Repository implements Disposable { return await this.repository.getCommitTemplate(); } - getConfigs(): Promise<{ key: string; value: string; }[]> { + getConfigs(): Promise<{ key: string; value: string }[]> { return this.run(Operation.Config, () => this.repository.getConfigs('local')); } @@ -1152,7 +1152,7 @@ export class Repository implements Disposable { return this.run(Operation.HashObject, () => this.repository.hashObject(data)); } - async add(resources: Uri[], opts?: { update?: boolean; }): Promise { + async add(resources: Uri[], opts?: { update?: boolean }): Promise { await this.run(Operation.Add, () => this.repository.add(resources.map(r => r.fsPath), opts)); } @@ -1289,11 +1289,11 @@ export class Repository implements Disposable { await this.run(Operation.DeleteTag, () => this.repository.deleteTag(name)); } - async checkout(treeish: string, opts?: { detached?: boolean; }): Promise { + async checkout(treeish: string, opts?: { detached?: boolean }): Promise { await this.run(Operation.Checkout, () => this.repository.checkout(treeish, [], opts)); } - async checkoutTracking(treeish: string, opts: { detached?: boolean; } = {}): Promise { + async checkoutTracking(treeish: string, opts: { detached?: boolean } = {}): Promise { await this.run(Operation.CheckoutTracking, () => this.repository.checkout(treeish, [], { ...opts, track: true })); } @@ -1326,7 +1326,7 @@ export class Repository implements Disposable { } @throttle - async fetchDefault(options: { silent?: boolean; } = {}): Promise { + async fetchDefault(options: { silent?: boolean } = {}): Promise { await this._fetch({ silent: options.silent }); } @@ -1344,7 +1344,7 @@ export class Repository implements Disposable { await this._fetch(options); } - private async _fetch(options: { remote?: string, ref?: string, all?: boolean, prune?: boolean, depth?: number, silent?: boolean; } = {}): Promise { + private async _fetch(options: { remote?: string; ref?: string; all?: boolean; prune?: boolean; depth?: number; silent?: boolean } = {}): Promise { if (!options.prune) { const config = workspace.getConfiguration('git', Uri.file(this.root)); const prune = config.get('pruneOnFetch'); @@ -1570,11 +1570,11 @@ export class Repository implements Disposable { }); } - getObjectDetails(ref: string, filePath: string): Promise<{ mode: string, object: string, size: number; }> { + getObjectDetails(ref: string, filePath: string): Promise<{ mode: string; object: string; size: number }> { return this.run(Operation.GetObjectDetails, () => this.repository.getObjectDetails(ref, filePath)); } - detectObjectType(object: string): Promise<{ mimetype: string, encoding?: string; }> { + detectObjectType(object: string): Promise<{ mimetype: string; encoding?: string }> { return this.run(Operation.Show, () => this.repository.detectObjectType(object)); } diff --git a/extensions/git/src/util.ts b/extensions/git/src/util.ts index a8ae8fff98ad8..bb61552c1da13 100644 --- a/extensions/git/src/util.ts +++ b/extensions/git/src/util.ts @@ -175,7 +175,7 @@ export async function mkdirp(path: string, mode?: number): Promise { } export function uniqueFilter(keyFn: (t: T) => string): (t: T) => boolean { - const seen: { [key: string]: boolean; } = Object.create(null); + const seen: { [key: string]: boolean } = Object.create(null); return element => { const key = keyFn(element); @@ -395,7 +395,7 @@ export class Limiter { } } -type Completion = { success: true, value: T } | { success: false, err: any }; +type Completion = { success: true; value: T } | { success: false; err: any }; export class PromiseSource { diff --git a/extensions/github-authentication/src/common/utils.ts b/extensions/github-authentication/src/common/utils.ts index 9ffbddec0b8c1..c9511ff9b79ab 100644 --- a/extensions/github-authentication/src/common/utils.ts +++ b/extensions/github-authentication/src/common/utils.ts @@ -49,7 +49,7 @@ const passthrough = (value: any, resolve: (value?: any) => void) => resolve(valu */ export function promiseFromEvent( event: Event, - adapter: PromiseAdapter = passthrough): { promise: Promise, cancel: EventEmitter } { + adapter: PromiseAdapter = passthrough): { promise: Promise; cancel: EventEmitter } { let subscription: Disposable; let cancel = new EventEmitter(); return { diff --git a/extensions/github-authentication/src/github.ts b/extensions/github-authentication/src/github.ts index 90d3803fffa53..824c3d3aff66a 100644 --- a/extensions/github-authentication/src/github.ts +++ b/extensions/github-authentication/src/github.ts @@ -18,7 +18,7 @@ interface SessionData { label?: string; displayName?: string; id: string; - } + }; scopes: string[]; accessToken: string; } @@ -39,7 +39,7 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid private _disposable: vscode.Disposable; constructor(private readonly context: vscode.ExtensionContext, private readonly type: AuthProviderType) { - const { name, version, aiKey } = context.extension.packageJSON as { name: string, version: string, aiKey: string }; + const { name, version, aiKey } = context.extension.packageJSON as { name: string; version: string; aiKey: string }; this._telemetryReporter = new ExperimentationTelemetry(context, new TelemetryReporter(name, version, aiKey)); if (this.type === AuthProviderType.github) { @@ -149,7 +149,7 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid if (scopesSeen.has(scopesStr)) { return undefined; } - let userInfo: { id: string, accountName: string } | undefined; + let userInfo: { id: string; accountName: string } | undefined; if (!session.account) { try { userInfo = await this._githubServer.getUserInfo(session.accessToken); diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts index 3002e937c818f..92313d030a7c9 100644 --- a/extensions/github-authentication/src/githubServer.ts +++ b/extensions/github-authentication/src/githubServer.ts @@ -41,7 +41,7 @@ function parseQuery(uri: vscode.Uri) { export interface IGitHubServer extends vscode.Disposable { login(scopes: string): Promise; - getUserInfo(token: string): Promise<{ id: string, accountName: string }>; + getUserInfo(token: string): Promise<{ id: string; accountName: string }>; sendAdditionalTelemetryInfo(token: string): Promise; friendlyName: string; type: AuthProviderType; @@ -77,7 +77,7 @@ async function getScopes(token: string, serverUri: vscode.Uri, logger: Log): Pro } } -async function getUserInfo(token: string, serverUri: vscode.Uri, logger: Log): Promise<{ id: string, accountName: string }> { +async function getUserInfo(token: string, serverUri: vscode.Uri, logger: Log): Promise<{ id: string; accountName: string }> { let result: Response; try { logger.info('Getting user info...'); @@ -119,7 +119,7 @@ export class GitHubServer implements IGitHubServer { private _onDidManuallyProvideToken = new vscode.EventEmitter(); private _pendingStates = new Map(); - private _codeExchangePromises = new Map, cancel: vscode.EventEmitter }>(); + private _codeExchangePromises = new Map; cancel: vscode.EventEmitter }>(); private _statusBarCommandId = `${this.type}.provide-manually`; private _disposable: vscode.Disposable; private _uriHandler = new UriEventHandler(this._logger); @@ -382,7 +382,7 @@ export class GitHubServer implements IGitHubServer { this._uriHandler.handleUri(vscode.Uri.parse(uri.trim())); } - public getUserInfo(token: string): Promise<{ id: string, accountName: string }> { + public getUserInfo(token: string): Promise<{ id: string; accountName: string }> { return getUserInfo(token, this.getServerUri('/user'), this._logger); } @@ -406,7 +406,7 @@ export class GitHubServer implements IGitHubServer { }); if (result.ok) { - const json: { student: boolean, faculty: boolean } = await result.json(); + const json: { student: boolean; faculty: boolean } = await result.json(); /* __GDPR__ "session" : { @@ -440,7 +440,7 @@ export class GitHubServer implements IGitHubServer { return; } - const json: { verifiable_password_authentication: boolean, installed_version: string } = await result.json(); + const json: { verifiable_password_authentication: boolean; installed_version: string } = await result.json(); /* __GDPR__ "ghe-session" : { @@ -504,7 +504,7 @@ export class GitHubEnterpriseServer implements IGitHubServer { return vscode.Uri.parse(`${apiUri.scheme}://${apiUri.authority}/api/v3${path}`); } - public async getUserInfo(token: string): Promise<{ id: string, accountName: string }> { + public async getUserInfo(token: string): Promise<{ id: string; accountName: string }> { return getUserInfo(token, this.getServerUri('/user'), this._logger); } @@ -522,7 +522,7 @@ export class GitHubEnterpriseServer implements IGitHubServer { return; } - const json: { verifiable_password_authentication: boolean, installed_version: string } = await result.json(); + const json: { verifiable_password_authentication: boolean; installed_version: string } = await result.json(); /* __GDPR__ "ghe-session" : { diff --git a/extensions/github/src/publish.ts b/extensions/github/src/publish.ts index af75e3e476b5c..0954e2c67ff09 100644 --- a/extensions/github/src/publish.ts +++ b/extensions/github/src/publish.ts @@ -50,7 +50,7 @@ export async function publishRepository(gitAPI: GitAPI, repository?: Repository) folder = pick.folder.uri; } - let quickpick = vscode.window.createQuickPick(); + let quickpick = vscode.window.createQuickPick(); quickpick.ignoreFocusOut = true; quickpick.placeholder = 'Repository Name'; diff --git a/extensions/github/src/pushErrorHandler.ts b/extensions/github/src/pushErrorHandler.ts index b4609a67561a4..73abed1ccd6f4 100644 --- a/extensions/github/src/pushErrorHandler.ts +++ b/extensions/github/src/pushErrorHandler.ts @@ -41,7 +41,7 @@ async function handlePushError(repository: Repository, remote: Remote, refspec: try { if (isInCodespaces()) { // Call into the codespaces extension to fork the repository - const resp = await commands.executeCommand<{ repository: CreateForkResponseData, ref: string }>('github.codespaces.forkRepository'); + const resp = await commands.executeCommand<{ repository: CreateForkResponseData; ref: string }>('github.codespaces.forkRepository'); if (!resp) { throw new Error('Unable to fork respository'); } diff --git a/extensions/github/src/remoteSourceProvider.ts b/extensions/github/src/remoteSourceProvider.ts index 5ea6fd21bbc2d..a9655d904bd75 100644 --- a/extensions/github/src/remoteSourceProvider.ts +++ b/extensions/github/src/remoteSourceProvider.ts @@ -7,7 +7,7 @@ import { RemoteSourceProvider, RemoteSource } from './typings/git-base'; import { getOctokit } from './auth'; import { Octokit } from '@octokit/rest'; -function parse(url: string): { owner: string, repo: string } | undefined { +function parse(url: string): { owner: string; repo: string } | undefined { const match = /^https:\/\/github\.com\/([^/]+)\/([^/]+)\.git/i.exec(url) || /^git@github\.com:([^/]+)\/([^/]+)\.git/i.exec(url); return (match && { owner: match[1], repo: match[2] }) ?? undefined; diff --git a/extensions/html-language-features/client/src/browser/htmlClientMain.ts b/extensions/html-language-features/client/src/browser/htmlClientMain.ts index 843bf79aeb28d..b69cca7585449 100644 --- a/extensions/html-language-features/client/src/browser/htmlClientMain.ts +++ b/extensions/html-language-features/client/src/browser/htmlClientMain.ts @@ -12,7 +12,7 @@ declare const Worker: { new(stringUrl: string): any; }; declare const TextDecoder: { - new(encoding?: string): { decode(buffer: ArrayBuffer): string; }; + new(encoding?: string): { decode(buffer: ArrayBuffer): string }; }; // this method is called when vs code is activated diff --git a/extensions/html-language-features/client/src/htmlClient.ts b/extensions/html-language-features/client/src/htmlClient.ts index d24c0ec9205be..aefa985c62ebf 100644 --- a/extensions/html-language-features/client/src/htmlClient.ts +++ b/extensions/html-language-features/client/src/htmlClient.ts @@ -75,12 +75,12 @@ export interface TelemetryReporter { export type LanguageClientConstructor = (name: string, description: string, clientOptions: LanguageClientOptions) => CommonLanguageClient; export interface Runtime { - TextDecoder: { new(encoding?: string): { decode(buffer: ArrayBuffer): string; } }; + TextDecoder: { new(encoding?: string): { decode(buffer: ArrayBuffer): string } }; fileFs?: FileSystemProvider; telemetry?: TelemetryReporter; readonly timer: { setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; - } + }; } export function startClient(context: ExtensionContext, newLanguageClient: LanguageClientConstructor, runtime: Runtime) { diff --git a/extensions/html-language-features/server/src/htmlServer.ts b/extensions/html-language-features/server/src/htmlServer.ts index 033ed22c5645f..2144b17ad70b1 100644 --- a/extensions/html-language-features/server/src/htmlServer.ts +++ b/extensions/html-language-features/server/src/htmlServer.ts @@ -71,7 +71,7 @@ export interface RuntimeEnvironment { readonly timer: { setImmediate(callback: (...args: any[]) => void, ...args: any[]): Disposable; setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; - } + }; } diff --git a/extensions/html-language-features/server/src/languageModelCache.ts b/extensions/html-language-features/server/src/languageModelCache.ts index 06d331bca8a22..048d84d37cd3d 100644 --- a/extensions/html-language-features/server/src/languageModelCache.ts +++ b/extensions/html-language-features/server/src/languageModelCache.ts @@ -12,7 +12,7 @@ export interface LanguageModelCache { } export function getLanguageModelCache(maxEntries: number, cleanupIntervalTimeInSec: number, parse: (document: TextDocument) => T): LanguageModelCache { - let languageModels: { [uri: string]: { version: number, languageId: string, cTime: number, languageModel: T } } = {}; + let languageModels: { [uri: string]: { version: number; languageId: string; cTime: number; languageModel: T } } = {}; let nModels = 0; let cleanupInterval: NodeJS.Timer | undefined = undefined; diff --git a/extensions/html-language-features/server/src/modes/embeddedSupport.ts b/extensions/html-language-features/server/src/modes/embeddedSupport.ts index c3b8ffde437c4..941510d3deb1a 100644 --- a/extensions/html-language-features/server/src/modes/embeddedSupport.ts +++ b/extensions/html-language-features/server/src/modes/embeddedSupport.ts @@ -20,7 +20,7 @@ export interface HTMLDocumentRegions { export const CSS_STYLE_RULE = '__'; -interface EmbeddedRegion { languageId: string | undefined; start: number; end: number; attributeValue?: boolean; } +interface EmbeddedRegion { languageId: string | undefined; start: number; end: number; attributeValue?: boolean } export function getDocumentRegions(languageService: LanguageService, document: TextDocument): HTMLDocumentRegions { diff --git a/extensions/html-language-features/server/src/modes/javascriptMode.ts b/extensions/html-language-features/server/src/modes/javascriptMode.ts index 85b9a8ae2e058..301af0e58c538 100644 --- a/extensions/html-language-features/server/src/modes/javascriptMode.ts +++ b/extensions/html-language-features/server/src/modes/javascriptMode.ts @@ -362,7 +362,7 @@ export function getJavaScriptMode(documentRegions: LanguageModelCache Promise; onDocumentRemoved(document: TextDocument): void; getSemanticTokens?(document: TextDocument): Promise; - getSemanticTokenLegend?(): { types: string[], modifiers: string[] }; + getSemanticTokenLegend?(): { types: string[]; modifiers: string[] }; dispose(): void; } @@ -97,7 +97,7 @@ export interface LanguageModeRange extends Range { attributeValue?: boolean; } -export function getLanguageModes(supportedLanguages: { [languageId: string]: boolean; }, workspace: Workspace, clientCapabilities: ClientCapabilities, requestService: FileSystemProvider): LanguageModes { +export function getLanguageModes(supportedLanguages: { [languageId: string]: boolean }, workspace: Workspace, clientCapabilities: ClientCapabilities, requestService: FileSystemProvider): LanguageModes { const htmlLanguageService = getHTMLLanguageService({ clientCapabilities, fileSystemProvider: requestService }); const cssLanguageService = getCSSLanguageService({ clientCapabilities, fileSystemProvider: requestService }); diff --git a/extensions/html-language-features/server/src/modes/semanticTokens.ts b/extensions/html-language-features/server/src/modes/semanticTokens.ts index f386a0daba6d2..38b0b23c519cc 100644 --- a/extensions/html-language-features/server/src/modes/semanticTokens.ts +++ b/extensions/html-language-features/server/src/modes/semanticTokens.ts @@ -20,7 +20,7 @@ export interface SemanticTokenProvider { export function newSemanticTokenProvider(languageModes: LanguageModes): SemanticTokenProvider { // combined legend across modes - const legend: { types: string[], modifiers: string[] } = { types: [], modifiers: [] }; + const legend: { types: string[]; modifiers: string[] } = { types: [], modifiers: [] }; const legendMappings: { [modeId: string]: LegendMapping } = {}; for (let mode of languageModes.getAllModes()) { diff --git a/extensions/html-language-features/server/src/test/completions.test.ts b/extensions/html-language-features/server/src/test/completions.test.ts index b64d7dee8604c..223234ec5fa7d 100644 --- a/extensions/html-language-features/server/src/test/completions.test.ts +++ b/extensions/html-language-features/server/src/test/completions.test.ts @@ -14,7 +14,7 @@ export interface ItemDescription { documentation?: string; kind?: CompletionItemKind; resultText?: string; - command?: { title: string, command: string }; + command?: { title: string; command: string }; notAvailable?: boolean; } @@ -46,7 +46,7 @@ export function assertCompletion(completions: CompletionList, expected: ItemDesc const testUri = 'test://test/test.html'; -export async function testCompletionFor(value: string, expected: { count?: number, items?: ItemDescription[] }, uri = testUri, workspaceFolders?: WorkspaceFolder[]): Promise { +export async function testCompletionFor(value: string, expected: { count?: number; items?: ItemDescription[] }, uri = testUri, workspaceFolders?: WorkspaceFolder[]): Promise { let offset = value.indexOf('|'); value = value.substr(0, offset) + value.substr(offset + 1); diff --git a/extensions/html-language-features/server/src/test/words.test.ts b/extensions/html-language-features/server/src/test/words.test.ts index 95ed0f8e2318c..132589e686776 100644 --- a/extensions/html-language-features/server/src/test/words.test.ts +++ b/extensions/html-language-features/server/src/test/words.test.ts @@ -10,7 +10,7 @@ import * as path from 'path'; suite('HTML Language Configuration', () => { const config = JSON.parse((fs.readFileSync(path.join(__dirname, '../../../../html/language-configuration.json')).toString())); - function createRegex(str: string | { pattern: string, flags: string }): RegExp { + function createRegex(str: string | { pattern: string; flags: string }): RegExp { if (typeof str === 'string') { return new RegExp(str, 'g'); } diff --git a/extensions/html-language-features/server/src/utils/strings.ts b/extensions/html-language-features/server/src/utils/strings.ts index ff62faeee7579..00a2ddcbd5109 100644 --- a/extensions/html-language-features/server/src/utils/strings.ts +++ b/extensions/html-language-features/server/src/utils/strings.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -export function getWordAtText(text: string, offset: number, wordDefinition: RegExp): { start: number, length: number } { +export function getWordAtText(text: string, offset: number, wordDefinition: RegExp): { start: number; length: number } { let lineStart = offset; while (lineStart > 0 && !isNewlineCharacter(text.charCodeAt(lineStart - 1))) { lineStart--; diff --git a/extensions/json-language-features/client/src/jsonClient.ts b/extensions/json-language-features/client/src/jsonClient.ts index 01604b92d4e3c..8fa87867bb4a5 100644 --- a/extensions/json-language-features/client/src/jsonClient.ts +++ b/extensions/json-language-features/client/src/jsonClient.ts @@ -59,7 +59,7 @@ namespace ResultLimitReachedNotification { interface Settings { json?: { schemas?: JSONSchemaSettings[]; - format?: { enable: boolean; }; + format?: { enable: boolean }; resultLimit?: number; }; http?: { @@ -96,7 +96,7 @@ export type LanguageClientConstructor = (name: string, description: string, clie export interface Runtime { schemaRequests: SchemaRequestService; - telemetry?: TelemetryReporter + telemetry?: TelemetryReporter; } export interface SchemaRequestService { diff --git a/extensions/json-language-features/server/src/jsonServer.ts b/extensions/json-language-features/server/src/jsonServer.ts index 612c5a22bda06..a44baf31f3033 100644 --- a/extensions/json-language-features/server/src/jsonServer.ts +++ b/extensions/json-language-features/server/src/jsonServer.ts @@ -56,12 +56,12 @@ export interface RequestService { export interface RuntimeEnvironment { file?: RequestService; - http?: RequestService + http?: RequestService; configureHttpRequests?(proxy: string, strictSSL: boolean): void; readonly timer: { setImmediate(callback: (...args: any[]) => void, ...args: any[]): Disposable; setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; - } + }; } export function startServer(connection: Connection, runtime: RuntimeEnvironment) { @@ -168,7 +168,7 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment) interface Settings { json: { schemas: JSONSchemaSettings[]; - format: { enable: boolean; }; + format: { enable: boolean }; resultLimit?: number; }; http: { @@ -185,7 +185,7 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment) const limitExceededWarnings = function () { - const pendingWarnings: { [uri: string]: { features: { [name: string]: string }; timeout?: Disposable; } } = {}; + const pendingWarnings: { [uri: string]: { features: { [name: string]: string }; timeout?: Disposable } } = {}; const showLimitedNotification = (uri: string, resultLimit: number) => { const warning = pendingWarnings[uri]; @@ -358,7 +358,7 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment) connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] }); }); - const pendingValidationRequests: { [uri: string]: Disposable; } = {}; + const pendingValidationRequests: { [uri: string]: Disposable } = {}; const validationDelayMs = 300; function cleanPendingValidation(textDocument: TextDocument): void { diff --git a/extensions/json-language-features/server/src/languageModelCache.ts b/extensions/json-language-features/server/src/languageModelCache.ts index 561de4a9a7afa..6deac59515eab 100644 --- a/extensions/json-language-features/server/src/languageModelCache.ts +++ b/extensions/json-language-features/server/src/languageModelCache.ts @@ -12,7 +12,7 @@ export interface LanguageModelCache { } export function getLanguageModelCache(maxEntries: number, cleanupIntervalTimeInSec: number, parse: (document: TextDocument) => T): LanguageModelCache { - let languageModels: { [uri: string]: { version: number, languageId: string, cTime: number, languageModel: T } } = {}; + let languageModels: { [uri: string]: { version: number; languageId: string; cTime: number; languageModel: T } } = {}; let nModels = 0; let cleanupInterval: NodeJS.Timer | undefined = undefined; diff --git a/extensions/markdown-language-features/preview-src/scroll-sync.ts b/extensions/markdown-language-features/preview-src/scroll-sync.ts index fdeb1a5ae7885..9694f9bf5e800 100644 --- a/extensions/markdown-language-features/preview-src/scroll-sync.ts +++ b/extensions/markdown-language-features/preview-src/scroll-sync.ts @@ -53,7 +53,7 @@ const getCodeLineElements = (() => { * If an exact match, returns a single element. If the line is between elements, * returns the element prior to and the element after the given line. */ -export function getElementsForSourceLine(targetLine: number, documentVersion: number): { previous: CodeLineElement; next?: CodeLineElement; } { +export function getElementsForSourceLine(targetLine: number, documentVersion: number): { previous: CodeLineElement; next?: CodeLineElement } { const lineNumber = Math.floor(targetLine); const lines = getCodeLineElements(documentVersion); let previous = lines[0] || null; @@ -71,7 +71,7 @@ export function getElementsForSourceLine(targetLine: number, documentVersion: nu /** * Find the html elements that are at a specific pixel offset on the page. */ -export function getLineElementsAtPageOffset(offset: number, documentVersion: number): { previous: CodeLineElement; next?: CodeLineElement; } { +export function getLineElementsAtPageOffset(offset: number, documentVersion: number): { previous: CodeLineElement; next?: CodeLineElement } { const lines = getCodeLineElements(documentVersion); const position = offset - window.scrollY; let lo = -1; @@ -98,7 +98,7 @@ export function getLineElementsAtPageOffset(offset: number, documentVersion: num return { previous: hiElement }; } -function getElementBounds({ element }: CodeLineElement): { top: number, height: number } { +function getElementBounds({ element }: CodeLineElement): { top: number; height: number } { const myBounds = element.getBoundingClientRect(); // Some code line elements may contain other code line elements. diff --git a/extensions/markdown-language-features/preview-src/settings.ts b/extensions/markdown-language-features/preview-src/settings.ts index a1212fdf43234..1ba5604f90e9b 100644 --- a/extensions/markdown-language-features/preview-src/settings.ts +++ b/extensions/markdown-language-features/preview-src/settings.ts @@ -6,7 +6,7 @@ export interface PreviewSettings { readonly source: string; readonly line?: number; - readonly fragment?: string + readonly fragment?: string; readonly lineCount: number; readonly scrollPreviewWithEditor?: boolean; readonly scrollEditorWithPreview: boolean; diff --git a/extensions/markdown-language-features/src/features/documentLinkProvider.ts b/extensions/markdown-language-features/src/features/documentLinkProvider.ts index 21aa0a3e4b0ff..86be23fdfb9e5 100644 --- a/extensions/markdown-language-features/src/features/documentLinkProvider.ts +++ b/extensions/markdown-language-features/src/features/documentLinkProvider.ts @@ -15,7 +15,7 @@ const localize = nls.loadMessageBundle(); function parseLink( document: vscode.TextDocument, link: string, -): { uri: vscode.Uri, tooltip?: string } | undefined { +): { uri: vscode.Uri; tooltip?: string } | undefined { const cleanLink = stripAngleBrackets(link); const externalSchemeUri = getUriForLinkWithKnownExternalScheme(cleanLink); @@ -225,7 +225,7 @@ export default class LinkProvider implements vscode.DocumentLinkProvider { } public static getDefinitions(text: string, document: vscode.TextDocument) { - const out = new Map(); + const out = new Map(); for (const match of text.matchAll(definitionPattern)) { const pre = match[1]; const reference = match[2]; diff --git a/extensions/markdown-language-features/src/features/foldingProvider.ts b/extensions/markdown-language-features/src/features/foldingProvider.ts index d28d31f57ab6d..305649e753e90 100644 --- a/extensions/markdown-language-features/src/features/foldingProvider.ts +++ b/extensions/markdown-language-features/src/features/foldingProvider.ts @@ -38,7 +38,7 @@ export default class MarkdownFoldingProvider implements vscode.FoldingRangeProvi const regionMarkers = tokens.filter(isRegionMarker) .map(token => ({ line: token.map[0], isStart: isStartRegion(token.content) })); - const nestingStack: { line: number, isStart: boolean }[] = []; + const nestingStack: { line: number; isStart: boolean }[] = []; return regionMarkers .map(marker => { if (marker.isStart) { diff --git a/extensions/markdown-language-features/src/features/pathCompletions.ts b/extensions/markdown-language-features/src/features/pathCompletions.ts index a4fc71c6c2e0b..3dd90b0de1ff2 100644 --- a/extensions/markdown-language-features/src/features/pathCompletions.ts +++ b/extensions/markdown-language-features/src/features/pathCompletions.ts @@ -60,7 +60,7 @@ interface CompletionContext { /** * Info if the link looks like it is for an anchor: `[](#header)` */ - readonly anchorInfo?: AnchorContext + readonly anchorInfo?: AnchorContext; } export class PathCompletionProvider implements vscode.CompletionItemProvider { diff --git a/extensions/markdown-language-features/src/features/preview.ts b/extensions/markdown-language-features/src/features/preview.ts index 2924af1255406..90154a6655cbf 100644 --- a/extensions/markdown-language-features/src/features/preview.ts +++ b/extensions/markdown-language-features/src/features/preview.ts @@ -26,7 +26,7 @@ interface WebviewMessage { interface CacheImageSizesMessage extends WebviewMessage { readonly type: 'cacheImageSizes'; - readonly body: { id: string, width: number, height: number; }[]; + readonly body: { id: string; width: number; height: number }[]; } interface RevealLineMessage extends WebviewMessage { @@ -79,7 +79,7 @@ export class PreviewDocumentVersion { interface MarkdownPreviewDelegate { getTitle?(resource: vscode.Uri): string; - getAdditionalState(): {}, + getAdditionalState(): {}; openPreviewLinkToMarkdownFile(markdownLink: vscode.Uri, fragment: string): void; } @@ -117,7 +117,7 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider { private currentVersion?: PreviewDocumentVersion; private isScrolling = false; private _disposed: boolean = false; - private imageInfo: { readonly id: string, readonly width: number, readonly height: number; }[] = []; + private imageInfo: { readonly id: string; readonly width: number; readonly height: number }[] = []; private readonly _fileWatchersBySrc = new Map(); private readonly _unwatchedImageSchemes = new Set(['https', 'http', 'data']); diff --git a/extensions/markdown-language-features/src/features/smartSelect.ts b/extensions/markdown-language-features/src/features/smartSelect.ts index f21a09e21c588..fdeab7990e2ac 100644 --- a/extensions/markdown-language-features/src/features/smartSelect.ts +++ b/extensions/markdown-language-features/src/features/smartSelect.ts @@ -68,7 +68,7 @@ export default class MarkdownSmartSelect implements vscode.SelectionRangeProvide } } -function getHeadersForPosition(toc: readonly TocEntry[], position: vscode.Position): { headers: TocEntry[], headerOnThisLine: boolean } { +function getHeadersForPosition(toc: readonly TocEntry[], position: vscode.Position): { headers: TocEntry[]; headerOnThisLine: boolean } { const enclosingHeaders = toc.filter(header => header.location.range.start.line <= position.line && header.location.range.end.line >= position.line); const sortedHeaders = enclosingHeaders.sort((header1, header2) => (header1.line - position.line) - (header2.line - position.line)); const onThisLine = toc.find(header => header.line === position.line) !== undefined; diff --git a/extensions/markdown-language-features/src/util/topmostLineMonitor.ts b/extensions/markdown-language-features/src/util/topmostLineMonitor.ts index f2e0e2061ca67..ad20cd0a7fda7 100644 --- a/extensions/markdown-language-features/src/util/topmostLineMonitor.ts +++ b/extensions/markdown-language-features/src/util/topmostLineMonitor.ts @@ -38,7 +38,7 @@ export class TopmostLineMonitor extends Disposable { })); } - private readonly _onChanged = this._register(new vscode.EventEmitter<{ readonly resource: vscode.Uri, readonly line: number }>()); + private readonly _onChanged = this._register(new vscode.EventEmitter<{ readonly resource: vscode.Uri; readonly line: number }>()); public readonly onDidChanged = this._onChanged.event; public setPreviousStaticEditorLine(scrollLocation: LastScrollLocation): void { diff --git a/extensions/merge-conflict/src/contentProvider.ts b/extensions/merge-conflict/src/contentProvider.ts index d0e2b92a56c4b..5c24854b00ea5 100644 --- a/extensions/merge-conflict/src/contentProvider.ts +++ b/extensions/merge-conflict/src/contentProvider.ts @@ -23,7 +23,7 @@ export default class MergeConflictContentProvider implements vscode.TextDocument async provideTextDocumentContent(uri: vscode.Uri): Promise { try { - const { scheme, ranges } = JSON.parse(uri.query) as { scheme: string, ranges: [{ line: number, character: number }[], { line: number, character: number }[]][] }; + const { scheme, ranges } = JSON.parse(uri.query) as { scheme: string; ranges: [{ line: number; character: number }[], { line: number; character: number }[]][] }; // complete diff const document = await vscode.workspace.openTextDocument(uri.with({ scheme, query: '' })); diff --git a/extensions/merge-conflict/src/documentMergeConflict.ts b/extensions/merge-conflict/src/documentMergeConflict.ts index d3d421f22d12a..3e8b44ba87d14 100644 --- a/extensions/merge-conflict/src/documentMergeConflict.ts +++ b/extensions/merge-conflict/src/documentMergeConflict.ts @@ -32,7 +32,7 @@ export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict return editor.edit((edit) => this.applyEdit(type, editor.document, edit)); } - public applyEdit(type: interfaces.CommitType, document: vscode.TextDocument, edit: { replace(range: vscode.Range, newText: string): void; }): void { + public applyEdit(type: interfaces.CommitType, document: vscode.TextDocument, edit: { replace(range: vscode.Range, newText: string): void }): void { // Each conflict is a set of ranges as follows, note placements or newlines // which may not in spans @@ -62,7 +62,7 @@ export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict } } - private replaceRangeWithContent(content: string, edit: { replace(range: vscode.Range, newText: string): void; }) { + private replaceRangeWithContent(content: string, edit: { replace(range: vscode.Range, newText: string): void }) { if (this.isNewlineOnly(content)) { edit.replace(this.range, ''); return; diff --git a/extensions/merge-conflict/src/interfaces.ts b/extensions/merge-conflict/src/interfaces.ts index 836bb5baa5af7..0943c26354187 100644 --- a/extensions/merge-conflict/src/interfaces.ts +++ b/extensions/merge-conflict/src/interfaces.ts @@ -25,7 +25,7 @@ export interface IExtensionConfiguration { export interface IDocumentMergeConflict extends IDocumentMergeConflictDescriptor { commitEdit(type: CommitType, editor: vscode.TextEditor, edit?: vscode.TextEditorEdit): Thenable; - applyEdit(type: CommitType, document: vscode.TextDocument, edit: { replace(range: vscode.Range, newText: string): void; }): void; + applyEdit(type: CommitType, document: vscode.TextDocument, edit: { replace(range: vscode.Range, newText: string): void }): void; } export interface IDocumentMergeConflictDescriptor { diff --git a/extensions/microsoft-authentication/src/AADHelper.ts b/extensions/microsoft-authentication/src/AADHelper.ts index 161f8b3dbda82..e323acea0c89d 100644 --- a/extensions/microsoft-authentication/src/AADHelper.ts +++ b/extensions/microsoft-authentication/src/AADHelper.ts @@ -58,9 +58,9 @@ interface IStoredSession { scope: string; // Scopes are alphabetized and joined with a space account: { label?: string; - displayName?: string, - id: string - } + displayName?: string; + id: string; + }; } export interface ITokenResponse { @@ -79,11 +79,11 @@ export interface IMicrosoftTokens { } interface IScopeData { - scopes: string[], - scopeStr: string, - scopesToSend: string, - clientId: string, - tenant: string + scopes: string[]; + scopeStr: string; + scopesToSend: string; + clientId: string; + tenant: string; } function parseQuery(uri: vscode.Uri) { diff --git a/extensions/microsoft-authentication/src/authServer.ts b/extensions/microsoft-authentication/src/authServer.ts index bc4a52103c162..09dec9d4619aa 100644 --- a/extensions/microsoft-authentication/src/authServer.ts +++ b/extensions/microsoft-authentication/src/authServer.ts @@ -101,11 +101,11 @@ async function callback(nonce: string, reqUrl: url.Url): Promise { } export function createServer(nonce: string) { - type RedirectResult = { req: http.IncomingMessage; res: http.ServerResponse; } | { err: any; res: http.ServerResponse; }; + type RedirectResult = { req: http.IncomingMessage; res: http.ServerResponse } | { err: any; res: http.ServerResponse }; let deferredRedirect: Deferred; const redirectPromise = new Promise((resolve, reject) => deferredRedirect = { resolve, reject }); - type CodeResult = { code: string; res: http.ServerResponse; } | { err: any; res: http.ServerResponse; }; + type CodeResult = { code: string; res: http.ServerResponse } | { err: any; res: http.ServerResponse }; let deferredCode: Deferred; const codePromise = new Promise((resolve, reject) => deferredCode = { resolve, reject }); diff --git a/extensions/microsoft-authentication/src/betterSecretStorage.ts b/extensions/microsoft-authentication/src/betterSecretStorage.ts index 7fe5507f851fd..001b12d003d57 100644 --- a/extensions/microsoft-authentication/src/betterSecretStorage.ts +++ b/extensions/microsoft-authentication/src/betterSecretStorage.ts @@ -9,7 +9,7 @@ import { Event, EventEmitter, ExtensionContext, SecretStorage, SecretStorageChan export interface IDidChangeInOtherWindowEvent { added: string[]; updated: string[]; - removed: Array<{ key: string, value: T; }>; + removed: Array<{ key: string; value: T }>; } export class BetterTokenStorage { @@ -48,7 +48,7 @@ export class BetterTokenStorage { const keyList: Array = JSON.parse(keyListStr); // Gather promises that contain key value pairs our of secret storage - const promises = keyList.map(key => new Promise<{ key: string, value: string | undefined }>((res, rej) => { + const promises = keyList.map(key => new Promise<{ key: string; value: string | undefined }>((res, rej) => { this._secretStorage.get(key).then((value) => { res({ key, value }); }, rej); diff --git a/extensions/microsoft-authentication/src/extension.ts b/extensions/microsoft-authentication/src/extension.ts index 0cdb43e05d289..f43467f2b916f 100644 --- a/extensions/microsoft-authentication/src/extension.ts +++ b/extensions/microsoft-authentication/src/extension.ts @@ -8,7 +8,7 @@ import { AzureActiveDirectoryService, onDidChangeSessions } from './AADHelper'; import TelemetryReporter from '@vscode/extension-telemetry'; export async function activate(context: vscode.ExtensionContext) { - const { name, version, aiKey } = context.extension.packageJSON as { name: string, version: string, aiKey: string }; + const { name, version, aiKey } = context.extension.packageJSON as { name: string; version: string; aiKey: string }; const telemetryReporter = new TelemetryReporter(name, version, aiKey); const loginService = new AzureActiveDirectoryService(context); diff --git a/extensions/npm/src/features/bowerJSONContribution.ts b/extensions/npm/src/features/bowerJSONContribution.ts index 11b4d7f74dd9d..df89c700afea6 100644 --- a/extensions/npm/src/features/bowerJSONContribution.ts +++ b/extensions/npm/src/features/bowerJSONContribution.ts @@ -69,7 +69,7 @@ export class BowerJSONContribution implements IJSONContribution { try { const obj = JSON.parse(success.responseText); if (Array.isArray(obj)) { - const results = <{ name: string; description: string; }[]>obj; + const results = <{ name: string; description: string }[]>obj; for (const result of results) { const name = result.name; const description = result.description || ''; diff --git a/extensions/npm/src/features/packageJSONContribution.ts b/extensions/npm/src/features/packageJSONContribution.ts index 23d7b4678b869..ad638d7d4c221 100644 --- a/extensions/npm/src/features/packageJSONContribution.ts +++ b/extensions/npm/src/features/packageJSONContribution.ts @@ -102,7 +102,7 @@ export class PackageJSONContribution implements IJSONContribution { try { const obj = JSON.parse(success.responseText); if (obj && obj.objects && Array.isArray(obj.objects)) { - const results = <{ package: SearchPackageInfo; }[]>obj.objects; + const results = <{ package: SearchPackageInfo }[]>obj.objects; for (const result of results) { this.processPackage(result.package, addValue, isLast, collector); } @@ -162,7 +162,7 @@ export class PackageJSONContribution implements IJSONContribution { try { const obj = JSON.parse(success.responseText); if (obj && Array.isArray(obj.objects)) { - const objects = <{ package: SearchPackageInfo; }[]>obj.objects; + const objects = <{ package: SearchPackageInfo }[]>obj.objects; for (let object of objects) { this.processPackage(object.package, addValue, isLast, collector); } @@ -374,7 +374,7 @@ interface SearchPackageInfo { name: string; description?: string; version?: string; - links?: { homepage?: string; }; + links?: { homepage?: string }; } interface ViewPackageInfo { diff --git a/extensions/npm/src/preferred-pm.ts b/extensions/npm/src/preferred-pm.ts index 346413730ef0d..58be79acfdb0a 100644 --- a/extensions/npm/src/preferred-pm.ts +++ b/extensions/npm/src/preferred-pm.ts @@ -56,7 +56,7 @@ async function isNPMPreferred(pkgPath: string): Promise { return { isPreferred: lockfileExists, hasLockfile: lockfileExists }; } -export async function findPreferredPM(pkgPath: string): Promise<{ name: string, multipleLockFilesDetected: boolean }> { +export async function findPreferredPM(pkgPath: string): Promise<{ name: string; multipleLockFilesDetected: boolean }> { const detectedPackageManagerNames: string[] = []; const detectedPackageManagerProperties: PreferredProperties[] = []; diff --git a/extensions/npm/src/tasks.ts b/extensions/npm/src/tasks.ts index baa99bda77947..49dd4a7c8685b 100644 --- a/extensions/npm/src/tasks.ts +++ b/extensions/npm/src/tasks.ts @@ -34,13 +34,13 @@ let cachedTasks: TaskWithLocation[] | undefined = undefined; const INSTALL_SCRIPT = 'install'; export interface TaskLocation { - document: Uri, - line: Position + document: Uri; + line: Position; } export interface TaskWithLocation { - task: Task, - location?: Location + task: Task; + location?: Location; } export class NpmTaskProvider implements TaskProvider { @@ -416,7 +416,7 @@ export async function startDebugging(context: ExtensionContext, scriptName: stri } -export type StringMap = { [s: string]: string; }; +export type StringMap = { [s: string]: string }; export function findScriptAtPosition(document: TextDocument, buffer: string, position: Position): string | undefined { const read = readScripts(document, buffer); diff --git a/extensions/php-language-features/src/features/phpGlobals.ts b/extensions/php-language-features/src/features/phpGlobals.ts index 5af41a0edc760..889acd7a8422b 100644 --- a/extensions/php-language-features/src/features/phpGlobals.ts +++ b/extensions/php-language-features/src/features/phpGlobals.ts @@ -5,8 +5,8 @@ // file generated from PHP53Schema.xml using php-exclude_generate_php_globals.js -export interface IEntry { description?: string; signature?: string; } -export interface IEntries { [name: string]: IEntry; } +export interface IEntry { description?: string; signature?: string } +export interface IEntries { [name: string]: IEntry } export const globalvariables: IEntries = { $GLOBALS: { diff --git a/extensions/search-result/src/extension.ts b/extensions/search-result/src/extension.ts index fb3a7edb1105f..f8253ccb16efb 100644 --- a/extensions/search-result/src/extension.ts +++ b/extensions/search-result/src/extension.ts @@ -13,7 +13,7 @@ const SEARCH_RESULT_SELECTOR = { language: 'search-result', exclusive: true }; const DIRECTIVES = ['# Query:', '# Flags:', '# Including:', '# Excluding:', '# ContextLines:']; const FLAGS = ['RegExp', 'CaseSensitive', 'IgnoreExcludeSettings', 'WordMatch']; -let cachedLastParse: { version: number, parse: ParsedSearchResults, uri: vscode.Uri } | undefined; +let cachedLastParse: { version: number; parse: ParsedSearchResults; uri: vscode.Uri } | undefined; let documentChangeListener: vscode.Disposable | undefined; @@ -174,8 +174,8 @@ function relativePathToUri(path: string, resultsUri: vscode.Uri): vscode.Uri | u return undefined; } -type ParsedSearchFileLine = { type: 'file', location: vscode.LocationLink, allLocations: vscode.LocationLink[], path: string }; -type ParsedSearchResultLine = { type: 'result', locations: Required[], isContext: boolean, prefixRange: vscode.Range }; +type ParsedSearchFileLine = { type: 'file'; location: vscode.LocationLink; allLocations: vscode.LocationLink[]; path: string }; +type ParsedSearchResultLine = { type: 'result'; locations: Required[]; isContext: boolean; prefixRange: vscode.Range }; type ParsedSearchResults = Array; const isFileLine = (line: ParsedSearchResultLine | ParsedSearchFileLine): line is ParsedSearchFileLine => line.type === 'file'; const isResultLine = (line: ParsedSearchResultLine | ParsedSearchFileLine): line is ParsedSearchResultLine => line.type === 'result'; diff --git a/extensions/simple-browser/src/extension.ts b/extensions/simple-browser/src/extension.ts index 5df81217a61be..ff3649c7baf4d 100644 --- a/extensions/simple-browser/src/extension.ts +++ b/extensions/simple-browser/src/extension.ts @@ -59,8 +59,8 @@ export function activate(context: vscode.ExtensionContext) { })); context.subscriptions.push(vscode.commands.registerCommand(openApiCommand, (url: vscode.Uri, showOptions?: { - preserveFocus?: boolean, - viewColumn: vscode.ViewColumn, + preserveFocus?: boolean; + viewColumn: vscode.ViewColumn; }) => { manager.show(url.toString(), showOptions); })); diff --git a/extensions/typescript-language-features/src/languageFeatures/completions.ts b/extensions/typescript-language-features/src/languageFeatures/completions.ts index be2295050e86d..b9487cb120dca 100644 --- a/extensions/typescript-language-features/src/languageFeatures/completions.ts +++ b/extensions/typescript-language-features/src/languageFeatures/completions.ts @@ -38,12 +38,12 @@ interface CompletionContext { readonly dotAccessorContext?: DotAccessorContext; readonly enableCallCompletions: boolean; - readonly useCodeSnippetsOnMethodSuggest: boolean, + readonly useCodeSnippetsOnMethodSuggest: boolean; readonly wordRange: vscode.Range | undefined; readonly line: string; - readonly useFuzzyWordRangeLogic: boolean, + readonly useFuzzyWordRangeLogic: boolean; } type ResolvedCompletionItem = { @@ -299,7 +299,7 @@ class MyCompletionItem extends vscode.CompletionItem { private getCodeActions( detail: Proto.CompletionEntryDetails, filepath: string - ): { command?: vscode.Command, additionalTextEdits?: vscode.TextEdit[] } { + ): { command?: vscode.Command; additionalTextEdits?: vscode.TextEdit[] } { if (!detail.codeActions || !detail.codeActions.length) { return {}; } diff --git a/extensions/typescript-language-features/src/languageFeatures/quickFix.ts b/extensions/typescript-language-features/src/languageFeatures/quickFix.ts index 4cb76badff9a6..977bc20dc61c7 100644 --- a/extensions/typescript-language-features/src/languageFeatures/quickFix.ts +++ b/extensions/typescript-language-features/src/languageFeatures/quickFix.ts @@ -370,7 +370,7 @@ const fixAllErrorCodes = new Map([ [2345, 2339], ]); -const preferredFixes = new Map([ +const preferredFixes = new Map([ [fixNames.annotateWithTypeFromJSDoc, { priority: 2 }], [fixNames.constructorForDerivedNeedSuperCall, { priority: 2 }], [fixNames.extendsInterfaceBecomesImplements, { priority: 2 }], diff --git a/extensions/typescript-language-features/src/languageFeatures/refactor.ts b/extensions/typescript-language-features/src/languageFeatures/refactor.ts index fe820d332da00..392cc5a3e181e 100644 --- a/extensions/typescript-language-features/src/languageFeatures/refactor.ts +++ b/extensions/typescript-language-features/src/languageFeatures/refactor.ts @@ -22,7 +22,7 @@ const localize = nls.loadMessageBundle(); interface DidApplyRefactoringCommand_Args { - readonly codeAction: InlinedCodeAction + readonly codeAction: InlinedCodeAction; } class DidApplyRefactoringCommand implements Command { diff --git a/extensions/typescript-language-features/src/languageProvider.ts b/extensions/typescript-language-features/src/languageProvider.ts index e9db3e72c5cda..4a3669e142d6e 100644 --- a/extensions/typescript-language-features/src/languageProvider.ts +++ b/extensions/typescript-language-features/src/languageProvider.ts @@ -132,7 +132,7 @@ export default class LanguageProvider extends Disposable { this.client.bufferSyncSupport.requestAllDiagnostics(); } - public diagnosticsReceived(diagnosticsKind: DiagnosticKind, file: vscode.Uri, diagnostics: (vscode.Diagnostic & { reportUnnecessary: any, reportDeprecated: any })[]): void { + public diagnosticsReceived(diagnosticsKind: DiagnosticKind, file: vscode.Uri, diagnostics: (vscode.Diagnostic & { reportUnnecessary: any; reportDeprecated: any })[]): void { if (diagnosticsKind !== DiagnosticKind.Syntax && !this.client.hasCapabilityForResource(file, ClientCapability.Semantic)) { return; } diff --git a/extensions/typescript-language-features/src/lazyClientHost.ts b/extensions/typescript-language-features/src/lazyClientHost.ts index 195c5eaf669b7..1a7432674fcb3 100644 --- a/extensions/typescript-language-features/src/lazyClientHost.ts +++ b/extensions/typescript-language-features/src/lazyClientHost.ts @@ -23,14 +23,14 @@ export function createLazyClientHost( context: vscode.ExtensionContext, onCaseInsensitiveFileSystem: boolean, services: { - pluginManager: PluginManager, - commandManager: CommandManager, - logDirectoryProvider: ILogDirectoryProvider, - cancellerFactory: OngoingRequestCancellerFactory, - versionProvider: ITypeScriptVersionProvider, - processFactory: TsServerProcessFactory, - activeJsTsEditorTracker: ActiveJsTsEditorTracker, - serviceConfigurationProvider: ServiceConfigurationProvider, + pluginManager: PluginManager; + commandManager: CommandManager; + logDirectoryProvider: ILogDirectoryProvider; + cancellerFactory: OngoingRequestCancellerFactory; + versionProvider: ITypeScriptVersionProvider; + processFactory: TsServerProcessFactory; + activeJsTsEditorTracker: ActiveJsTsEditorTracker; + serviceConfigurationProvider: ServiceConfigurationProvider; }, onCompletionAccepted: (item: vscode.CompletionItem) => void, ): Lazy { diff --git a/extensions/typescript-language-features/src/test/testUtils.ts b/extensions/typescript-language-features/src/test/testUtils.ts index 883a196bf14c4..106df7f61186d 100644 --- a/extensions/typescript-language-features/src/test/testUtils.ts +++ b/extensions/typescript-language-features/src/test/testUtils.ts @@ -153,7 +153,7 @@ export function onChangedDocument(documentUri: vscode.Uri, disposables: vscode.D export async function retryUntilDocumentChanges( documentUri: vscode.Uri, - options: { retries: number, timeout: number }, + options: { retries: number; timeout: number }, disposables: vscode.Disposable[], exec: () => Thenable, ) { diff --git a/extensions/typescript-language-features/src/test/unit/cachedResponse.test.ts b/extensions/typescript-language-features/src/test/unit/cachedResponse.test.ts index 1b0dd441120c5..49a9049013ac2 100644 --- a/extensions/typescript-language-features/src/test/unit/cachedResponse.test.ts +++ b/extensions/typescript-language-features/src/test/unit/cachedResponse.test.ts @@ -118,7 +118,7 @@ function createResponse(command: string): Proto.Response { }; } -function createEventualResponder(): { promise: Promise, resolve: (x: T) => void } { +function createEventualResponder(): { promise: Promise; resolve: (x: T) => void } { let resolve: (value: T) => void; const promise = new Promise(r => { resolve = r; }); return { promise, resolve: resolve! }; diff --git a/extensions/typescript-language-features/src/tsServer/server.ts b/extensions/typescript-language-features/src/tsServer/server.ts index 689cee0846e06..fd6b9fa1d0837 100644 --- a/extensions/typescript-language-features/src/tsServer/server.ts +++ b/extensions/typescript-language-features/src/tsServer/server.ts @@ -41,7 +41,7 @@ export interface ITypeScriptServer { * @return A list of all execute requests. If there are multiple entries, the first item is the primary * request while the rest are secondary ones. */ - executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Array> | undefined>; + executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean; token?: vscode.CancellationToken; expectsResult: boolean; lowPriority?: boolean; executionTarget?: ExecutionTarget }): Array> | undefined>; dispose(): void; } @@ -207,7 +207,7 @@ export class ProcessBasedTsServer extends Disposable implements ITypeScriptServe } } - public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Array> | undefined> { + public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean; token?: vscode.CancellationToken; expectsResult: boolean; lowPriority?: boolean; executionTarget?: ExecutionTarget }): Array> | undefined> { const request = this._requestQueue.createRequest(command, args); const requestInfo: RequestItem = { request, @@ -410,7 +410,7 @@ export class GetErrRoutingTsServer extends Disposable implements ITypeScriptServ private readonly router: RequestRouter; public constructor( - servers: { getErr: ITypeScriptServer, primary: ITypeScriptServer }, + servers: { getErr: ITypeScriptServer; primary: ITypeScriptServer }, delegate: TsServerDelegate, ) { super(); @@ -463,7 +463,7 @@ export class GetErrRoutingTsServer extends Disposable implements ITypeScriptServ this.mainServer.kill(); } - public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Array> | undefined> { + public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean; token?: vscode.CancellationToken; expectsResult: boolean; lowPriority?: boolean; executionTarget?: ExecutionTarget }): Array> | undefined> { return this.router.execute(command, args, executeInfo); } } @@ -519,7 +519,7 @@ export class SyntaxRoutingTsServer extends Disposable implements ITypeScriptServ private _projectLoading = true; public constructor( - servers: { syntax: ITypeScriptServer, semantic: ITypeScriptServer }, + servers: { syntax: ITypeScriptServer; semantic: ITypeScriptServer }, delegate: TsServerDelegate, enableDynamicRouting: boolean, ) { @@ -603,7 +603,7 @@ export class SyntaxRoutingTsServer extends Disposable implements ITypeScriptServ this.semanticServer.kill(); } - public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Array> | undefined> { + public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean; token?: vscode.CancellationToken; expectsResult: boolean; lowPriority?: boolean; executionTarget?: ExecutionTarget }): Array> | undefined> { return this.router.execute(command, args, executeInfo); } } diff --git a/extensions/typescript-language-features/src/tsServer/spawner.ts b/extensions/typescript-language-features/src/tsServer/spawner.ts index 752c7a9607e92..c7a9318040492 100644 --- a/extensions/typescript-language-features/src/tsServer/spawner.ts +++ b/extensions/typescript-language-features/src/tsServer/spawner.ts @@ -186,7 +186,7 @@ export class TypeScriptServerSpawner { apiVersion: API, pluginManager: PluginManager, cancellationPipeName: string | undefined, - ): { args: string[], tsServerLogFile: string | undefined, tsServerTraceDirectory: string | undefined } { + ): { args: string[]; tsServerLogFile: string | undefined; tsServerTraceDirectory: string | undefined } { const args: string[] = []; let tsServerLogFile: string | undefined; let tsServerTraceDirectory: string | undefined; diff --git a/extensions/typescript-language-features/src/typeScriptServiceClientHost.ts b/extensions/typescript-language-features/src/typeScriptServiceClientHost.ts index 7cf6587c473c4..0543a6ae847dd 100644 --- a/extensions/typescript-language-features/src/typeScriptServiceClientHost.ts +++ b/extensions/typescript-language-features/src/typeScriptServiceClientHost.ts @@ -64,14 +64,14 @@ export default class TypeScriptServiceClientHost extends Disposable { context: vscode.ExtensionContext, onCaseInsensitiveFileSystem: boolean, services: { - pluginManager: PluginManager, - commandManager: CommandManager, - logDirectoryProvider: ILogDirectoryProvider, - cancellerFactory: OngoingRequestCancellerFactory, - versionProvider: ITypeScriptVersionProvider, - processFactory: TsServerProcessFactory, - activeJsTsEditorTracker: ActiveJsTsEditorTracker, - serviceConfigurationProvider: ServiceConfigurationProvider, + pluginManager: PluginManager; + commandManager: CommandManager; + logDirectoryProvider: ILogDirectoryProvider; + cancellerFactory: OngoingRequestCancellerFactory; + versionProvider: ITypeScriptVersionProvider; + processFactory: TsServerProcessFactory; + activeJsTsEditorTracker: ActiveJsTsEditorTracker; + serviceConfigurationProvider: ServiceConfigurationProvider; }, onCompletionAccepted: (item: vscode.CompletionItem) => void, ) { @@ -268,11 +268,11 @@ export default class TypeScriptServiceClientHost extends Disposable { private createMarkerDatas( diagnostics: Proto.Diagnostic[], source: string - ): (vscode.Diagnostic & { reportUnnecessary: any, reportDeprecated: any })[] { + ): (vscode.Diagnostic & { reportUnnecessary: any; reportDeprecated: any })[] { return diagnostics.map(tsDiag => this.tsDiagnosticToVsDiagnostic(tsDiag, source)); } - private tsDiagnosticToVsDiagnostic(diagnostic: Proto.Diagnostic, source: string): vscode.Diagnostic & { reportUnnecessary: any, reportDeprecated: any } { + private tsDiagnosticToVsDiagnostic(diagnostic: Proto.Diagnostic, source: string): vscode.Diagnostic & { reportUnnecessary: any; reportDeprecated: any } { const { start, end, text } = diagnostic; const range = new vscode.Range(typeConverters.Position.fromLocation(start), typeConverters.Position.fromLocation(end)); const converted = new vscode.Diagnostic(range, text, this.getDiagnosticSeverity(diagnostic)); @@ -299,7 +299,7 @@ export default class TypeScriptServiceClientHost extends Disposable { } converted.tags = tags.length ? tags : undefined; - const resultConverted = converted as vscode.Diagnostic & { reportUnnecessary: any, reportDeprecated: any }; + const resultConverted = converted as vscode.Diagnostic & { reportUnnecessary: any; reportDeprecated: any }; resultConverted.reportUnnecessary = diagnostic.reportsUnnecessary; resultConverted.reportDeprecated = diagnostic.reportsDeprecated; return resultConverted; diff --git a/extensions/typescript-language-features/src/typescriptService.ts b/extensions/typescript-language-features/src/typescriptService.ts index 1bbeb598d3f3d..5afaac77ecd1e 100644 --- a/extensions/typescript-language-features/src/typescriptService.ts +++ b/extensions/typescript-language-features/src/typescriptService.ts @@ -150,7 +150,7 @@ export interface ITypeScriptServiceClient { * @return The normalized path or `undefined` if the document is not open on the server. */ toOpenedFilePath(document: vscode.TextDocument, options?: { - suppressAlertOnFailure?: boolean + suppressAlertOnFailure?: boolean; }): string | undefined; /** @@ -160,7 +160,7 @@ export interface ITypeScriptServiceClient { getWorkspaceRootForResource(resource: vscode.Uri): string | undefined; - readonly onTsServerStarted: vscode.Event<{ version: TypeScriptVersion, usedApiVersion: API }>; + readonly onTsServerStarted: vscode.Event<{ version: TypeScriptVersion; usedApiVersion: API }>; readonly onProjectLanguageServiceStateChanged: vscode.Event; readonly onDidBeginInstallTypings: vscode.Event; readonly onDidEndInstallTypings: vscode.Event; diff --git a/extensions/typescript-language-features/src/typescriptServiceClient.ts b/extensions/typescript-language-features/src/typescriptServiceClient.ts index f95fb60e84bb6..0b8993e97a9d3 100644 --- a/extensions/typescript-language-features/src/typescriptServiceClient.ts +++ b/extensions/typescript-language-features/src/typescriptServiceClient.ts @@ -99,7 +99,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType private readonly workspaceState: vscode.Memento; - private _onReady?: { promise: Promise; resolve: () => void; reject: () => void; }; + private _onReady?: { promise: Promise; resolve: () => void; reject: () => void }; private _configuration: TypeScriptServiceConfiguration; private pluginPathsProvider: TypeScriptPluginPathsProvider; private readonly _versionManager: TypeScriptVersionManager; @@ -130,12 +130,12 @@ export default class TypeScriptServiceClient extends Disposable implements IType private readonly context: vscode.ExtensionContext, onCaseInsenitiveFileSystem: boolean, services: { - pluginManager: PluginManager, - logDirectoryProvider: ILogDirectoryProvider, - cancellerFactory: OngoingRequestCancellerFactory, - versionProvider: ITypeScriptVersionProvider, - processFactory: TsServerProcessFactory, - serviceConfigurationProvider: ServiceConfigurationProvider, + pluginManager: PluginManager; + logDirectoryProvider: ILogDirectoryProvider; + cancellerFactory: OngoingRequestCancellerFactory; + versionProvider: ITypeScriptVersionProvider; + processFactory: TsServerProcessFactory; + serviceConfigurationProvider: ServiceConfigurationProvider; }, allModeIds: readonly string[] ) { @@ -290,7 +290,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType this.serverState = this.startService(true); } - private readonly _onTsServerStarted = this._register(new vscode.EventEmitter<{ version: TypeScriptVersion, usedApiVersion: API }>()); + private readonly _onTsServerStarted = this._register(new vscode.EventEmitter<{ version: TypeScriptVersion; usedApiVersion: API }>()); public readonly onTsServerStarted = this._onTsServerStarted.event; private readonly _onDiagnosticsReceived = this._register(new vscode.EventEmitter()); @@ -830,7 +830,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType })[0]!; } - private executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, requireSemantic?: boolean }): Array> | undefined> { + private executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean; token?: vscode.CancellationToken; expectsResult: boolean; lowPriority?: boolean; requireSemantic?: boolean }): Array> | undefined> { this.bufferSyncSupport.beforeCommand(command); const runningServerState = this.service(); return runningServerState.server.executeImpl(command, args, executeInfo); @@ -996,7 +996,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType function getReportIssueArgsForError( error: TypeScriptServerError, logPath: string | undefined, -): { extensionId: string, issueTitle: string, issueBody: string } | undefined { +): { extensionId: string; issueTitle: string; issueBody: string } | undefined { if (!error.serverStack || !error.serverMessage) { return undefined; } @@ -1063,7 +1063,7 @@ function getDignosticsKind(event: Proto.Event) { class ServerInitializingIndicator extends Disposable { - private _task?: { project: string | undefined, resolve: () => void }; + private _task?: { project: string | undefined; resolve: () => void }; public reset(): void { if (this._task) { diff --git a/extensions/typescript-language-features/src/utils/languageDescription.ts b/extensions/typescript-language-features/src/utils/languageDescription.ts index 96ec01f8de8e7..95c165bf14d5b 100644 --- a/extensions/typescript-language-features/src/utils/languageDescription.ts +++ b/extensions/typescript-language-features/src/utils/languageDescription.ts @@ -22,7 +22,7 @@ export interface LanguageDescription { readonly languageIds: readonly string[]; readonly configFilePattern?: RegExp; readonly isExternal?: boolean; - readonly standardFileExtensions: readonly string[], + readonly standardFileExtensions: readonly string[]; } export const standardLanguageDescriptions: LanguageDescription[] = [ diff --git a/extensions/typescript-language-features/src/utils/plugins.ts b/extensions/typescript-language-features/src/utils/plugins.ts index e71cdebb5298b..0716aba36cb16 100644 --- a/extensions/typescript-language-features/src/utils/plugins.ts +++ b/extensions/typescript-language-features/src/utils/plugins.ts @@ -12,7 +12,7 @@ export interface TypeScriptServerPlugin { readonly name: string; readonly enableForWorkspaceTypeScriptVersions: boolean; readonly languages: ReadonlyArray; - readonly configNamespace?: string + readonly configNamespace?: string; } namespace TypeScriptServerPlugin { @@ -54,7 +54,7 @@ export class PluginManager extends Disposable { private readonly _onDidUpdatePlugins = this._register(new vscode.EventEmitter()); public readonly onDidChangePlugins = this._onDidUpdatePlugins.event; - private readonly _onDidUpdateConfig = this._register(new vscode.EventEmitter<{ pluginId: string, config: {} }>()); + private readonly _onDidUpdateConfig = this._register(new vscode.EventEmitter<{ pluginId: string; config: {} }>()); public readonly onDidUpdateConfig = this._onDidUpdateConfig.event; public setConfiguration(pluginId: string, config: {}) { diff --git a/extensions/typescript-language-features/src/utils/previewer.ts b/extensions/typescript-language-features/src/utils/previewer.ts index bacbaaffce2c8..2292b0fc980f1 100644 --- a/extensions/typescript-language-features/src/utils/previewer.ts +++ b/extensions/typescript-language-features/src/utils/previewer.ts @@ -130,7 +130,7 @@ function convertLinkTags( const out: string[] = []; - let currentLink: { name?: string, target?: Proto.FileSpan, text?: string, readonly linkcode: boolean } | undefined; + let currentLink: { name?: string; target?: Proto.FileSpan; text?: string; readonly linkcode: boolean } | undefined; for (const part of parts) { switch (part.kind) { case 'link': diff --git a/extensions/typescript-language-features/src/utils/resourceMap.ts b/extensions/typescript-language-features/src/utils/resourceMap.ts index 89d131f809fbc..cf97365831c8d 100644 --- a/extensions/typescript-language-features/src/utils/resourceMap.ts +++ b/extensions/typescript-language-features/src/utils/resourceMap.ts @@ -21,12 +21,12 @@ export class ResourceMap { return resource.toString(true); }; - private readonly _map = new Map(); + private readonly _map = new Map(); constructor( protected readonly _normalizePath: (resource: vscode.Uri) => string | undefined = ResourceMap.defaultPathNormalizer, protected readonly config: { - readonly onCaseInsensitiveFileSystem: boolean, + readonly onCaseInsensitiveFileSystem: boolean; }, ) { } @@ -76,7 +76,7 @@ export class ResourceMap { return Array.from(this._map.values(), x => x.value); } - public get entries(): Iterable<{ resource: vscode.Uri, value: T }> { + public get entries(): Iterable<{ resource: vscode.Uri; value: T }> { return this._map.values(); } diff --git a/extensions/typescript-language-features/src/utils/snippetForFunctionCall.ts b/extensions/typescript-language-features/src/utils/snippetForFunctionCall.ts index e0185db581b41..2c5a0fd515c33 100644 --- a/extensions/typescript-language-features/src/utils/snippetForFunctionCall.ts +++ b/extensions/typescript-language-features/src/utils/snippetForFunctionCall.ts @@ -8,9 +8,9 @@ import type * as Proto from '../protocol'; import * as PConst from '../protocol.const'; export function snippetForFunctionCall( - item: { insertText?: string | vscode.SnippetString; label: string; }, + item: { insertText?: string | vscode.SnippetString; label: string }, displayParts: ReadonlyArray -): { snippet: vscode.SnippetString, parameterCount: number } { +): { snippet: vscode.SnippetString; parameterCount: number } { if (item.insertText && typeof item.insertText !== 'string') { return { snippet: item.insertText, parameterCount: 0 }; } diff --git a/extensions/typescript-language-features/src/utils/tracer.ts b/extensions/typescript-language-features/src/utils/tracer.ts index 445b828d0c650..de3b0c933c746 100644 --- a/extensions/typescript-language-features/src/utils/tracer.ts +++ b/extensions/typescript-language-features/src/utils/tracer.ts @@ -30,7 +30,7 @@ namespace Trace { } interface RequestExecutionMetadata { - readonly queuingStartTime: number + readonly queuingStartTime: number; } export default class Tracer { diff --git a/extensions/vscode-api-tests/src/memfs.ts b/extensions/vscode-api-tests/src/memfs.ts index 8c8bad5b1625d..4f0129da6cbeb 100644 --- a/extensions/vscode-api-tests/src/memfs.ts +++ b/extensions/vscode-api-tests/src/memfs.ts @@ -82,7 +82,7 @@ export class TestFS implements vscode.FileSystemProvider { throw vscode.FileSystemError.FileNotFound(); } - writeFile(uri: vscode.Uri, content: Uint8Array, options: { create: boolean, overwrite: boolean }): void { + writeFile(uri: vscode.Uri, content: Uint8Array, options: { create: boolean; overwrite: boolean }): void { let basename = path.posix.basename(uri.path); let parent = this._lookupParentDirectory(uri); let entry = parent.entries.get(basename); diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts index 8a5d124c8ef2e..d434bc7149c5c 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts @@ -347,7 +347,7 @@ import { assertNoRpc, poll } from '../utils'; suite('window.onDidWriteTerminalData', () => { test('should listen to all future terminal data events', (done) => { const openEvents: string[] = []; - const dataEvents: { name: string, data: string }[] = []; + const dataEvents: { name: string; data: string }[] = []; const closeEvents: string[] = []; disposables.push(window.onDidOpenTerminal(e => openEvents.push(e.name))); diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.watcher.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.watcher.test.ts index 029951fc9b1f7..13041ce380b3c 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.watcher.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.watcher.test.ts @@ -12,7 +12,7 @@ suite('vscode API - workspace-watcher', () => { interface IWatchRequest { uri: vscode.Uri; - options: { recursive: boolean; excludes: string[] } + options: { recursive: boolean; excludes: string[] }; } class WatcherTestFs extends TestFS { diff --git a/extensions/vscode-custom-editor-tests/src/test/customEditor.test.ts b/extensions/vscode-custom-editor-tests/src/test/customEditor.test.ts index 3474de57425f3..7fc68f61c0298 100644 --- a/extensions/vscode-custom-editor-tests/src/test/customEditor.test.ts +++ b/extensions/vscode-custom-editor-tests/src/test/customEditor.test.ts @@ -21,7 +21,7 @@ const commands = Object.freeze({ undo: 'undo', }); -async function writeRandomFile(options: { ext: string; contents: string; }): Promise { +async function writeRandomFile(options: { ext: string; contents: string }): Promise { const fakeFile = randomFilePath({ root: testWorkspaceRoot, ext: options.ext }); await fs.promises.writeFile(fakeFile.fsPath, Buffer.from(options.contents)); return fakeFile; diff --git a/extensions/vscode-custom-editor-tests/src/test/utils.ts b/extensions/vscode-custom-editor-tests/src/test/utils.ts index 7ed2afcaca3f8..80d2eea16a432 100644 --- a/extensions/vscode-custom-editor-tests/src/test/utils.ts +++ b/extensions/vscode-custom-editor-tests/src/test/utils.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; -export function randomFilePath(args: { root: vscode.Uri, ext: string }): vscode.Uri { +export function randomFilePath(args: { root: vscode.Uri; ext: string }): vscode.Uri { const fileName = rndName(); return vscode.Uri.joinPath(args.root, fileName + args.ext); } diff --git a/extensions/vscode-notebook-tests/src/utils.ts b/extensions/vscode-notebook-tests/src/utils.ts index 0adaf940ea9f9..9aad81fbf89cf 100644 --- a/extensions/vscode-notebook-tests/src/utils.ts +++ b/extensions/vscode-notebook-tests/src/utils.ts @@ -82,7 +82,7 @@ export class TestFS implements vscode.FileSystemProvider { throw vscode.FileSystemError.FileNotFound(); } - writeFile(uri: vscode.Uri, content: Uint8Array, options: { create: boolean, overwrite: boolean }): void { + writeFile(uri: vscode.Uri, content: Uint8Array, options: { create: boolean; overwrite: boolean }): void { const basename = path.posix.basename(uri.path); const parent = this._lookupParentDirectory(uri); let entry = parent.entries.get(basename); diff --git a/extensions/vscode-test-resolver/src/extension.ts b/extensions/vscode-test-resolver/src/extension.ts index 0b23b099ff538..4a6b1b202d3cd 100644 --- a/extensions/vscode-test-resolver/src/extension.ts +++ b/extensions/vscode-test-resolver/src/extension.ts @@ -344,7 +344,7 @@ export function activate(context: vscode.ExtensionContext) { vscode.commands.executeCommand('setContext', 'forwardedPortsViewEnabled', true); } -type ActionItem = (vscode.MessageItem & { execute: () => void; }); +type ActionItem = (vscode.MessageItem & { execute: () => void }); function getActions(): ActionItem[] { const actions: ActionItem[] = []; @@ -418,7 +418,7 @@ async function tunnelFactory(tunnelOptions: vscode.TunnelOptions, tunnelCreation return createTunnelService(); - function newTunnel(localAddress: { host: string, port: number }): vscode.Tunnel { + function newTunnel(localAddress: { host: string; port: number }): vscode.Tunnel { const onDidDispose: vscode.EventEmitter = new vscode.EventEmitter(); let isDisposed = false; return { diff --git a/src/vs/base/browser/contextmenu.ts b/src/vs/base/browser/contextmenu.ts index a25dd8f20b71c..e594f0073e82c 100644 --- a/src/vs/base/browser/contextmenu.ts +++ b/src/vs/base/browser/contextmenu.ts @@ -16,7 +16,7 @@ export interface IContextMenuEvent { } export interface IContextMenuDelegate { - getAnchor(): HTMLElement | { x: number; y: number; width?: number; height?: number; }; + getAnchor(): HTMLElement | { x: number; y: number; width?: number; height?: number }; getActions(): readonly IAction[]; getCheckedActionsRepresentation?(action: IAction): 'radio' | 'checkbox'; getActionViewItem?(action: IAction): IActionViewItem | undefined; diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index 96315e0adcd8b..dd8dc400d0f6f 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -490,7 +490,7 @@ export class Dimension implements IDimension { } } -export function getTopLeftOffset(element: HTMLElement): { left: number; top: number; } { +export function getTopLeftOffset(element: HTMLElement): { left: number; top: number } { // Adapted from WinJS.Utilities.getPosition // and added borders to the mix @@ -1044,7 +1044,7 @@ export enum Namespace { SVG = 'http://www.w3.org/2000/svg' } -function _$(namespace: Namespace, description: string, attrs?: { [key: string]: any; }, ...children: Array): T { +function _$(namespace: Namespace, description: string, attrs?: { [key: string]: any }, ...children: Array): T { let match = SELECTOR_REGEX.exec(description); if (!match) { @@ -1093,11 +1093,11 @@ function _$(namespace: Namespace, description: string, attrs? return result as T; } -export function $(description: string, attrs?: { [key: string]: any; }, ...children: Array): T { +export function $(description: string, attrs?: { [key: string]: any }, ...children: Array): T { return _$(Namespace.HTML, description, attrs, ...children); } -$.SVG = function (description: string, attrs?: { [key: string]: any; }, ...children: Array): T { +$.SVG = function (description: string, attrs?: { [key: string]: any }, ...children: Array): T { return _$(Namespace.SVG, description, attrs, ...children); }; diff --git a/src/vs/base/browser/globalMouseMoveMonitor.ts b/src/vs/base/browser/globalMouseMoveMonitor.ts index d481de9562482..46298cd6d516b 100644 --- a/src/vs/base/browser/globalMouseMoveMonitor.ts +++ b/src/vs/base/browser/globalMouseMoveMonitor.ts @@ -39,7 +39,7 @@ export function standardMouseMoveMerger(lastEvent: IStandardMouseMoveEventData | }; } -export class GlobalMouseMoveMonitor implements IDisposable { +export class GlobalMouseMoveMonitor implements IDisposable { private readonly _hooks = new DisposableStore(); private _mouseMoveEventMerger: IEventMerger | null = null; diff --git a/src/vs/base/browser/markdownRenderer.ts b/src/vs/base/browser/markdownRenderer.ts index 1b5b17c95bdd9..2eab9f8c84001 100644 --- a/src/vs/base/browser/markdownRenderer.ts +++ b/src/vs/base/browser/markdownRenderer.ts @@ -41,7 +41,7 @@ export interface MarkdownRenderOptions extends FormattedTextRenderOptions { * **Note** that for most cases you should be using [`MarkdownRenderer`](./src/vs/editor/browser/core/markdownRenderer.ts) * which comes with support for pretty code block rendering and which uses the default way of handling links. */ -export function renderMarkdown(markdown: IMarkdownString, options: MarkdownRenderOptions = {}, markedOptions: MarkedOptions = {}): { element: HTMLElement, dispose: () => void } { +export function renderMarkdown(markdown: IMarkdownString, options: MarkdownRenderOptions = {}, markedOptions: MarkedOptions = {}): { element: HTMLElement; dispose: () => void } { const disposables = new DisposableStore(); let isDisposed = false; @@ -343,7 +343,7 @@ function sanitizeRenderedMarkdown( } } -function getSanitizerOptions(options: { readonly isTrusted?: boolean }): { config: dompurify.Config, allowedSchemes: string[] } { +function getSanitizerOptions(options: { readonly isTrusted?: boolean }): { config: dompurify.Config; allowedSchemes: string[] } { const allowedSchemes = [ Schemas.http, Schemas.https, diff --git a/src/vs/base/browser/touch.ts b/src/vs/base/browser/touch.ts index cebe652db4a21..72bd66c6adfab 100644 --- a/src/vs/base/browser/touch.ts +++ b/src/vs/base/browser/touch.ts @@ -75,7 +75,7 @@ export class Gesture extends Disposable { private ignoreTargets: HTMLElement[]; private handle: IDisposable | null; - private activeTouches: { [id: number]: TouchData; }; + private activeTouches: { [id: number]: TouchData }; private _lastSetTapCountTime: number; diff --git a/src/vs/base/browser/ui/centered/centeredViewLayout.ts b/src/vs/base/browser/ui/centered/centeredViewLayout.ts index 29e72ce7684a7..b16ac4334ca67 100644 --- a/src/vs/base/browser/ui/centered/centeredViewLayout.ts +++ b/src/vs/base/browser/ui/centered/centeredViewLayout.ts @@ -21,7 +21,7 @@ const GOLDEN_RATIO = { rightMarginRatio: 0.1909 }; -function createEmptyView(background: Color | undefined): ISplitViewView<{ top: number, left: number }> { +function createEmptyView(background: Color | undefined): ISplitViewView<{ top: number; left: number }> { const element = $('.centered-layout-margin'); element.style.height = '100%'; if (background) { @@ -37,7 +37,7 @@ function createEmptyView(background: Color | undefined): ISplitViewView<{ top: n }; } -function toSplitViewView(view: IView, getHeight: () => number): ISplitViewView<{ top: number, left: number }> { +function toSplitViewView(view: IView, getHeight: () => number): ISplitViewView<{ top: number; left: number }> { return { element: view.element, get maximumSize() { return view.maximumWidth; }, @@ -53,12 +53,12 @@ export interface ICenteredViewStyles extends ISplitViewStyles { export class CenteredViewLayout implements IDisposable { - private splitView?: SplitView<{ top: number, left: number }>; + private splitView?: SplitView<{ top: number; left: number }>; private width: number = 0; private height: number = 0; private style!: ICenteredViewStyles; private didLayout = false; - private emptyViews: ISplitViewView<{ top: number, left: number }>[] | undefined; + private emptyViews: ISplitViewView<{ top: number; left: number }>[] | undefined; private readonly splitViewDisposables = new DisposableStore(); constructor(private container: HTMLElement, private view: IView, public readonly state: CenteredViewState = { leftMarginRatio: GOLDEN_RATIO.leftMarginRatio, rightMarginRatio: GOLDEN_RATIO.rightMarginRatio }) { diff --git a/src/vs/base/browser/ui/grid/grid.ts b/src/vs/base/browser/ui/grid/grid.ts index 457976d1317a5..6a8982c175bee 100644 --- a/src/vs/base/browser/ui/grid/grid.ts +++ b/src/vs/base/browser/ui/grid/grid.ts @@ -197,7 +197,7 @@ function getGridLocation(element: HTMLElement): GridLocation { export type DistributeSizing = { type: 'distribute' }; export type SplitSizing = { type: 'split' }; -export type InvisibleSizing = { type: 'invisible', cachedVisibleSize: number }; +export type InvisibleSizing = { type: 'invisible'; cachedVisibleSize: number }; export type Sizing = DistributeSizing | SplitSizing | InvisibleSizing; export namespace Sizing { @@ -261,7 +261,7 @@ export class Grid extends Disposable { /** * Fires whenever a view within the grid changes its size constraints. */ - readonly onDidChange: Event<{ width: number; height: number; } | undefined>; + readonly onDidChange: Event<{ width: number; height: number } | undefined>; /** * Fires whenever the user scrolls a {@link SplitView} within @@ -776,8 +776,8 @@ export class SerializableGrid extends Grid { } } -export type GridNodeDescriptor = { size?: number, groups?: GridNodeDescriptor[] }; -export type GridDescriptor = { orientation: Orientation, groups?: GridNodeDescriptor[] }; +export type GridNodeDescriptor = { size?: number; groups?: GridNodeDescriptor[] }; +export type GridDescriptor = { orientation: Orientation; groups?: GridNodeDescriptor[] }; export function sanitizeGridNodeDescriptor(nodeDescriptor: GridNodeDescriptor, rootNode: boolean): void { if (!rootNode && nodeDescriptor.groups && nodeDescriptor.groups.length <= 1) { @@ -819,7 +819,7 @@ function createSerializedNode(nodeDescriptor: GridNodeDescriptor): ISerializedNo } } -function getDimensions(node: ISerializedNode, orientation: Orientation): { width?: number, height?: number } { +function getDimensions(node: ISerializedNode, orientation: Orientation): { width?: number; height?: number } { if (node.type === 'branch') { const childrenDimensions = node.data.map(c => getDimensions(c, orthogonal(orientation))); diff --git a/src/vs/base/browser/ui/hover/hoverWidget.ts b/src/vs/base/browser/ui/hover/hoverWidget.ts index c05a9658101a2..b86d896d15c50 100644 --- a/src/vs/base/browser/ui/hover/hoverWidget.ts +++ b/src/vs/base/browser/ui/hover/hoverWidget.ts @@ -43,14 +43,14 @@ export class HoverWidget extends Disposable { } export class HoverAction extends Disposable { - public static render(parent: HTMLElement, actionOptions: { label: string, iconClass?: string, run: (target: HTMLElement) => void, commandId: string }, keybindingLabel: string | null) { + public static render(parent: HTMLElement, actionOptions: { label: string; iconClass?: string; run: (target: HTMLElement) => void; commandId: string }, keybindingLabel: string | null) { return new HoverAction(parent, actionOptions, keybindingLabel); } private readonly actionContainer: HTMLElement; private readonly action: HTMLElement; - private constructor(parent: HTMLElement, actionOptions: { label: string, iconClass?: string, run: (target: HTMLElement) => void, commandId: string }, keybindingLabel: string | null) { + private constructor(parent: HTMLElement, actionOptions: { label: string; iconClass?: string; run: (target: HTMLElement) => void; commandId: string }, keybindingLabel: string | null) { super(); this.actionContainer = dom.append(parent, $('div.action-container')); diff --git a/src/vs/base/browser/ui/list/list.ts b/src/vs/base/browser/ui/list/list.ts index 9ab5894062916..29ebb8c14bcd7 100644 --- a/src/vs/base/browser/ui/list/list.ts +++ b/src/vs/base/browser/ui/list/list.ts @@ -57,11 +57,11 @@ export interface IListContextMenuEvent { browserEvent: UIEvent; element: T | undefined; index: number | undefined; - anchor: HTMLElement | { x: number; y: number; }; + anchor: HTMLElement | { x: number; y: number }; } export interface IIdentityProvider { - getId(element: T): { toString(): string; }; + getId(element: T): { toString(): string }; } export interface IKeyboardNavigationLabelProvider { @@ -71,7 +71,7 @@ export interface IKeyboardNavigationLabelProvider { * the list for filtering/navigating. Return `undefined` to make * an element always match. */ - getKeyboardNavigationLabel(element: T): { toString(): string | undefined; } | { toString(): string | undefined; }[] | undefined; + getKeyboardNavigationLabel(element: T): { toString(): string | undefined } | { toString(): string | undefined }[] | undefined; } export interface IKeyboardNavigationDelegate { diff --git a/src/vs/base/browser/ui/menu/menu.ts b/src/vs/base/browser/ui/menu/menu.ts index 0c9497b14cc8e..57251a459c769 100644 --- a/src/vs/base/browser/ui/menu/menu.ts +++ b/src/vs/base/browser/ui/menu/menu.ts @@ -843,7 +843,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem { } } - private calculateSubmenuMenuLayout(windowDimensions: Dimension, submenu: Dimension, entry: IDomNodePagePosition, expandDirection: Direction): { top: number, left: number } { + private calculateSubmenuMenuLayout(windowDimensions: Dimension, submenu: Dimension, entry: IDomNodePagePosition, expandDirection: Direction): { top: number; left: number } { const ret = { top: 0, left: 0 }; // Start with horizontal diff --git a/src/vs/base/browser/ui/menu/menubar.ts b/src/vs/base/browser/ui/menu/menubar.ts index 1e64ff88c77aa..fbcc1fa7d7c4d 100644 --- a/src/vs/base/browser/ui/menu/menubar.ts +++ b/src/vs/base/browser/ui/menu/menubar.ts @@ -33,7 +33,7 @@ export interface IMenuBarOptions { alwaysOnMnemonics?: boolean; compactMode?: Direction; actionRunner?: IActionRunner; - getCompactMenuActions?: () => IAction[] + getCompactMenuActions?: () => IAction[]; } export interface MenuBarMenu { @@ -475,7 +475,7 @@ export class MenuBar extends Disposable { const prevNumMenusShown = this.numMenusShown; this.numMenusShown = 0; - const showableMenus = this.menus.filter(menu => menu.buttonElement !== undefined && menu.titleElement !== undefined) as (MenuBarMenuWithElements & { titleElement: HTMLElement, buttonElement: HTMLElement })[]; + const showableMenus = this.menus.filter(menu => menu.buttonElement !== undefined && menu.titleElement !== undefined) as (MenuBarMenuWithElements & { titleElement: HTMLElement; buttonElement: HTMLElement })[]; for (let menuBarMenu of showableMenus) { if (!full) { const size = menuBarMenu.buttonElement.offsetWidth; diff --git a/src/vs/base/browser/ui/sash/sash.ts b/src/vs/base/browser/ui/sash/sash.ts index c39e05486eadf..210b95df4b50c 100644 --- a/src/vs/base/browser/ui/sash/sash.ts +++ b/src/vs/base/browser/ui/sash/sash.ts @@ -424,7 +424,7 @@ export class Sash extends Disposable { const onTap = this._register(new DomEmitter(this.el, EventType.Tap)).event; const onDoubleTap = Event.map( Event.filter( - Event.debounce(onTap, (res, event) => ({ event, count: (res?.count ?? 0) + 1 }), 250), + Event.debounce(onTap, (res, event) => ({ event, count: (res?.count ?? 0) + 1 }), 250), ({ count }) => count === 2 ), ({ event }) => ({ ...event, target: event.initialTarget ?? null }) diff --git a/src/vs/base/browser/ui/splitview/paneview.ts b/src/vs/base/browser/ui/splitview/paneview.ts index cc7b436798080..c341624db8ac4 100644 --- a/src/vs/base/browser/ui/splitview/paneview.ts +++ b/src/vs/base/browser/ui/splitview/paneview.ts @@ -305,7 +305,7 @@ class PaneDraggable extends Disposable { private dragOverCounter = 0; // see https://github.com/microsoft/vscode/issues/14470 - private _onDidDrop = this._register(new Emitter<{ from: Pane, to: Pane }>()); + private _onDidDrop = this._register(new Emitter<{ from: Pane; to: Pane }>()); readonly onDidDrop = this._onDidDrop.event; constructor(private pane: Pane, private dnd: IPaneDndController, private context: IDndContext) { @@ -444,8 +444,8 @@ export class PaneView extends Disposable { private splitview: SplitView; private animationTimer: number | undefined = undefined; - private _onDidDrop = this._register(new Emitter<{ from: Pane, to: Pane }>()); - readonly onDidDrop: Event<{ from: Pane, to: Pane }> = this._onDidDrop.event; + private _onDidDrop = this._register(new Emitter<{ from: Pane; to: Pane }>()); + readonly onDidDrop: Event<{ from: Pane; to: Pane }> = this._onDidDrop.event; orientation: Orientation; readonly onDidSashChange: Event; diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 9d934603553b6..636a9c536c3ec 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -333,12 +333,12 @@ export type DistributeSizing = { type: 'distribute' }; * When adding or removing views, split the delta space with another * specific view, indexed by the provided `index`. */ -export type SplitSizing = { type: 'split', index: number }; +export type SplitSizing = { type: 'split'; index: number }; /** * When adding or removing views, assume the view is invisible. */ -export type InvisibleSizing = { type: 'invisible', cachedVisibleSize: number }; +export type InvisibleSizing = { type: 'invisible'; cachedVisibleSize: number }; /** * When adding or removing views, the sizing provides fine grained diff --git a/src/vs/base/browser/ui/tree/asyncDataTree.ts b/src/vs/base/browser/ui/tree/asyncDataTree.ts index 0afc73fac8153..f0224d3e4e78c 100644 --- a/src/vs/base/browser/ui/tree/asyncDataTree.ts +++ b/src/vs/base/browser/ui/tree/asyncDataTree.ts @@ -282,7 +282,7 @@ export interface IAsyncDataTreeOptionsUpdate extends IAbstractTreeOptionsUpdate export interface IAsyncDataTreeUpdateChildrenOptions extends IObjectTreeSetChildrenOptions { } export interface IAsyncDataTreeOptions extends IAsyncDataTreeOptionsUpdate, Pick, Exclude, 'collapseByDefault'>> { - readonly collapseByDefault?: { (e: T): boolean; }; + readonly collapseByDefault?: { (e: T): boolean }; readonly identityProvider?: IIdentityProvider; readonly sorter?: ITreeSorter; readonly autoExpandSingleChildren?: boolean; @@ -312,7 +312,7 @@ export class AsyncDataTree implements IDisposable protected readonly root: IAsyncDataTreeNode; private readonly nodes = new Map>(); private readonly sorter?: ITreeSorter; - private readonly collapseByDefault?: { (e: T): boolean; }; + private readonly collapseByDefault?: { (e: T): boolean }; private readonly subTreeRefreshPromises = new Map, Promise>(); private readonly refreshPromises = new Map, CancelablePromise>>(); @@ -837,7 +837,7 @@ export class AsyncDataTree implements IDisposable } const nodesToForget = new Map>(); - const childrenTreeNodesById = new Map, collapsed: boolean; }>(); + const childrenTreeNodesById = new Map; collapsed: boolean }>(); for (const child of node.children) { nodesToForget.set(child.element as T, child); @@ -937,7 +937,7 @@ export class AsyncDataTree implements IDisposable const objectTreeOptions: IObjectTreeSetChildrenOptions> | undefined = options && { ...options, diffIdentityProvider: options!.diffIdentityProvider && { - getId(node: IAsyncDataTreeNode): { toString(): string; } { + getId(node: IAsyncDataTreeNode): { toString(): string } { return options!.diffIdentityProvider!.getId(node.element as T); } } diff --git a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts index e37bbba27b58c..8722c0afbe688 100644 --- a/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts @@ -388,7 +388,7 @@ function mapOptions(compressedNodeUnwrapper: CompressedNodeUnwra return { ...options, identityProvider: options.identityProvider && { - getId(node: ICompressedTreeNode): { toString(): string; } { + getId(node: ICompressedTreeNode): { toString(): string } { return options.identityProvider!.getId(compressedNodeUnwrapper(node)); } }, diff --git a/src/vs/base/browser/ui/tree/dataTree.ts b/src/vs/base/browser/ui/tree/dataTree.ts index 262313f2a2eee..afb6fa662fec1 100644 --- a/src/vs/base/browser/ui/tree/dataTree.ts +++ b/src/vs/base/browser/ui/tree/dataTree.ts @@ -157,7 +157,7 @@ export class DataTree extends AbstractTree boolean | undefined): { elements: Iterable>, size: number } { + private iterate(element: TInput | T, isCollapsed?: (el: T) => boolean | undefined): { elements: Iterable>; size: number } { const children = [...this.dataSource.getChildren(element)]; const elements = Iterable.map(children, element => { const { elements: children, size } = this.iterate(element, isCollapsed); diff --git a/src/vs/base/browser/ui/tree/indexTreeModel.ts b/src/vs/base/browser/ui/tree/indexTreeModel.ts index c24f78b54226a..e62ac02128977 100644 --- a/src/vs/base/browser/ui/tree/indexTreeModel.ts +++ b/src/vs/base/browser/ui/tree/indexTreeModel.ts @@ -70,7 +70,7 @@ export interface IIndexTreeModelSpliceOptions { /** * Callback for when a node is deleted. */ - onDidDeleteNode?: (node: ITreeNode) => void + onDidDeleteNode?: (node: ITreeNode) => void; } interface CollapsibleStateUpdate { @@ -713,7 +713,7 @@ export class IndexTreeModel, TFilterData = voi } // expensive - private getTreeNodeWithListIndex(location: number[]): { node: IIndexTreeNode, listIndex: number, revealed: boolean, visible: boolean } { + private getTreeNodeWithListIndex(location: number[]): { node: IIndexTreeNode; listIndex: number; revealed: boolean; visible: boolean } { if (location.length === 0) { return { node: this.root, listIndex: -1, revealed: true, visible: false }; } @@ -730,7 +730,7 @@ export class IndexTreeModel, TFilterData = voi return { node, listIndex, revealed, visible: visible && node.visible }; } - private getParentNodeWithListIndex(location: number[], node: IIndexTreeNode = this.root, listIndex: number = 0, revealed = true, visible = true): { parentNode: IIndexTreeNode; listIndex: number; revealed: boolean; visible: boolean; } { + private getParentNodeWithListIndex(location: number[], node: IIndexTreeNode = this.root, listIndex: number = 0, revealed = true, visible = true): { parentNode: IIndexTreeNode; listIndex: number; revealed: boolean; visible: boolean } { const [index, ...rest] = location; if (index < 0 || index > node.children.length) { diff --git a/src/vs/base/browser/ui/tree/objectTree.ts b/src/vs/base/browser/ui/tree/objectTree.ts index 1944c0c90fd71..847cb86d2fe9d 100644 --- a/src/vs/base/browser/ui/tree/objectTree.ts +++ b/src/vs/base/browser/ui/tree/objectTree.ts @@ -163,7 +163,7 @@ class CompressibleRenderer, TFilterData, TTemplateDat } export interface ICompressibleKeyboardNavigationLabelProvider extends IKeyboardNavigationLabelProvider { - getCompressedNodeKeyboardNavigationLabel(elements: T[]): { toString(): string | undefined; } | undefined; + getCompressedNodeKeyboardNavigationLabel(elements: T[]): { toString(): string | undefined } | undefined; } export interface ICompressibleObjectTreeOptions extends IObjectTreeOptions { diff --git a/src/vs/base/browser/ui/tree/objectTreeModel.ts b/src/vs/base/browser/ui/tree/objectTreeModel.ts index daefce35be9b8..fe44f7e91c7d5 100644 --- a/src/vs/base/browser/ui/tree/objectTreeModel.ts +++ b/src/vs/base/browser/ui/tree/objectTreeModel.ts @@ -33,7 +33,7 @@ export class ObjectTreeModel, TFilterData extends Non private nodes = new Map>(); private readonly nodesByIdentity = new Map>(); private readonly identityProvider?: IIdentityProvider; - private sorter?: ITreeSorter<{ element: T; }>; + private sorter?: ITreeSorter<{ element: T }>; readonly onDidSplice: Event>; readonly onDidChangeCollapseState: Event>; diff --git a/src/vs/base/browser/ui/tree/tree.ts b/src/vs/base/browser/ui/tree/tree.ts index 59d4c8255a467..0166e4cd3b6d5 100644 --- a/src/vs/base/browser/ui/tree/tree.ts +++ b/src/vs/base/browser/ui/tree/tree.ts @@ -153,7 +153,7 @@ export interface ITreeMouseEvent { export interface ITreeContextMenuEvent { browserEvent: UIEvent; element: T | null; - anchor: HTMLElement | { x: number; y: number; }; + anchor: HTMLElement | { x: number; y: number }; } export interface ITreeNavigator { diff --git a/src/vs/base/common/actions.ts b/src/vs/base/common/actions.ts index 86f0743bdc871..2fe5d37c03f31 100644 --- a/src/vs/base/common/actions.ts +++ b/src/vs/base/common/actions.ts @@ -14,8 +14,8 @@ export interface ITelemetryData { } export type WorkbenchActionExecutedClassification = { - id: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - from: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; + id: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + from: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; export type WorkbenchActionExecutedEvent = { @@ -258,7 +258,7 @@ export class EmptySubmenuAction extends Action { } } -export function toAction(props: { id: string, label: string, enabled?: boolean, checked?: boolean, run: Function; }): IAction { +export function toAction(props: { id: string; label: string; enabled?: boolean; checked?: boolean; run: Function }): IAction { return { id: props.id, label: props.label, diff --git a/src/vs/base/common/arrays.ts b/src/vs/base/common/arrays.ts index 0a66387f97b9b..8120619b243ea 100644 --- a/src/vs/base/common/arrays.ts +++ b/src/vs/base/common/arrays.ts @@ -198,7 +198,7 @@ export function sortedDiff(before: ReadonlyArray, after: ReadonlyArray, * Takes two *sorted* arrays and computes their delta (removed, added elements). * Finishes in `Math.min(before.length, after.length)` steps. */ -export function delta(before: ReadonlyArray, after: ReadonlyArray, compare: (a: T, b: T) => number): { removed: T[], added: T[] } { +export function delta(before: ReadonlyArray, after: ReadonlyArray, compare: (a: T, b: T) => number): { removed: T[]; added: T[] } { const splices = sortedDiff(before, after, compare); const removed: T[] = []; const added: T[] = []; @@ -421,9 +421,9 @@ export function range(arg: number, to?: number): number[] { return result; } -export function index(array: ReadonlyArray, indexer: (t: T) => string): { [key: string]: T; }; -export function index(array: ReadonlyArray, indexer: (t: T) => string, mapper: (t: T) => R): { [key: string]: R; }; -export function index(array: ReadonlyArray, indexer: (t: T) => string, mapper?: (t: T) => R): { [key: string]: R; } { +export function index(array: ReadonlyArray, indexer: (t: T) => string): { [key: string]: T }; +export function index(array: ReadonlyArray, indexer: (t: T) => string, mapper: (t: T) => R): { [key: string]: R }; +export function index(array: ReadonlyArray, indexer: (t: T) => string, mapper?: (t: T) => R): { [key: string]: R } { return array.reduce((r, t) => { r[indexer(t)] = mapper ? mapper(t) : t; return r; diff --git a/src/vs/base/common/async.ts b/src/vs/base/common/async.ts index 03bf816737086..0d170c9bd0013 100644 --- a/src/vs/base/common/async.ts +++ b/src/vs/base/common/async.ts @@ -1115,7 +1115,7 @@ export interface IdleDeadline { */ export let runWhenIdle: (callback: (idle: IdleDeadline) => void, timeout?: number) => IDisposable; -declare function requestIdleCallback(callback: (args: IdleDeadline) => void, options?: { timeout: number; }): number; +declare function requestIdleCallback(callback: (args: IdleDeadline) => void, options?: { timeout: number }): number; declare function cancelIdleCallback(handle: number): void; (function () { diff --git a/src/vs/base/common/buffer.ts b/src/vs/base/common/buffer.ts index 8e5b12cfa96a6..765a788327b77 100644 --- a/src/vs/base/common/buffer.ts +++ b/src/vs/base/common/buffer.ts @@ -44,7 +44,7 @@ export class VSBuffer { * When running in a nodejs context, the backing store for the returned `VSBuffer` instance * might use a nodejs Buffer allocated from node's Buffer pool, which is not transferrable. */ - static fromString(source: string, options?: { dontUseNodeBuffer?: boolean; }): VSBuffer { + static fromString(source: string, options?: { dontUseNodeBuffer?: boolean }): VSBuffer { const dontUseNodeBuffer = options?.dontUseNodeBuffer || false; if (!dontUseNodeBuffer && hasBuffer) { return new VSBuffer(Buffer.from(source)); diff --git a/src/vs/base/common/collections.ts b/src/vs/base/common/collections.ts index 24ed68bae5f99..bc2f5c31950e3 100644 --- a/src/vs/base/common/collections.ts +++ b/src/vs/base/common/collections.ts @@ -36,7 +36,7 @@ export function values(from: IStringDictionary | INumberDictionary): T[ * Iterates over each entry in the provided dictionary. The iterator allows * to remove elements and will stop when the callback returns {{false}}. */ -export function forEach(from: IStringDictionary | INumberDictionary, callback: (entry: { key: any; value: T; }, remove: () => void) => any): void { +export function forEach(from: IStringDictionary | INumberDictionary, callback: (entry: { key: any; value: T }, remove: () => void) => any): void { for (let key in from) { if (hasOwnProperty.call(from, key)) { const result = callback({ key: key, value: (from as any)[key] }, function () { @@ -76,7 +76,7 @@ export function fromMap(original: Map): IStringDictionary { return result; } -export function diffSets(before: Set, after: Set): { removed: T[], added: T[] } { +export function diffSets(before: Set, after: Set): { removed: T[]; added: T[] } { const removed: T[] = []; const added: T[] = []; for (let element of before) { @@ -92,7 +92,7 @@ export function diffSets(before: Set, after: Set): { removed: T[], adde return { removed, added }; } -export function diffMaps(before: Map, after: Map): { removed: V[], added: V[] } { +export function diffMaps(before: Map, after: Map): { removed: V[]; added: V[] } { const removed: V[] = []; const added: V[] = []; for (let [index, value] of before) { diff --git a/src/vs/base/common/comparers.ts b/src/vs/base/common/comparers.ts index 7dbf871567160..64643232f7d5b 100644 --- a/src/vs/base/common/comparers.ts +++ b/src/vs/base/common/comparers.ts @@ -11,7 +11,7 @@ import { sep } from 'vs/base/common/path'; // than it is to use String.prototype.localeCompare() // A collator with numeric sorting enabled, and no sensitivity to case, accents or diacritics. -const intlFileNameCollatorBaseNumeric: IdleValue<{ collator: Intl.Collator, collatorIsNumeric: boolean }> = new IdleValue(() => { +const intlFileNameCollatorBaseNumeric: IdleValue<{ collator: Intl.Collator; collatorIsNumeric: boolean }> = new IdleValue(() => { const collator = new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' }); return { collator: collator, diff --git a/src/vs/base/common/console.ts b/src/vs/base/common/console.ts index 478e06077a648..194abde45b538 100644 --- a/src/vs/base/common/console.ts +++ b/src/vs/base/common/console.ts @@ -27,7 +27,7 @@ export function isRemoteConsoleLog(obj: any): obj is IRemoteConsoleLog { return entry && typeof entry.type === 'string' && typeof entry.severity === 'string'; } -export function parse(entry: IRemoteConsoleLog): { args: any[], stack?: string } { +export function parse(entry: IRemoteConsoleLog): { args: any[]; stack?: string } { const args: any[] = []; let stack: string | undefined; diff --git a/src/vs/base/common/event.ts b/src/vs/base/common/event.ts index 8160ace0dce39..b1f673695a92f 100644 --- a/src/vs/base/common/event.ts +++ b/src/vs/base/common/event.ts @@ -400,7 +400,7 @@ export interface EmitterOptions { leakWarningThreshold?: number; /** ONLY enable this during development */ - _profName?: string + _profName?: string; } @@ -770,7 +770,7 @@ export class DebounceEmitter extends PauseableEmitter { private readonly _delay: number; private _handle: any | undefined; - constructor(options: EmitterOptions & { merge: (input: T[]) => T, delay?: number }) { + constructor(options: EmitterOptions & { merge: (input: T[]) => T; delay?: number }) { super(options); this._delay = options.delay ?? 100; } @@ -818,7 +818,7 @@ export class EventMultiplexer implements IDisposable { private readonly emitter: Emitter; private hasListeners = false; - private events: { event: Event; listener: IDisposable | null; }[] = []; + private events: { event: Event; listener: IDisposable | null }[] = []; constructor() { this.emitter = new Emitter({ @@ -861,11 +861,11 @@ export class EventMultiplexer implements IDisposable { this.events.forEach(e => this.unhook(e)); } - private hook(e: { event: Event; listener: IDisposable | null; }): void { + private hook(e: { event: Event; listener: IDisposable | null }): void { e.listener = e.event(r => this.emitter.fire(r)); } - private unhook(e: { event: Event; listener: IDisposable | null; }): void { + private unhook(e: { event: Event; listener: IDisposable | null }): void { if (e.listener) { e.listener.dispose(); } diff --git a/src/vs/base/common/fuzzyScorer.ts b/src/vs/base/common/fuzzyScorer.ts index f6ec001820a40..aa074b3ea9acb 100644 --- a/src/vs/base/common/fuzzyScorer.ts +++ b/src/vs/base/common/fuzzyScorer.ts @@ -885,7 +885,7 @@ export function prepareQuery(original: string): IPreparedQuery { return { original, originalLowercase, pathNormalized, normalized, normalizedLowercase, values, containsPathSeparator, expectContiguousMatch: expectExactMatch }; } -function normalizeQuery(original: string): { pathNormalized: string, normalized: string, normalizedLowercase: string } { +function normalizeQuery(original: string): { pathNormalized: string; normalized: string; normalizedLowercase: string } { let pathNormalized: string; if (isWindows) { pathNormalized = original.replace(/\//g, sep); // Help Windows users to search for paths when using slash diff --git a/src/vs/base/common/glob.ts b/src/vs/base/common/glob.ts index f6ba3635ffaea..0915d3137e0cc 100644 --- a/src/vs/base/common/glob.ts +++ b/src/vs/base/common/glob.ts @@ -490,7 +490,7 @@ export function parse(arg1: string | IExpression | IRelativePattern, options: IG if (parsedPattern === NULL) { return FALSE; } - const resultPattern: ParsedPattern & { allBasenames?: string[]; allPaths?: string[]; } = function (path: string, basename?: string) { + const resultPattern: ParsedPattern & { allBasenames?: string[]; allPaths?: string[] } = function (path: string, basename?: string) { return !!parsedPattern(path, basename); }; if (parsedPattern.allBasenames) { diff --git a/src/vs/base/common/htmlContent.ts b/src/vs/base/common/htmlContent.ts index b26f40cce7a47..87c24705162e9 100644 --- a/src/vs/base/common/htmlContent.ts +++ b/src/vs/base/common/htmlContent.ts @@ -29,7 +29,7 @@ export class MarkdownString implements IMarkdownString { constructor( value: string = '', - isTrustedOrOptions: boolean | { isTrusted?: boolean, supportThemeIcons?: boolean, supportHtml?: boolean } = false, + isTrustedOrOptions: boolean | { isTrusted?: boolean; supportThemeIcons?: boolean; supportHtml?: boolean } = false, ) { this.value = value; if (typeof this.value !== 'string') { @@ -118,7 +118,7 @@ export function removeMarkdownEscapes(text: string): string { return text.replace(/\\([\\`*_{}[\]()#+\-.!])/g, '$1'); } -export function parseHrefAndDimensions(href: string): { href: string, dimensions: string[] } { +export function parseHrefAndDimensions(href: string): { href: string; dimensions: string[] } { const dimensions: string[] = []; const splitted = href.split('|').map(s => s.trim()); href = splitted[0]; diff --git a/src/vs/base/common/keyCodes.ts b/src/vs/base/common/keyCodes.ts index daf9711046e8d..b2d163954a1a9 100644 --- a/src/vs/base/common/keyCodes.ts +++ b/src/vs/base/common/keyCodes.ts @@ -420,7 +420,7 @@ export const enum ScanCode { class KeyCodeStrMap { public _keyCodeToStr: string[]; - public _strToKeyCode: { [str: string]: KeyCode; }; + public _strToKeyCode: { [str: string]: KeyCode }; constructor() { this._keyCodeToStr = []; @@ -445,10 +445,10 @@ const uiMap = new KeyCodeStrMap(); const userSettingsUSMap = new KeyCodeStrMap(); const userSettingsGeneralMap = new KeyCodeStrMap(); export const EVENT_KEY_CODE_MAP: { [keyCode: number]: KeyCode } = new Array(230); -export const NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE: { [nativeKeyCode: string]: KeyCode; } = {}; +export const NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE: { [nativeKeyCode: string]: KeyCode } = {}; const scanCodeIntToStr: string[] = []; -const scanCodeStrToInt: { [code: string]: number; } = Object.create(null); -const scanCodeLowerCaseStrToInt: { [code: string]: number; } = Object.create(null); +const scanCodeStrToInt: { [code: string]: number } = Object.create(null); +const scanCodeLowerCaseStrToInt: { [code: string]: number } = Object.create(null); export const ScanCodeUtils = { lowerCaseToEnum: (scanCode: string) => scanCodeLowerCaseStrToInt[scanCode] || ScanCode.None, diff --git a/src/vs/base/common/labels.ts b/src/vs/base/common/labels.ts index 44f8c5ac4d91c..70ee48e82a0a9 100644 --- a/src/vs/base/common/labels.ts +++ b/src/vs/base/common/labels.ts @@ -12,9 +12,9 @@ import { rtrim, startsWithIgnoreCase } from 'vs/base/common/strings'; import { URI } from 'vs/base/common/uri'; export interface IWorkspaceFolderProvider { - getWorkspaceFolder(resource: URI): { uri: URI, name?: string; } | null; + getWorkspaceFolder(resource: URI): { uri: URI; name?: string } | null; getWorkspace(): { - folders: { uri: URI, name?: string; }[]; + folders: { uri: URI; name?: string }[]; }; } @@ -100,7 +100,7 @@ export function normalizeDriveLetter(path: string, continueAsWindows?: boolean): return path; } -let normalizedUserHomeCached: { original: string; normalized: string; } = Object.create(null); +let normalizedUserHomeCached: { original: string; normalized: string } = Object.create(null); export function tildify(path: string, userHome: string): string { if (isWindows || !path || !userHome) { return path; // unsupported @@ -279,7 +279,7 @@ interface ISegment { * @param value string to which template is applied * @param values the values of the templates to use */ -export function template(template: string, values: { [key: string]: string | ISeparator | undefined | null; } = Object.create(null)): string { +export function template(template: string, values: { [key: string]: string | ISeparator | undefined | null } = Object.create(null)): string { const segments: ISegment[] = []; let inVariable = false; @@ -383,7 +383,7 @@ export function unmnemonicLabel(label: string): string { /** * Splits a path in name and parent path, supporting both '/' and '\' */ -export function splitName(fullPath: string): { name: string, parentPath: string; } { +export function splitName(fullPath: string): { name: string; parentPath: string } { const p = fullPath.indexOf('/') !== -1 ? posix : win32; const name = p.basename(fullPath); const parentPath = p.dirname(fullPath); diff --git a/src/vs/base/common/lifecycle.ts b/src/vs/base/common/lifecycle.ts index 0ffa00ff72483..471d98b64878d 100644 --- a/src/vs/base/common/lifecycle.ts +++ b/src/vs/base/common/lifecycle.ts @@ -345,7 +345,7 @@ export interface IReference extends IDisposable { export abstract class ReferenceCollection { - private readonly references: Map = new Map(); + private readonly references: Map = new Map(); acquire(key: string, ...args: any[]): IReference { let reference = this.references.get(key); diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts index 15d8fc239c53c..922b021a1f9ba 100644 --- a/src/vs/base/common/network.ts +++ b/src/vs/base/common/network.ts @@ -107,9 +107,9 @@ export const connectionTokenCookieName = 'vscode-tkn'; export const connectionTokenQueryName = 'tkn'; class RemoteAuthoritiesImpl { - private readonly _hosts: { [authority: string]: string | undefined; } = Object.create(null); - private readonly _ports: { [authority: string]: number | undefined; } = Object.create(null); - private readonly _connectionTokens: { [authority: string]: string | undefined; } = Object.create(null); + private readonly _hosts: { [authority: string]: string | undefined } = Object.create(null); + private readonly _ports: { [authority: string]: number | undefined } = Object.create(null); + private readonly _connectionTokens: { [authority: string]: string | undefined } = Object.create(null); private _preferredWebSchema: 'http' | 'https' = 'http'; private _delegate: ((uri: URI) => URI) | null = null; diff --git a/src/vs/base/common/objects.ts b/src/vs/base/common/objects.ts index 2e3e020856ca5..148d2d6b23208 100644 --- a/src/vs/base/common/objects.ts +++ b/src/vs/base/common/objects.ts @@ -190,7 +190,7 @@ export function getOrDefault(obj: T, fn: (obj: T) => R | undefined, defaul return typeof result === 'undefined' ? defaultValue : result; } -type obj = { [key: string]: any; }; +type obj = { [key: string]: any }; /** * Returns an object that has keys for each value that is different in the base object. Keys * that do not exist in the target but in the base object are not considered. diff --git a/src/vs/base/common/platform.ts b/src/vs/base/common/platform.ts index e2a250fbf78bd..eea237c2b41f9 100644 --- a/src/vs/base/common/platform.ts +++ b/src/vs/base/common/platform.ts @@ -21,7 +21,7 @@ let _userAgent: string | undefined = undefined; interface NLSConfig { locale: string; - availableLanguages: { [key: string]: string; }; + availableLanguages: { [key: string]: string }; _translationsConfigFile: string; } diff --git a/src/vs/base/common/process.ts b/src/vs/base/common/process.ts index c6341d951a9cf..cfa3c1c5a4147 100644 --- a/src/vs/base/common/process.ts +++ b/src/vs/base/common/process.ts @@ -5,7 +5,7 @@ import { globals, INodeProcess, isMacintosh, isWindows } from 'vs/base/common/platform'; -let safeProcess: Omit & { arch: string | undefined; }; +let safeProcess: Omit & { arch: string | undefined }; declare const process: INodeProcess; // Native sandbox environment diff --git a/src/vs/base/common/processes.ts b/src/vs/base/common/processes.ts index 1f76d2f722429..db23e1058088d 100644 --- a/src/vs/base/common/processes.ts +++ b/src/vs/base/common/processes.ts @@ -19,7 +19,7 @@ export interface CommandOptions { * The environment of the executed program or shell. If omitted * the parent process' environment is used. */ - env?: { [key: string]: string; }; + env?: { [key: string]: string }; } export interface Executable { diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts index bfd629b39cbdd..cf012cd2c404d 100644 --- a/src/vs/base/common/product.ts +++ b/src/vs/base/common/product.ts @@ -13,21 +13,21 @@ export interface IBuiltInExtension { } export type ConfigurationSyncStore = { - url: string, - insidersUrl: string, - stableUrl: string, - canSwitch: boolean, - authenticationProviders: IStringDictionary<{ scopes: string[] }> + url: string; + insidersUrl: string; + stableUrl: string; + canSwitch: boolean; + authenticationProviders: IStringDictionary<{ scopes: string[] }>; }; export type ExtensionUntrustedWorkspaceSupport = { - readonly default?: boolean | 'limited', - readonly override?: boolean | 'limited' + readonly default?: boolean | 'limited'; + readonly override?: boolean | 'limited'; }; export type ExtensionVirtualWorkspaceSupport = { - readonly default?: boolean, - readonly override?: boolean + readonly default?: boolean; + readonly override?: boolean; }; export interface IProductConfiguration { @@ -76,16 +76,16 @@ export interface IProductConfiguration { readonly recommendationsUrl: string; }; - readonly extensionTips?: { [id: string]: string; }; + readonly extensionTips?: { [id: string]: string }; readonly extensionImportantTips?: IStringDictionary; - readonly configBasedExtensionTips?: { [id: string]: IConfigBasedExtensionTip; }; - readonly exeBasedExtensionTips?: { [id: string]: IExeBasedExtensionTip; }; - readonly remoteExtensionTips?: { [remoteName: string]: IRemoteExtensionTip; }; - readonly extensionKeywords?: { [extension: string]: readonly string[]; }; + readonly configBasedExtensionTips?: { [id: string]: IConfigBasedExtensionTip }; + readonly exeBasedExtensionTips?: { [id: string]: IExeBasedExtensionTip }; + readonly remoteExtensionTips?: { [remoteName: string]: IRemoteExtensionTip }; + readonly extensionKeywords?: { [extension: string]: readonly string[] }; readonly keymapExtensionTips?: readonly string[]; readonly webExtensionTips?: readonly string[]; readonly languageExtensionTips?: readonly string[]; - readonly trustedExtensionUrlPublicKeys?: { [id: string]: string[]; }; + readonly trustedExtensionUrlPublicKeys?: { [id: string]: string[] }; readonly crashReporter?: { readonly companyName: string; @@ -99,8 +99,8 @@ export interface IProductConfiguration { }; readonly sendASmile?: { - readonly reportIssueUrl: string, - readonly requestFeatureUrl: string + readonly reportIssueUrl: string; + readonly requestFeatureUrl: string; }; readonly documentationUrl?: string; @@ -129,19 +129,19 @@ export interface IProductConfiguration { readonly cesSurveyUrl?: string; readonly surveys?: readonly ISurveyData[]; - readonly checksums?: { [path: string]: string; }; + readonly checksums?: { [path: string]: string }; readonly checksumFailMoreInfoUrl?: string; readonly appCenter?: IAppCenterConfiguration; readonly portable?: string; - readonly extensionKind?: { readonly [extensionId: string]: ('ui' | 'workspace' | 'web')[]; }; - readonly extensionPointExtensionKind?: { readonly [extensionPointId: string]: ('ui' | 'workspace' | 'web')[]; }; - readonly extensionSyncedKeys?: { readonly [extensionId: string]: string[]; }; + readonly extensionKind?: { readonly [extensionId: string]: ('ui' | 'workspace' | 'web')[] }; + readonly extensionPointExtensionKind?: { readonly [extensionPointId: string]: ('ui' | 'workspace' | 'web')[] }; + readonly extensionSyncedKeys?: { readonly [extensionId: string]: string[] }; /** @deprecated */ readonly extensionAllowedProposedApi?: readonly string[]; - readonly extensionEnabledApiProposals?: { readonly [extensionId: string]: string[] } + readonly extensionEnabledApiProposals?: { readonly [extensionId: string]: string[] }; readonly extensionUntrustedWorkspaceSupport?: { readonly [extensionId: string]: ExtensionUntrustedWorkspaceSupport }; readonly extensionVirtualWorkspacesSupport?: { readonly [extensionId: string]: ExtensionVirtualWorkspaceSupport }; @@ -166,14 +166,14 @@ export interface IConfigBasedExtensionTip { configPath: string; configName: string; configScheme?: string; - recommendations: IStringDictionary<{ name: string, remotes?: string[], important?: boolean, isExtensionPack?: boolean }>; + recommendations: IStringDictionary<{ name: string; remotes?: string[]; important?: boolean; isExtensionPack?: boolean }>; } export interface IExeBasedExtensionTip { friendlyName: string; windowsPath?: string; important?: boolean; - recommendations: IStringDictionary<{ name: string, important?: boolean, isExtensionPack?: boolean }>; + recommendations: IStringDictionary<{ name: string; important?: boolean; isExtensionPack?: boolean }>; } export interface IRemoteExtensionTip { diff --git a/src/vs/base/common/resources.ts b/src/vs/base/common/resources.ts index cd62839c1333d..4bcd8fb899fda 100644 --- a/src/vs/base/common/resources.ts +++ b/src/vs/base/common/resources.ts @@ -90,7 +90,7 @@ export interface IExtUri { * @param pathFragment The path fragment to add to the URI path. * @returns The resulting URI. */ - joinPath(resource: URI, ...pathFragment: string[]): URI + joinPath(resource: URI, ...pathFragment: string[]): URI; /** * Normalizes the path part of a URI: Resolves `.` and `..` elements with directory names. * diff --git a/src/vs/base/common/worker/simpleWorker.ts b/src/vs/base/common/worker/simpleWorker.ts index 252f7f4ece831..2617e68abfc96 100644 --- a/src/vs/base/common/worker/simpleWorker.ts +++ b/src/vs/base/common/worker/simpleWorker.ts @@ -104,7 +104,7 @@ class SimpleWorkerProtocol { private _workerId: number; private _lastSentReq: number; - private _pendingReplies: { [req: string]: IMessageReply; }; + private _pendingReplies: { [req: string]: IMessageReply }; private _pendingEmitters: Map>; private _pendingEvents: Map; private _handler: IMessageHandler; diff --git a/src/vs/base/node/pfs.ts b/src/vs/base/node/pfs.ts index a04892a473169..683d3eb9c65d3 100644 --- a/src/vs/base/node/pfs.ts +++ b/src/vs/base/node/pfs.ts @@ -532,7 +532,7 @@ async function move(source: string, target: string): Promise { } interface ICopyPayload { - readonly root: { source: string, target: string }; + readonly root: { source: string; target: string }; readonly options: { preserveSymlinks: boolean }; readonly handledSourcePaths: Set; } @@ -670,7 +670,7 @@ export const Promises = new class { // just the bytes read, so we create our own wrapper. return (fd: number, buffer: Uint8Array, offset: number, length: number, position: number | null) => { - return new Promise<{ bytesRead: number, buffer: Uint8Array }>((resolve, reject) => { + return new Promise<{ bytesRead: number; buffer: Uint8Array }>((resolve, reject) => { fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => { if (err) { return reject(err); @@ -690,7 +690,7 @@ export const Promises = new class { // just the bytes written, so we create our own wrapper. return (fd: number, buffer: Uint8Array, offset: number | undefined | null, length: number | undefined | null, position: number | undefined | null) => { - return new Promise<{ bytesWritten: number, buffer: Uint8Array }>((resolve, reject) => { + return new Promise<{ bytesWritten: number; buffer: Uint8Array }>((resolve, reject) => { fs.write(fd, buffer, offset, length, position, (err, bytesWritten, buffer) => { if (err) { return reject(err); diff --git a/src/vs/base/parts/ipc/common/ipc.net.ts b/src/vs/base/parts/ipc/common/ipc.net.ts index 5a679c05f20ba..e4fb1c634fb85 100644 --- a/src/vs/base/parts/ipc/common/ipc.net.ts +++ b/src/vs/base/parts/ipc/common/ipc.net.ts @@ -108,7 +108,7 @@ export interface NodeSocketCloseEvent { /** * Underlying error. */ - readonly error: Error | undefined + readonly error: Error | undefined; } export interface WebSocketCloseEvent { diff --git a/src/vs/base/parts/ipc/common/ipc.ts b/src/vs/base/parts/ipc/common/ipc.ts index 1fac920dcc92c..d900128623ed7 100644 --- a/src/vs/base/parts/ipc/common/ipc.ts +++ b/src/vs/base/parts/ipc/common/ipc.ts @@ -56,10 +56,10 @@ function requestTypeToStr(type: RequestType): string { } } -type IRawPromiseRequest = { type: RequestType.Promise; id: number; channelName: string; name: string; arg: any; }; -type IRawPromiseCancelRequest = { type: RequestType.PromiseCancel, id: number }; -type IRawEventListenRequest = { type: RequestType.EventListen; id: number; channelName: string; name: string; arg: any; }; -type IRawEventDisposeRequest = { type: RequestType.EventDispose, id: number }; +type IRawPromiseRequest = { type: RequestType.Promise; id: number; channelName: string; name: string; arg: any }; +type IRawPromiseCancelRequest = { type: RequestType.PromiseCancel; id: number }; +type IRawEventListenRequest = { type: RequestType.EventListen; id: number; channelName: string; name: string; arg: any }; +type IRawEventDisposeRequest = { type: RequestType.EventDispose; id: number }; type IRawRequest = IRawPromiseRequest | IRawPromiseCancelRequest | IRawEventListenRequest | IRawEventDisposeRequest; export const enum ResponseType { @@ -86,7 +86,7 @@ function responseTypeToStr(type: ResponseType): string { type IRawInitializeResponse = { type: ResponseType.Initialize }; type IRawPromiseSuccessResponse = { type: ResponseType.PromiseSuccess; id: number; data: any }; -type IRawPromiseErrorResponse = { type: ResponseType.PromiseError; id: number; data: { message: string, name: string, stack: string[] | undefined } }; +type IRawPromiseErrorResponse = { type: ResponseType.PromiseError; id: number; data: { message: string; name: string; stack: string[] | undefined } }; type IRawPromiseErrorObjResponse = { type: ResponseType.PromiseErrorObj; id: number; data: any }; type IRawEventFireResponse = { type: ResponseType.EventFire; id: number; data: any }; type IRawResponse = IRawInitializeResponse | IRawPromiseSuccessResponse | IRawPromiseErrorResponse | IRawPromiseErrorObjResponse | IRawEventFireResponse; diff --git a/src/vs/base/parts/ipc/electron-main/ipc.electron.ts b/src/vs/base/parts/ipc/electron-main/ipc.electron.ts index 8a7a2cbbe1d15..431c44bf3d1ea 100644 --- a/src/vs/base/parts/ipc/electron-main/ipc.electron.ts +++ b/src/vs/base/parts/ipc/electron-main/ipc.electron.ts @@ -11,7 +11,7 @@ import { ClientConnectionEvent, IPCServer } from 'vs/base/parts/ipc/common/ipc'; import { Protocol as ElectronProtocol } from 'vs/base/parts/ipc/common/ipc.electron'; interface IIPCEvent { - event: { sender: WebContents; }; + event: { sender: WebContents }; message: Buffer | null; } diff --git a/src/vs/base/parts/ipc/electron-main/ipc.mp.ts b/src/vs/base/parts/ipc/electron-main/ipc.mp.ts index 5d9e1d49f0371..3384832669b97 100644 --- a/src/vs/base/parts/ipc/electron-main/ipc.mp.ts +++ b/src/vs/base/parts/ipc/electron-main/ipc.mp.ts @@ -50,7 +50,7 @@ export async function connect(window: BrowserWindow): Promise { // Wait until the window has returned the `MessagePort` // We need to filter by the `nonce` to ensure we listen // to the right response. - const onMessageChannelResult = Event.fromNodeEventEmitter<{ nonce: string, port: MessagePortMain }>(ipcMain, 'vscode:createMessageChannelResult', (e: IpcMainEvent, nonce: string) => ({ nonce, port: e.ports[0] })); + const onMessageChannelResult = Event.fromNodeEventEmitter<{ nonce: string; port: MessagePortMain }>(ipcMain, 'vscode:createMessageChannelResult', (e: IpcMainEvent, nonce: string) => ({ nonce, port: e.ports[0] })); const { port } = await Event.toPromise(Event.once(Event.filter(onMessageChannelResult, e => e.nonce === nonce))); return port; diff --git a/src/vs/base/parts/ipc/node/ipc.cp.ts b/src/vs/base/parts/ipc/node/ipc.cp.ts index 4929f85c003a4..127d0082d1188 100644 --- a/src/vs/base/parts/ipc/node/ipc.cp.ts +++ b/src/vs/base/parts/ipc/node/ipc.cp.ts @@ -90,7 +90,7 @@ export class Client implements IChannelClient, IDisposable { private _client: IPCClient | null; private channels = new Map(); - private readonly _onDidProcessExit = new Emitter<{ code: number, signal: string }>(); + private readonly _onDidProcessExit = new Emitter<{ code: number; signal: string }>(); readonly onDidProcessExit = this._onDidProcessExit.event; constructor(private modulePath: string, private options: IIPCOptions) { diff --git a/src/vs/base/parts/ipc/node/ipc.net.ts b/src/vs/base/parts/ipc/node/ipc.net.ts index af596a0fed690..fb7e757bdcaf8 100644 --- a/src/vs/base/parts/ipc/node/ipc.net.ts +++ b/src/vs/base/parts/ipc/node/ipc.net.ts @@ -175,7 +175,7 @@ const enum ReadState { } interface ISocketTracer { - traceSocketEvent(type: SocketDiagnosticsEventType, data?: VSBuffer | Uint8Array | ArrayBuffer | ArrayBufferView | any): void + traceSocketEvent(type: SocketDiagnosticsEventType, data?: VSBuffer | Uint8Array | ArrayBuffer | ArrayBufferView | any): void; } /** @@ -438,7 +438,7 @@ class WebSocketFlowManager extends Disposable { private readonly _zlibInflateStream: ZlibInflateStream | null; private readonly _zlibDeflateStream: ZlibDeflateStream | null; private readonly _writeQueue: VSBuffer[] = []; - private readonly _readQueue: { data: VSBuffer, isCompressed: boolean, isLastFrameOfMessage: boolean }[] = []; + private readonly _readQueue: { data: VSBuffer; isCompressed: boolean; isLastFrameOfMessage: boolean }[] = []; private readonly _onDidFinishProcessingWriteQueue = this._register(new Emitter()); public readonly onDidFinishProcessingWriteQueue = this._onDidFinishProcessingWriteQueue.event; @@ -795,7 +795,7 @@ export function serve(hook: any): Promise { }); } -export function connect(options: { host: string, port: number }, clientId: string): Promise; +export function connect(options: { host: string; port: number }, clientId: string): Promise; export function connect(port: number, clientId: string): Promise; export function connect(namedPipe: string, clientId: string): Promise; export function connect(hook: any, clientId: string): Promise { diff --git a/src/vs/base/parts/ipc/test/node/testService.ts b/src/vs/base/parts/ipc/test/node/testService.ts index 675e5a5f6192e..ac7c42b703e45 100644 --- a/src/vs/base/parts/ipc/test/node/testService.ts +++ b/src/vs/base/parts/ipc/test/node/testService.ts @@ -14,7 +14,7 @@ export interface IMarcoPoloEvent { export interface ITestService { onMarco: Event; marco(): Promise; - pong(ping: string): Promise<{ incoming: string, outgoing: string }>; + pong(ping: string): Promise<{ incoming: string; outgoing: string }>; cancelMe(): Promise; } @@ -28,7 +28,7 @@ export class TestService implements ITestService { return Promise.resolve('polo'); } - pong(ping: string): Promise<{ incoming: string, outgoing: string }> { + pong(ping: string): Promise<{ incoming: string; outgoing: string }> { return Promise.resolve({ incoming: ping, outgoing: 'pong' }); } @@ -69,7 +69,7 @@ export class TestServiceClient implements ITestService { return this.channel.call('marco'); } - pong(ping: string): Promise<{ incoming: string, outgoing: string }> { + pong(ping: string): Promise<{ incoming: string; outgoing: string }> { return this.channel.call('pong', ping); } diff --git a/src/vs/base/parts/quickinput/browser/quickInput.ts b/src/vs/base/parts/quickinput/browser/quickInput.ts index eae311302446b..a75b519665a49 100644 --- a/src/vs/base/parts/quickinput/browser/quickInput.ts +++ b/src/vs/base/parts/quickinput/browser/quickInput.ts @@ -59,7 +59,7 @@ export interface IQuickInputStyles { button: IButtonStyles; progressBar: IProgressBarStyles; keybindingLabel: IKeybindingLabelStyles; - list: IListStyles & { pickerGroupBorder?: Color; pickerGroupForeground?: Color; }; + list: IListStyles & { pickerGroupBorder?: Color; pickerGroupForeground?: Color }; } export interface IQuickInputWidgetStyles { diff --git a/src/vs/base/parts/quickinput/browser/quickInputUtils.ts b/src/vs/base/parts/quickinput/browser/quickInputUtils.ts index eb0279b85d133..11f24b92683b9 100644 --- a/src/vs/base/parts/quickinput/browser/quickInputUtils.ts +++ b/src/vs/base/parts/quickinput/browser/quickInputUtils.ts @@ -11,7 +11,7 @@ import 'vs/css!./media/quickInput'; const iconPathToClass: Record = {}; const iconClassGenerator = new IdGenerator('quick-input-button-icon-'); -export function getIconClass(iconPath: { dark: URI; light?: URI; } | undefined): string | undefined { +export function getIconClass(iconPath: { dark: URI; light?: URI } | undefined): string | undefined { if (!iconPath) { return undefined; } diff --git a/src/vs/base/parts/quickinput/common/quickInput.ts b/src/vs/base/parts/quickinput/common/quickInput.ts index 337a07a08ebdb..23e42343991cc 100644 --- a/src/vs/base/parts/quickinput/common/quickInput.ts +++ b/src/vs/base/parts/quickinput/common/quickInput.ts @@ -156,7 +156,7 @@ export interface IInputOptions { /** * an optional function that is used to validate user input. */ - validateInput?: (input: string) => Promise; + validateInput?: (input: string) => Promise; } export enum QuickInputHideReason { @@ -353,7 +353,7 @@ export interface IInputBox extends IQuickInput { export interface IQuickInputButton { /** iconPath or iconClass required */ - iconPath?: { dark: URI; light?: URI; }; + iconPath?: { dark: URI; light?: URI }; /** iconPath or iconClass required */ iconClass?: string; tooltip?: string; @@ -382,7 +382,7 @@ export type IQuickPickItemWithResource = IQuickPickItem & { resource?: URI }; export class QuickPickItemScorerAccessor implements IItemAccessor { - constructor(private options?: { skipDescription?: boolean, skipPath?: boolean }) { } + constructor(private options?: { skipDescription?: boolean; skipPath?: boolean }) { } getItemLabel(entry: IQuickPickItemWithResource): string { return entry.label; diff --git a/src/vs/base/parts/storage/node/storage.ts b/src/vs/base/parts/storage/node/storage.ts index 44132926c9b0c..e8bfec83a2456 100644 --- a/src/vs/base/parts/storage/node/storage.ts +++ b/src/vs/base/parts/storage/node/storage.ts @@ -360,7 +360,7 @@ export class SQLiteStorageDatabase implements IStorageDatabase { }); } - private all(connection: IDatabaseConnection, sql: string): Promise<{ key: string, value: string }[]> { + private all(connection: IDatabaseConnection, sql: string): Promise<{ key: string; value: string }[]> { return new Promise((resolve, reject) => { connection.db.all(sql, (error, rows) => { if (error) { diff --git a/src/vs/base/test/browser/markdownRenderer.test.ts b/src/vs/base/test/browser/markdownRenderer.test.ts index a1aaa76f99d07..38e2326753ff9 100644 --- a/src/vs/base/test/browser/markdownRenderer.test.ts +++ b/src/vs/base/test/browser/markdownRenderer.test.ts @@ -205,7 +205,7 @@ suite('MarkdownRenderer', () => { const uri = URI.parse(anchor.dataset['href']!); - const data = <{ script: string, documentUri: URI }>parse(decodeURIComponent(uri.query)); + const data = <{ script: string; documentUri: URI }>parse(decodeURIComponent(uri.query)); assert.ok(data); assert.strictEqual(data.script, 'echo'); assert.ok(data.documentUri.toString().startsWith('file:///c%3A/')); diff --git a/src/vs/base/test/browser/ui/grid/util.ts b/src/vs/base/test/browser/ui/grid/util.ts index 4be8157a6d6a5..3a47b51eedade 100644 --- a/src/vs/base/test/browser/ui/grid/util.ts +++ b/src/vs/base/test/browser/ui/grid/util.ts @@ -10,7 +10,7 @@ import { Emitter, Event } from 'vs/base/common/event'; export class TestView implements IView { - private readonly _onDidChange = new Emitter<{ width: number; height: number; } | undefined>(); + private readonly _onDidChange = new Emitter<{ width: number; height: number } | undefined>(); readonly onDidChange = this._onDidChange.event; get minimumWidth(): number { return this._minimumWidth; } @@ -39,8 +39,8 @@ export class TestView implements IView { get size(): [number, number] { return [this.width, this.height]; } - private readonly _onDidLayout = new Emitter<{ width: number; height: number; }>(); - readonly onDidLayout: Event<{ width: number; height: number; }> = this._onDidLayout.event; + private readonly _onDidLayout = new Emitter<{ width: number; height: number }>(); + readonly onDidLayout: Event<{ width: number; height: number }> = this._onDidLayout.event; private readonly _onDidFocus = new Emitter(); readonly onDidFocus: Event = this._onDidFocus.event; diff --git a/src/vs/base/test/browser/ui/tree/dataTree.test.ts b/src/vs/base/test/browser/ui/tree/dataTree.test.ts index 1210bf7021aac..bc6ed5f31067e 100644 --- a/src/vs/base/test/browser/ui/tree/dataTree.test.ts +++ b/src/vs/base/test/browser/ui/tree/dataTree.test.ts @@ -58,7 +58,7 @@ suite('DataTree', function () { }; const identityProvider = new class implements IIdentityProvider { - getId(element: E): { toString(): string; } { + getId(element: E): { toString(): string } { return `${element.value}`; } }; diff --git a/src/vs/base/test/browser/ui/tree/objectTree.test.ts b/src/vs/base/test/browser/ui/tree/objectTree.test.ts index e6aabe98bb9ec..f758b089e46d9 100644 --- a/src/vs/base/test/browser/ui/tree/objectTree.test.ts +++ b/src/vs/base/test/browser/ui/tree/objectTree.test.ts @@ -202,7 +202,7 @@ suite('ObjectTree', function () { }; const identityProvider = new class implements IIdentityProvider { - getId(element: number): { toString(): string; } { + getId(element: number): { toString(): string } { return `${element % 100}`; } }; diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index 0353e165cb23b..c69d027fc968a 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -5,7 +5,7 @@ import * as assert from 'assert'; import { anyScore, createMatches, fuzzyScore, fuzzyScoreGraceful, fuzzyScoreGracefulAggressive, FuzzyScorer, IFilter, IMatch, matchesCamelCase, matchesContiguousSubString, matchesPrefix, matchesStrictPrefix, matchesSubString, matchesWords, or } from 'vs/base/common/filters'; -function filterOk(filter: IFilter, word: string, wordToMatchAgainst: string, highlights?: { start: number; end: number; }[]) { +function filterOk(filter: IFilter, word: string, wordToMatchAgainst: string, highlights?: { start: number; end: number }[]) { let r = filter(word, wordToMatchAgainst); assert(r, `${word} didn't match ${wordToMatchAgainst}`); if (highlights) { @@ -222,7 +222,7 @@ suite('Filters', () => { filterOk(matchesWords, 'foo:bar', 'foo:bar'); }); - function assertMatches(pattern: string, word: string, decoratedWord: string | undefined, filter: FuzzyScorer, opts: { patternPos?: number, wordPos?: number, firstMatchCanBeWeak?: boolean } = {}) { + function assertMatches(pattern: string, word: string, decoratedWord: string | undefined, filter: FuzzyScorer, opts: { patternPos?: number; wordPos?: number; firstMatchCanBeWeak?: boolean } = {}) { let r = filter(pattern, pattern.toLowerCase(), opts.patternPos || 0, word, word.toLowerCase(), opts.wordPos || 0, opts.firstMatchCanBeWeak || false); assert.ok(!decoratedWord === !r); if (r) { diff --git a/src/vs/base/test/common/iconLabels.test.ts b/src/vs/base/test/common/iconLabels.test.ts index 23f3b9c6a444a..add853b0e942f 100644 --- a/src/vs/base/test/common/iconLabels.test.ts +++ b/src/vs/base/test/common/iconLabels.test.ts @@ -12,7 +12,7 @@ export interface IIconFilter { (query: string, target: IParsedLabelWithIcons): IMatch[] | null; } -function filterOk(filter: IIconFilter, word: string, target: IParsedLabelWithIcons, highlights?: { start: number; end: number; }[]) { +function filterOk(filter: IIconFilter, word: string, target: IParsedLabelWithIcons, highlights?: { start: number; end: number }[]) { let r = filter(word, target); assert(r); if (highlights) { diff --git a/src/vs/base/test/common/timeTravelScheduler.ts b/src/vs/base/test/common/timeTravelScheduler.ts index 9c2ae28a425d5..9081b7c5632cc 100644 --- a/src/vs/base/test/common/timeTravelScheduler.ts +++ b/src/vs/base/test/common/timeTravelScheduler.ts @@ -223,7 +223,7 @@ export class AsyncSchedulerProcessor extends Disposable { } -export async function runWithFakedTimers(options: { useFakeTimers?: boolean, useSetImmediate?: boolean, maxTaskCount?: number }, fn: () => Promise): Promise { +export async function runWithFakedTimers(options: { useFakeTimers?: boolean; useSetImmediate?: boolean; maxTaskCount?: number }, fn: () => Promise): Promise { const useFakeTimers = options.useFakeTimers === undefined ? true : options.useFakeTimers; if (!useFakeTimers) { return fn(); diff --git a/src/vs/code/browser/workbench/workbench.ts b/src/vs/code/browser/workbench/workbench.ts index b3882a5c44263..87bd2911500fa 100644 --- a/src/vs/code/browser/workbench/workbench.ts +++ b/src/vs/code/browser/workbench/workbench.ts @@ -31,7 +31,7 @@ class LocalStorageCredentialsProvider implements ICredentialsProvider { private readonly authService: string | undefined; constructor() { - let authSessionInfo: { readonly id: string, readonly accessToken: string, readonly providerId: string, readonly canSignOut?: boolean, readonly scopes: string[][] } | undefined; + let authSessionInfo: { readonly id: string; readonly accessToken: string; readonly providerId: string; readonly canSignOut?: boolean; readonly scopes: string[][] } | undefined; const authSessionElement = document.getElementById('vscode-workbench-auth-session'); const authSessionElementAttribute = authSessionElement ? authSessionElement.getAttribute('data-settings') : undefined; if (authSessionElementAttribute) { @@ -151,7 +151,7 @@ class LocalStorageCredentialsProvider implements ICredentialsProvider { return this.doGetPassword(service); } - async findCredentials(service: string): Promise> { + async findCredentials(service: string): Promise> { return this.credentials .filter(credential => credential.service === service) .map(({ account, password }) => ({ account, password })); @@ -290,7 +290,7 @@ class WorkspaceProvider implements IWorkspaceProvider { private static QUERY_PARAM_PAYLOAD = 'payload'; - static create(config: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents }) { + static create(config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents }) { let foundWorkspace = false; let workspace: IWorkspace; let payload = Object.create(null); @@ -385,7 +385,7 @@ class WorkspaceProvider implements IWorkspaceProvider { ) { } - async open(workspace: IWorkspace, options?: { reuse?: boolean, payload?: object }): Promise { + async open(workspace: IWorkspace, options?: { reuse?: boolean; payload?: object }): Promise { if (options?.reuse && !options.payload && this.isSame(this.workspace, workspace)) { return true; // return early if workspace and environment is not changing and we are reusing window } @@ -409,7 +409,7 @@ class WorkspaceProvider implements IWorkspaceProvider { return false; } - private createTargetUrl(workspace: IWorkspace, options?: { reuse?: boolean, payload?: object }): string | undefined { + private createTargetUrl(workspace: IWorkspace, options?: { reuse?: boolean; payload?: object }): string | undefined { // Empty let targetHref: string | undefined = undefined; @@ -515,7 +515,7 @@ function doCreateUri(path: string, queryValues: Map): URI { if (!configElement || !configElementAttribute) { throw new Error('Missing web configuration element'); } - const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents } = JSON.parse(configElementAttribute); + const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents } = JSON.parse(configElementAttribute); // Create workbench create(document.body, { diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index efa47fecfbeba..7b10985fa98c9 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -521,7 +521,7 @@ export class CodeApplication extends Disposable { return machineId; } - private setupSharedProcess(machineId: string): { sharedProcess: SharedProcess, sharedProcessReady: Promise, sharedProcessClient: Promise } { + private setupSharedProcess(machineId: string): { sharedProcess: SharedProcess; sharedProcessReady: Promise; sharedProcessClient: Promise } { const sharedProcess = this._register(this.mainInstantiationService.createInstance(SharedProcess, machineId, this.userEnv)); const sharedProcessClient = (async () => { @@ -771,7 +771,7 @@ export class CodeApplication extends Disposable { } catch { return undefined; } - }).filter((obj): obj is { uri: URI, url: string } => { + }).filter((obj): obj is { uri: URI; url: string } => { if (!obj) { return false; } @@ -1043,11 +1043,11 @@ export class CodeApplication extends Disposable { // Telemetry type SharedProcessErrorClassification = { - type: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - reason: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - code: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - visible: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - shuttingdown: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; + type: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + reason: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + code: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + visible: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + shuttingdown: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; }; type SharedProcessErrorEvent = { type: WindowError; diff --git a/src/vs/code/electron-sandbox/issue/issueReporterMain.ts b/src/vs/code/electron-sandbox/issue/issueReporterMain.ts index 4fb10a1b5f3cf..158939c27a95c 100644 --- a/src/vs/code/electron-sandbox/issue/issueReporterMain.ts +++ b/src/vs/code/electron-sandbox/issue/issueReporterMain.ts @@ -789,7 +789,7 @@ export class IssueReporter extends Disposable { return isValid; } - private async submitToGitHub(issueTitle: string, issueBody: string, gitHubDetails: { owner: string, repositoryName: string }): Promise { + private async submitToGitHub(issueTitle: string, issueBody: string, gitHubDetails: { owner: string; repositoryName: string }): Promise { const url = `https://api.github.com/repos/${gitHubDetails.owner}/${gitHubDetails.repositoryName}/issues`; const init = { method: 'POST', @@ -897,7 +897,7 @@ export class IssueReporter extends Disposable { : this.configuration.product.reportIssueUrl!; } - private parseGitHubUrl(url: string): undefined | { repositoryName: string, owner: string } { + private parseGitHubUrl(url: string): undefined | { repositoryName: string; owner: string } { // Assumes a GitHub url to a particular repo, https://github.com/repositoryName/owner. // Repository name and owner cannot contain '/' const match = /^https?:\/\/github\.com\/([^\/]*)\/([^\/]*).*/.exec(url); diff --git a/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts b/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts index fad45e924746c..970298356798d 100644 --- a/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts +++ b/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts @@ -201,7 +201,7 @@ class ProcessRenderer implements ITreeRenderer { processCallbacks.push(async _child => { class Profiler { - static async start(name: string, filenamePrefix: string, opts: { port: number, tries?: number, target?: (targets: Target[]) => Target }) { + static async start(name: string, filenamePrefix: string, opts: { port: number; tries?: number; target?: (targets: Target[]) => Target }) { const profiler = await import('v8-inspect-profiler'); let session: ProfilingSession; diff --git a/src/vs/editor/browser/config/fontMeasurements.ts b/src/vs/editor/browser/config/fontMeasurements.ts index 61fc14448a76d..39e1737cd33b9 100644 --- a/src/vs/editor/browser/config/fontMeasurements.ts +++ b/src/vs/editor/browser/config/fontMeasurements.ts @@ -237,8 +237,8 @@ class FontMeasurementsImpl extends Disposable { class FontMeasurementsCache { - private readonly _keys: { [key: string]: BareFontInfo; }; - private readonly _values: { [key: string]: FontInfo; }; + private readonly _keys: { [key: string]: BareFontInfo }; + private readonly _values: { [key: string]: FontInfo }; constructor() { this._keys = Object.create(null); diff --git a/src/vs/editor/browser/controller/mouseTarget.ts b/src/vs/editor/browser/controller/mouseTarget.ts index 273eda4aeaca0..08edad1d7fdd3 100644 --- a/src/vs/editor/browser/controller/mouseTarget.ts +++ b/src/vs/editor/browser/controller/mouseTarget.ts @@ -285,7 +285,7 @@ export class HitTestContext { return null; } - public getFullLineRangeAtCoord(mouseVerticalOffset: number): { range: EditorRange; isAfterLines: boolean; } { + public getFullLineRangeAtCoord(mouseVerticalOffset: number): { range: EditorRange; isAfterLines: boolean } { if (this._context.viewLayout.isAfterLines(mouseVerticalOffset)) { // Below the last line const lineNumber = this._context.viewModel.getLineCount(); @@ -794,7 +794,7 @@ export class MouseTargetFactory { } // Let's define a, b, c and check if the offset is in between them... - interface OffsetColumn { offset: number; column: number; } + interface OffsetColumn { offset: number; column: number } const points: OffsetColumn[] = []; points.push({ offset: visibleRange.left, column: column }); @@ -911,7 +911,7 @@ export class MouseTargetFactory { * Most probably Gecko */ private static _doHitTestWithCaretPositionFromPoint(ctx: HitTestContext, coords: ClientCoordinates): HitTestResult { - const hitResult: { offsetNode: Node; offset: number; } = (document).caretPositionFromPoint(coords.clientX, coords.clientY); + const hitResult: { offsetNode: Node; offset: number } = (document).caretPositionFromPoint(coords.clientX, coords.clientY); if (hitResult.offsetNode.nodeType === hitResult.offsetNode.TEXT_NODE) { // offsetNode is expected to be the token text @@ -1052,7 +1052,7 @@ class CharWidthReader { return CharWidthReader._INSTANCE; } - private readonly _cache: { [cacheKey: string]: number; }; + private readonly _cache: { [cacheKey: string]: number }; private readonly _canvas: HTMLCanvasElement; private constructor() { diff --git a/src/vs/editor/browser/coreCommands.ts b/src/vs/editor/browser/coreCommands.ts index 46df25307be5b..ecc72a1a36631 100644 --- a/src/vs/editor/browser/coreCommands.ts +++ b/src/vs/editor/browser/coreCommands.ts @@ -332,7 +332,7 @@ export namespace CoreNavigationCommands { private readonly _minimalReveal: boolean; private readonly _inSelectionMode: boolean; - constructor(opts: ICommandOptions & { minimalReveal: boolean; inSelectionMode: boolean; }) { + constructor(opts: ICommandOptions & { minimalReveal: boolean; inSelectionMode: boolean }) { super(opts); this._minimalReveal = opts.minimalReveal; this._inSelectionMode = opts.inSelectionMode; @@ -452,7 +452,7 @@ export namespace CoreNavigationCommands { private readonly _isPaged: boolean; - constructor(opts: ICommandOptions & { isPaged: boolean; }) { + constructor(opts: ICommandOptions & { isPaged: boolean }) { super(opts); this._isPaged = opts.isPaged; } @@ -490,7 +490,7 @@ export namespace CoreNavigationCommands { private readonly _isPaged: boolean; - constructor(opts: ICommandOptions & { isPaged: boolean; }) { + constructor(opts: ICommandOptions & { isPaged: boolean }) { super(opts); this._isPaged = opts.isPaged; } @@ -907,7 +907,7 @@ export namespace CoreNavigationCommands { private readonly _inSelectionMode: boolean; - constructor(opts: ICommandOptions & { inSelectionMode: boolean; }) { + constructor(opts: ICommandOptions & { inSelectionMode: boolean }) { super(opts); this._inSelectionMode = opts.inSelectionMode; } @@ -951,7 +951,7 @@ export namespace CoreNavigationCommands { private readonly _inSelectionMode: boolean; - constructor(opts: ICommandOptions & { inSelectionMode: boolean; }) { + constructor(opts: ICommandOptions & { inSelectionMode: boolean }) { super(opts); this._inSelectionMode = opts.inSelectionMode; } @@ -1005,7 +1005,7 @@ export namespace CoreNavigationCommands { private readonly _inSelectionMode: boolean; - constructor(opts: ICommandOptions & { inSelectionMode: boolean; }) { + constructor(opts: ICommandOptions & { inSelectionMode: boolean }) { super(opts); this._inSelectionMode = opts.inSelectionMode; } @@ -1083,7 +1083,7 @@ export namespace CoreNavigationCommands { private readonly _inSelectionMode: boolean; - constructor(opts: ICommandOptions & { inSelectionMode: boolean; }) { + constructor(opts: ICommandOptions & { inSelectionMode: boolean }) { super(opts); this._inSelectionMode = opts.inSelectionMode; } @@ -1138,7 +1138,7 @@ export namespace CoreNavigationCommands { private readonly _inSelectionMode: boolean; - constructor(opts: ICommandOptions & { inSelectionMode: boolean; }) { + constructor(opts: ICommandOptions & { inSelectionMode: boolean }) { super(opts); this._inSelectionMode = opts.inSelectionMode; } @@ -1182,7 +1182,7 @@ export namespace CoreNavigationCommands { private readonly _inSelectionMode: boolean; - constructor(opts: ICommandOptions & { inSelectionMode: boolean; }) { + constructor(opts: ICommandOptions & { inSelectionMode: boolean }) { super(opts); this._inSelectionMode = opts.inSelectionMode; } @@ -1400,7 +1400,7 @@ export namespace CoreNavigationCommands { private readonly _inSelectionMode: boolean; - constructor(opts: ICommandOptions & { inSelectionMode: boolean; }) { + constructor(opts: ICommandOptions & { inSelectionMode: boolean }) { super(opts); this._inSelectionMode = opts.inSelectionMode; } @@ -1458,7 +1458,7 @@ export namespace CoreNavigationCommands { class LineCommand extends CoreEditorCommand { private readonly _inSelectionMode: boolean; - constructor(opts: ICommandOptions & { inSelectionMode: boolean; }) { + constructor(opts: ICommandOptions & { inSelectionMode: boolean }) { super(opts); this._inSelectionMode = opts.inSelectionMode; } @@ -1491,7 +1491,7 @@ export namespace CoreNavigationCommands { class LastCursorLineCommand extends CoreEditorCommand { private readonly _inSelectionMode: boolean; - constructor(opts: ICommandOptions & { inSelectionMode: boolean; }) { + constructor(opts: ICommandOptions & { inSelectionMode: boolean }) { super(opts); this._inSelectionMode = opts.inSelectionMode; } diff --git a/src/vs/editor/browser/editorBrowser.ts b/src/vs/editor/browser/editorBrowser.ts index 89d873d8fd99a..057fe0f25e183 100644 --- a/src/vs/editor/browser/editorBrowser.ts +++ b/src/vs/editor/browser/editorBrowser.ts @@ -728,7 +728,7 @@ export interface ICodeEditor extends editorCommon.IEditor { * Get value of the current model attached to this editor. * @see {@link ITextModel.getValue} */ - getValue(options?: { preserveBOM: boolean; lineEnding: string; }): string; + getValue(options?: { preserveBOM: boolean; lineEnding: string }): string; /** * Set the value of the current model attached to this editor. @@ -973,7 +973,7 @@ export interface ICodeEditor extends editorCommon.IEditor { * Explanation 2: the results of this method will not change if the container of the editor gets repositioned. * Warning: the results of this method are inaccurate for positions that are outside the current editor viewport. */ - getScrolledVisiblePosition(position: IPosition): { top: number; left: number; height: number; } | null; + getScrolledVisiblePosition(position: IPosition): { top: number; left: number; height: number } | null; /** * Apply the same font settings as the editor to `target`. @@ -1040,7 +1040,7 @@ export interface IActiveCodeEditor extends ICodeEditor { * Explanation 2: the results of this method will not change if the container of the editor gets repositioned. * Warning: the results of this method are inaccurate for positions that are outside the current editor viewport. */ - getScrolledVisiblePosition(position: IPosition): { top: number; left: number; height: number; }; + getScrolledVisiblePosition(position: IPosition): { top: number; left: number; height: number }; } /** diff --git a/src/vs/editor/browser/editorExtensions.ts b/src/vs/editor/browser/editorExtensions.ts index 4a44c03616646..50766a815c248 100644 --- a/src/vs/editor/browser/editorExtensions.ts +++ b/src/vs/editor/browser/editorExtensions.ts @@ -56,7 +56,7 @@ export interface ICommandMenuOptions { order: number; when?: ContextKeyExpression; title: string; - icon?: ThemeIcon + icon?: ThemeIcon; } export interface ICommandOptions { id: string; @@ -338,8 +338,8 @@ export abstract class EditorAction extends EditorCommand { protected reportTelemetry(accessor: ServicesAccessor, editor: ICodeEditor) { type EditorActionInvokedClassification = { - name: { classification: 'SystemMetaData', purpose: 'FeatureInsight', }; - id: { classification: 'SystemMetaData', purpose: 'FeatureInsight', }; + name: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + id: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; type EditorActionInvokedEvent = { name: string; @@ -455,7 +455,7 @@ export function registerEditorCommand(editorCommand: T) return editorCommand; } -export function registerEditorAction(ctor: { new(): T; }): T { +export function registerEditorAction(ctor: { new(): T }): T { const action = new ctor(); EditorContributionRegistry.INSTANCE.registerEditorAction(action); return action; @@ -513,7 +513,7 @@ class EditorContributionRegistry { private readonly editorContributions: IEditorContributionDescription[]; private readonly diffEditorContributions: IDiffEditorContributionDescription[]; private readonly editorActions: EditorAction[]; - private readonly editorCommands: { [commandId: string]: EditorCommand; }; + private readonly editorCommands: { [commandId: string]: EditorCommand }; constructor() { this.editorContributions = []; diff --git a/src/vs/editor/browser/services/abstractCodeEditorService.ts b/src/vs/editor/browser/services/abstractCodeEditorService.ts index c5ab51d09e6c2..ccb2b7761b754 100644 --- a/src/vs/editor/browser/services/abstractCodeEditorService.ts +++ b/src/vs/editor/browser/services/abstractCodeEditorService.ts @@ -37,8 +37,8 @@ export abstract class AbstractCodeEditorService extends Disposable implements IC protected readonly _onDecorationTypeRegistered: Emitter = this._register(new Emitter()); public onDecorationTypeRegistered: Event = this._onDecorationTypeRegistered.event; - private readonly _codeEditors: { [editorId: string]: ICodeEditor; }; - private readonly _diffEditors: { [editorId: string]: IDiffEditor; }; + private readonly _codeEditors: { [editorId: string]: ICodeEditor }; + private readonly _diffEditors: { [editorId: string]: IDiffEditor }; protected _globalStyleSheet: GlobalStyleSheet | null; private readonly _decorationOptionProviders = new Map(); private readonly _editorStyleSheets = new Map(); @@ -182,7 +182,7 @@ export abstract class AbstractCodeEditorService extends Disposable implements IC return provider.resolveDecorationCSSRules(); } - private readonly _transientWatchers: { [uri: string]: ModelTransientSettingWatcher; } = {}; + private readonly _transientWatchers: { [uri: string]: ModelTransientSettingWatcher } = {}; private readonly _modelProperties = new Map>(); public setModelProperty(resource: URI, key: string, value: any): void { @@ -252,7 +252,7 @@ export abstract class AbstractCodeEditorService extends Disposable implements IC export class ModelTransientSettingWatcher { public readonly uri: string; - private readonly _values: { [key: string]: any; }; + private readonly _values: { [key: string]: any }; constructor(uri: string, model: ITextModel, owner: AbstractCodeEditorService) { this.uri = uri; @@ -522,7 +522,7 @@ export class DecorationTypeOptionsProvider implements IModelDecorationOptionsPro } -export const _CSS_MAP: { [prop: string]: string; } = { +export const _CSS_MAP: { [prop: string]: string } = { color: 'color:{0} !important;', opacity: 'opacity:{0};', backgroundColor: 'background-color:{0};', diff --git a/src/vs/editor/browser/services/editorWorkerService.ts b/src/vs/editor/browser/services/editorWorkerService.ts index e6eed8af10897..d12ac347098cb 100644 --- a/src/vs/editor/browser/services/editorWorkerService.ts +++ b/src/vs/editor/browser/services/editorWorkerService.ts @@ -159,8 +159,8 @@ class WordBasedCompletionItemProvider implements modes.CompletionItemProvider { async provideCompletionItems(model: ITextModel, position: Position): Promise { type WordBasedSuggestionsConfig = { - wordBasedSuggestions?: boolean, - wordBasedSuggestionsMode?: 'currentDocument' | 'matchingDocuments' | 'allDocuments' + wordBasedSuggestions?: boolean; + wordBasedSuggestionsMode?: 'currentDocument' | 'matchingDocuments' | 'allDocuments'; }; const config = this._configurationService.getValue(model.uri, position, 'editor'); if (!config.wordBasedSuggestions) { @@ -287,8 +287,8 @@ class EditorModelManager extends Disposable { private readonly _proxy: EditorSimpleWorker; private readonly _modelService: IModelService; - private _syncedModels: { [modelUrl: string]: IDisposable; } = Object.create(null); - private _syncedModelsLastUsedTime: { [modelUrl: string]: number; } = Object.create(null); + private _syncedModels: { [modelUrl: string]: IDisposable } = Object.create(null); + private _syncedModelsLastUsedTime: { [modelUrl: string]: number } = Object.create(null); constructor(proxy: EditorSimpleWorker, modelService: IModelService, keepIdleModels: boolean) { super(); @@ -515,7 +515,7 @@ export class EditorWorkerClient extends Disposable implements IEditorWorkerClien }); } - public async textualSuggest(resources: URI[], leadingWord: string | undefined, wordDefRegExp: RegExp): Promise<{ words: string[], duration: number } | null> { + public async textualSuggest(resources: URI[], leadingWord: string | undefined, wordDefRegExp: RegExp): Promise<{ words: string[]; duration: number } | null> { const proxy = await this._withSyncedResources(resources); const wordDef = wordDefRegExp.source; const wordDefFlags = regExpFlags(wordDefRegExp); diff --git a/src/vs/editor/browser/services/openerService.ts b/src/vs/editor/browser/services/openerService.ts index 7c671a583733d..aeb09ce927dc8 100644 --- a/src/vs/editor/browser/services/openerService.ts +++ b/src/vs/editor/browser/services/openerService.ts @@ -62,7 +62,7 @@ class EditorOpener implements IOpener { if (typeof target === 'string') { target = URI.parse(target); } - const selection: { startLineNumber: number; startColumn: number; } | undefined = selectionFragment(target); + const selection: { startLineNumber: number; startColumn: number } | undefined = selectionFragment(target); if (selection) { target = target.with({ fragment: '' }); } diff --git a/src/vs/editor/browser/view.ts b/src/vs/editor/browser/view.ts index e4f0378c7fe44..71fdda8a375a7 100644 --- a/src/vs/editor/browser/view.ts +++ b/src/vs/editor/browser/view.ts @@ -417,7 +417,7 @@ export class View extends ViewEventHandler { this._scrollbar.delegateVerticalScrollbarMouseDown(browserEvent); } - public restoreState(scrollPosition: { scrollLeft: number; scrollTop: number; }): void { + public restoreState(scrollPosition: { scrollLeft: number; scrollTop: number }): void { this._context.viewModel.viewLayout.setScrollPosition({ scrollTop: scrollPosition.scrollTop }, ScrollType.Immediate); this._context.viewModel.tokenizeViewport(); this._renderNow(); diff --git a/src/vs/editor/browser/view/viewLayer.ts b/src/vs/editor/browser/view/viewLayer.ts index 6403370d5c54d..a44fef3d046f6 100644 --- a/src/vs/editor/browser/view/viewLayer.ts +++ b/src/vs/editor/browser/view/viewLayer.ts @@ -52,7 +52,7 @@ export class RenderedLinesCollection { this._rendLineNumberStart = rendLineNumberStart; } - _get(): { rendLineNumberStart: number; lines: T[]; } { + _get(): { rendLineNumberStart: number; lines: T[] } { return { rendLineNumberStart: this._rendLineNumberStart, lines: this._lines @@ -210,7 +210,7 @@ export class RenderedLinesCollection { return deletedLines; } - public onTokensChanged(ranges: { fromLineNumber: number; toLineNumber: number; }[]): boolean { + public onTokensChanged(ranges: { fromLineNumber: number; toLineNumber: number }[]): boolean { if (this.getCount() === 0) { // no lines return false; diff --git a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts index 475429055110a..19481676f5645 100644 --- a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts +++ b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts @@ -32,7 +32,7 @@ class Coordinate { export class ViewContentWidgets extends ViewPart { private readonly _viewDomNode: FastDomNode; - private _widgets: { [key: string]: Widget; }; + private _widgets: { [key: string]: Widget }; public domNode: FastDomNode; public overflowingContentWidgetsDomNode: FastDomNode; @@ -173,8 +173,8 @@ interface IBoxLayoutResult { } interface IRenderData { - coordinate: Coordinate, - position: ContentWidgetPositionPreference + coordinate: Coordinate; + position: ContentWidgetPositionPreference; } class Widget { diff --git a/src/vs/editor/browser/viewParts/lines/viewLines.ts b/src/vs/editor/browser/viewParts/lines/viewLines.ts index afe2fde3e6432..592fae0011c85 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLines.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLines.ts @@ -720,7 +720,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, return newScrollTop; } - private _computeScrollLeftToReveal(horizontalRevealRequest: HorizontalRevealRequest): { scrollLeft: number; maxHorizontalOffset: number; } | null { + private _computeScrollLeftToReveal(horizontalRevealRequest: HorizontalRevealRequest): { scrollLeft: number; maxHorizontalOffset: number } | null { const viewport = this._context.viewLayout.getCurrentViewport(); const viewportStartX = viewport.left; diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 8731de7b0be40..cc758c665045e 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -427,7 +427,7 @@ class RenderData { && this.renderedLayout.endLineNumber === layout.endLineNumber; } - _get(): { imageData: ImageData; rendLineNumberStart: number; lines: MinimapLine[]; } { + _get(): { imageData: ImageData; rendLineNumberStart: number; lines: MinimapLine[] } { const tmp = this._renderedLines._get(); return { imageData: this._imageData, @@ -445,7 +445,7 @@ class RenderData { public onLinesInserted(insertFromLineNumber: number, insertToLineNumber: number): void { this._renderedLines.onLinesInserted(insertFromLineNumber, insertToLineNumber); } - public onTokensChanged(ranges: { fromLineNumber: number; toLineNumber: number; }[]): boolean { + public onTokensChanged(ranges: { fromLineNumber: number; toLineNumber: number }[]): boolean { return this._renderedLines.onTokensChanged(ranges); } } @@ -865,7 +865,7 @@ export class Minimap extends ViewPart implements IMinimapModel { } public override onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean { if (this._samplingState) { - const ranges: { fromLineNumber: number; toLineNumber: number; }[] = []; + const ranges: { fromLineNumber: number; toLineNumber: number }[] = []; for (const range of e.ranges) { const minimapLineRange = this._samplingState.modelLineRangeToMinimapLineRange(range.fromLineNumber, range.toLineNumber); if (minimapLineRange) { @@ -1340,7 +1340,7 @@ class InnerMinimap extends Disposable { this._renderDecorations = true; return true; } - public onTokensChanged(ranges: { fromLineNumber: number; toLineNumber: number; }[]): boolean { + public onTokensChanged(ranges: { fromLineNumber: number; toLineNumber: number }[]): boolean { if (this._lastRenderData) { return this._lastRenderData.onTokensChanged(ranges); } diff --git a/src/vs/editor/browser/viewParts/viewZones/viewZones.ts b/src/vs/editor/browser/viewParts/viewZones/viewZones.ts index d5fff61064eda..71f50e4796a28 100644 --- a/src/vs/editor/browser/viewParts/viewZones/viewZones.ts +++ b/src/vs/editor/browser/viewParts/viewZones/viewZones.ts @@ -34,7 +34,7 @@ const invalidFunc = () => { throw new Error(`Invalid change accessor`); }; export class ViewZones extends ViewPart { - private _zones: { [id: string]: IMyViewZone; }; + private _zones: { [id: string]: IMyViewZone }; private _lineHeight: number; private _contentWidth: number; private _contentLeft: number; @@ -359,7 +359,7 @@ export class ViewZones extends ViewPart { public render(ctx: RestrictedRenderingContext): void { const visibleWhitespaces = ctx.viewportData.whitespaceViewportData; - const visibleZones: { [id: string]: IViewWhitespaceViewportData; } = {}; + const visibleZones: { [id: string]: IViewWhitespaceViewportData } = {}; let hasVisibleZone = false; for (const visibleWhitespace of visibleWhitespaces) { diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index e390705b770fa..46af11554264f 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -227,8 +227,8 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE private readonly _id: number; private readonly _configuration: IEditorConfiguration; - protected _contributions: { [key: string]: editorCommon.IEditorContribution; }; - protected _actions: { [key: string]: editorCommon.IEditorAction; }; + protected _contributions: { [key: string]: editorCommon.IEditorContribution }; + protected _actions: { [key: string]: editorCommon.IEditorAction }; // --- Members logically associated to a model protected _modelData: ModelData | null; @@ -242,8 +242,8 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE private readonly _focusTracker: CodeEditorWidgetFocusTracker; - private _contentWidgets: { [key: string]: IContentWidgetData; }; - private _overlayWidgets: { [key: string]: IOverlayWidgetData; }; + private _contentWidgets: { [key: string]: IContentWidgetData }; + private _overlayWidgets: { [key: string]: IOverlayWidgetData }; /** * map from "parent" decoration type to live decoration ids. @@ -421,7 +421,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE return WordOperations.getWordAtPosition(this._modelData.model, this._configuration.options.get(EditorOption.wordSeparators), position); } - public getValue(options: { preserveBOM: boolean; lineEnding: string; } | null = null): string { + public getValue(options: { preserveBOM: boolean; lineEnding: string } | null = null): string { if (!this._modelData) { return ''; } @@ -1463,7 +1463,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE return this._modelData.view.getTargetAtClientPoint(clientX, clientY); } - public getScrolledVisiblePosition(rawPosition: IPosition): { top: number; left: number; height: number; } | null { + public getScrolledVisiblePosition(rawPosition: IPosition): { top: number; left: number; height: number } | null { if (!this._modelData || !this._modelData.hasRealView) { return null; } @@ -1754,7 +1754,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE return this._codeEditorService.resolveDecorationOptions(typeKey, writable); } - public getTelemetryData(): { [key: string]: any; } | undefined { + public getTelemetryData(): { [key: string]: any } | undefined { return this._telemetryData; } diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index e2594856df433..55e784044adbd 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -83,7 +83,7 @@ interface IEditorsZones { class VisualEditorState { private _zones: string[]; private _inlineDiffMargins: InlineDiffMargin[]; - private _zonesMap: { [zoneId: string]: boolean; }; + private _zonesMap: { [zoneId: string]: boolean }; private _decorations: string[]; constructor( @@ -1180,7 +1180,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE } } - private _computeOverviewViewport(): { height: number; top: number; } | null { + private _computeOverviewViewport(): { height: number; top: number } | null { const layoutInfo = this._modifiedEditor.getLayoutInfo(); if (!layoutInfo) { return null; @@ -1347,7 +1347,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE interface IDataSource { getWidth(): number; getHeight(): number; - getOptions(): { renderOverviewRuler: boolean; }; + getOptions(): { renderOverviewRuler: boolean }; getContainerDomNode(): HTMLElement; relayoutEditors(): void; @@ -1479,7 +1479,7 @@ abstract class ViewZonesComputer { const originalCoordinatesConverter = this._originalEditor._getViewModel()!.coordinatesConverter; const modifiedCoordinatesConverter = this._modifiedEditor._getViewModel()!.coordinatesConverter; - const result: { original: IMyViewZone[]; modified: IMyViewZone[]; } = { + const result: { original: IMyViewZone[]; modified: IMyViewZone[] } = { original: [], modified: [] }; diff --git a/src/vs/editor/common/commands/shiftCommand.ts b/src/vs/editor/common/commands/shiftCommand.ts index b3c4665e3e078..e9c6d2633bb82 100644 --- a/src/vs/editor/common/commands/shiftCommand.ts +++ b/src/vs/editor/common/commands/shiftCommand.ts @@ -22,7 +22,7 @@ export interface IShiftCommandOpts { autoIndent: EditorAutoIndentStrategy; } -const repeatCache: { [str: string]: string[]; } = Object.create(null); +const repeatCache: { [str: string]: string[] } = Object.create(null); export function cachedStringRepeat(str: string, count: number): string { if (count <= 0) { return ''; diff --git a/src/vs/editor/common/config/editorConfigurationSchema.ts b/src/vs/editor/common/config/editorConfigurationSchema.ts index c8ec315dc75cc..288b0842dbe55 100644 --- a/src/vs/editor/common/config/editorConfigurationSchema.ts +++ b/src/vs/editor/common/config/editorConfigurationSchema.ts @@ -174,7 +174,7 @@ const editorConfiguration: IConfigurationNode = { } }; -function isConfigurationPropertySchema(x: IConfigurationPropertySchema | { [path: string]: IConfigurationPropertySchema; }): x is IConfigurationPropertySchema { +function isConfigurationPropertySchema(x: IConfigurationPropertySchema | { [path: string]: IConfigurationPropertySchema }): x is IConfigurationPropertySchema { return (typeof x.type !== 'undefined' || typeof x.anyOf !== 'undefined'); } @@ -195,10 +195,10 @@ for (const editorOption of editorOptionsRegistry) { } } -let cachedEditorConfigurationKeys: { [key: string]: boolean; } | null = null; -function getEditorConfigurationKeys(): { [key: string]: boolean; } { +let cachedEditorConfigurationKeys: { [key: string]: boolean } | null = null; +function getEditorConfigurationKeys(): { [key: string]: boolean } { if (cachedEditorConfigurationKeys === null) { - cachedEditorConfigurationKeys = <{ [key: string]: boolean; }>Object.create(null); + cachedEditorConfigurationKeys = <{ [key: string]: boolean }>Object.create(null); Object.keys(editorConfiguration.properties!).forEach((prop) => { cachedEditorConfigurationKeys![prop] = true; }); diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 3bee654ce10d6..3b9fddc2c0d7d 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -798,7 +798,7 @@ export interface IEditorOption { /** * @internal */ - readonly schema: IConfigurationPropertySchema | { [path: string]: IConfigurationPropertySchema; } | undefined; + readonly schema: IConfigurationPropertySchema | { [path: string]: IConfigurationPropertySchema } | undefined; /** * @internal */ @@ -831,9 +831,9 @@ abstract class BaseEditorOption implements IEditor public readonly id: K; public readonly name: string; public readonly defaultValue: V; - public readonly schema: IConfigurationPropertySchema | { [path: string]: IConfigurationPropertySchema; } | undefined; + public readonly schema: IConfigurationPropertySchema | { [path: string]: IConfigurationPropertySchema } | undefined; - constructor(id: K, name: PossibleKeyName, defaultValue: V, schema?: IConfigurationPropertySchema | { [path: string]: IConfigurationPropertySchema; }) { + constructor(id: K, name: PossibleKeyName, defaultValue: V, schema?: IConfigurationPropertySchema | { [path: string]: IConfigurationPropertySchema }) { this.id = id; this.name = name; this.defaultValue = defaultValue; @@ -2107,7 +2107,7 @@ export class EditorLayoutInfoComputer extends ComputedEditorOption(computeFn: (input: string) => R): (input: string) => R { - const cache: { [key: string]: R; } = {}; // TODO@Alex unbounded cache + const cache: { [key: string]: R } = {}; // TODO@Alex unbounded cache return (input: string): R => { if (!cache.hasOwnProperty(input)) { cache[input] = computeFn(input); diff --git a/src/vs/editor/common/cursor/cursor.ts b/src/vs/editor/common/cursor/cursor.ts index 79e934b9e4299..2b1541ea1c11a 100644 --- a/src/vs/editor/common/cursor/cursor.ts +++ b/src/vs/editor/common/cursor/cursor.ts @@ -964,7 +964,7 @@ class CommandExecutor { }; } - private static _getLoserCursorMap(operations: IIdentifiedSingleEditOperation[]): { [index: string]: boolean; } { + private static _getLoserCursorMap(operations: IIdentifiedSingleEditOperation[]): { [index: string]: boolean } { // This is destructive on the array operations = operations.slice(0); @@ -975,7 +975,7 @@ class CommandExecutor { }); // Operations can not overlap! - const loserCursorsMap: { [index: string]: boolean; } = {}; + const loserCursorsMap: { [index: string]: boolean } = {}; for (let i = 1; i < operations.length; i++) { const previousOp = operations[i - 1]; diff --git a/src/vs/editor/common/cursor/cursorTypeOperations.ts b/src/vs/editor/common/cursor/cursorTypeOperations.ts index b3ea50d245fb8..62ab11ebaf9a9 100644 --- a/src/vs/editor/common/cursor/cursorTypeOperations.ts +++ b/src/vs/editor/common/cursor/cursorTypeOperations.ts @@ -584,7 +584,7 @@ export class TypeOperations { // In order to avoid adding checks for `chIsAlreadyTyped` in all places, we will work // with two conceptual positions, the position before `ch` and the position after `ch` // - const positions: { lineNumber: number; beforeColumn: number; afterColumn: number; }[] = selections.map((s) => { + const positions: { lineNumber: number; beforeColumn: number; afterColumn: number }[] = selections.map((s) => { const position = s.getPosition(); if (chIsAlreadyTyped) { return { lineNumber: position.lineNumber, beforeColumn: position.column - ch.length, afterColumn: position.column }; diff --git a/src/vs/editor/common/cursorCommon.ts b/src/vs/editor/common/cursorCommon.ts index 8118fecf42b4e..4ea742f6ac875 100644 --- a/src/vs/editor/common/cursorCommon.ts +++ b/src/vs/editor/common/cursorCommon.ts @@ -80,10 +80,10 @@ export class CursorConfiguration { public readonly autoIndent: EditorAutoIndentStrategy; public readonly autoClosingPairs: AutoClosingPairs; public readonly surroundingPairs: CharacterMap; - public readonly shouldAutoCloseBefore: { quote: (ch: string) => boolean, bracket: (ch: string) => boolean }; + public readonly shouldAutoCloseBefore: { quote: (ch: string) => boolean; bracket: (ch: string) => boolean }; private readonly _languageId: string; - private _electricChars: { [key: string]: boolean; } | null; + private _electricChars: { [key: string]: boolean } | null; public static shouldRecreate(e: ConfigurationChangedEvent): boolean { return ( diff --git a/src/vs/editor/common/languageFeatureRegistry.ts b/src/vs/editor/common/languageFeatureRegistry.ts index 8ab05410218b3..ddef76d0efadc 100644 --- a/src/vs/editor/common/languageFeatureRegistry.ts +++ b/src/vs/editor/common/languageFeatureRegistry.ts @@ -122,7 +122,7 @@ export class LanguageFeatureRegistry { } } - private _lastCandidate: { uri: string; language: string; } | undefined; + private _lastCandidate: { uri: string; language: string } | undefined; private _updateScores(model: ITextModel): void { diff --git a/src/vs/editor/common/languages.ts b/src/vs/editor/common/languages.ts index 4a9d29cc24237..e61187cd54202 100644 --- a/src/vs/editor/common/languages.ts +++ b/src/vs/editor/common/languages.ts @@ -859,7 +859,7 @@ export interface CodeActionList extends IDisposable { */ export interface CodeActionProvider { - displayName?: string + displayName?: string; /** * Provide commands for the given document and range. @@ -876,7 +876,7 @@ export interface CodeActionProvider { */ readonly providedCodeActionKinds?: ReadonlyArray; - readonly documentation?: ReadonlyArray<{ readonly kind: string, readonly command: Command }>; + readonly documentation?: ReadonlyArray<{ readonly kind: string; readonly command: Command }>; /** * @internal @@ -1275,7 +1275,7 @@ export interface DocumentSymbolProvider { provideDocumentSymbols(model: model.ITextModel, token: CancellationToken): ProviderResult; } -export type TextEdit = { range: IRange; text: string; eol?: model.EndOfLineSequence; }; +export type TextEdit = { range: IRange; text: string; eol?: model.EndOfLineSequence }; /** * Interface used to format a model @@ -1541,7 +1541,7 @@ export interface WorkspaceEditMetadata { /** * @internal */ - iconPath?: ThemeIcon | URI | { light: URI, dark: URI }; + iconPath?: ThemeIcon | URI | { light: URI; dark: URI }; } export interface WorkspaceFileEditOptions { @@ -1595,7 +1595,7 @@ export interface AuthenticationSession { account: { label: string; id: string; - } + }; scopes: ReadonlyArray; idToken?: string; } @@ -1824,15 +1824,15 @@ export enum InlayHintKind { export interface InlayHintLabelPart { label: string; - tooltip?: string | IMarkdownString + tooltip?: string | IMarkdownString; // collapsible?: boolean; - command?: Command + command?: Command; location?: Location; } export interface InlayHint { label: string | InlayHintLabelPart[]; - tooltip?: string | IMarkdownString + tooltip?: string | IMarkdownString; position: IPosition; kind: InlayHintKind; paddingLeft?: boolean; @@ -1845,7 +1845,7 @@ export interface InlayHintList { } export interface InlayHintsProvider { - displayName?: string + displayName?: string; onDidChangeInlayHints?: Event; provideInlayHints(model: model.ITextModel, range: Range, token: CancellationToken): ProviderResult; resolveInlayHint?(hint: InlayHint, token: CancellationToken): ProviderResult; diff --git a/src/vs/editor/common/languages/languageConfigurationRegistry.ts b/src/vs/editor/common/languages/languageConfigurationRegistry.ts index f085095871a3c..f8ec59e1c9d08 100644 --- a/src/vs/editor/common/languages/languageConfigurationRegistry.ts +++ b/src/vs/editor/common/languages/languageConfigurationRegistry.ts @@ -263,7 +263,7 @@ export class LanguageConfigurationRegistryImpl { * * This function only return the inherited indent based on above lines, it doesn't check whether current line should decrease or not. */ - public getInheritIndentForLine(autoIndent: EditorAutoIndentStrategy, model: IVirtualModel, lineNumber: number, honorIntentialIndent: boolean = true): { indentation: string; action: IndentAction | null; line?: number; } | null { + public getInheritIndentForLine(autoIndent: EditorAutoIndentStrategy, model: IVirtualModel, lineNumber: number, honorIntentialIndent: boolean = true): { indentation: string; action: IndentAction | null; line?: number } | null { if (autoIndent < EditorAutoIndentStrategy.Full) { return null; } @@ -455,7 +455,7 @@ export class LanguageConfigurationRegistryImpl { return null; } - public getIndentForEnter(autoIndent: EditorAutoIndentStrategy, model: ITextModel, range: Range, indentConverter: IIndentConverter): { beforeEnter: string, afterEnter: string } | null { + public getIndentForEnter(autoIndent: EditorAutoIndentStrategy, model: ITextModel, range: Range, indentConverter: IIndentConverter): { beforeEnter: string; afterEnter: string } | null { if (autoIndent < EditorAutoIndentStrategy.Full) { return null; } diff --git a/src/vs/editor/common/languages/supports/richEditBrackets.ts b/src/vs/editor/common/languages/supports/richEditBrackets.ts index 6de21afb7ecb4..8a426af8e9e79 100644 --- a/src/vs/editor/common/languages/supports/richEditBrackets.ts +++ b/src/vs/editor/common/languages/supports/richEditBrackets.ts @@ -208,11 +208,11 @@ export class RichEditBrackets { /** * A map useful for decoding a regex match and finding which bracket group was matched. */ - public readonly textIsBracket: { [text: string]: RichEditBracket; }; + public readonly textIsBracket: { [text: string]: RichEditBracket }; /** * A set useful for decoding if a regex match is the open bracket of a bracket pair. */ - public readonly textIsOpenBracket: { [text: string]: boolean; }; + public readonly textIsOpenBracket: { [text: string]: boolean }; constructor(languageId: string, _brackets: readonly CharacterPair[]) { const brackets = groupFuzzyBrackets(_brackets); diff --git a/src/vs/editor/common/model.ts b/src/vs/editor/common/model.ts index 47d8d70f56595..1038c5bbd953a 100644 --- a/src/vs/editor/common/model.ts +++ b/src/vs/editor/common/model.ts @@ -1290,7 +1290,7 @@ export interface ITextBufferBuilder { * @internal */ export interface ITextBufferFactory { - create(defaultEOL: DefaultEndOfLine): { textBuffer: ITextBuffer; disposable: IDisposable; }; + create(defaultEOL: DefaultEndOfLine): { textBuffer: ITextBuffer; disposable: IDisposable }; getFirstLineText(lengthLimit: number): string; } diff --git a/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets.ts b/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets.ts index a81c4c47aa657..bfc3e727224d3 100644 --- a/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets.ts +++ b/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets.ts @@ -17,7 +17,7 @@ export class BracketTokens { const brackets = configuration.characterPair.getColorizedBrackets(); - const closingBrackets = new Map, first: OpeningBracketId }>(); + const closingBrackets = new Map; first: OpeningBracketId }>(); const openingBrackets = new Set(); for (const [openingText, closingText] of brackets) { diff --git a/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.ts b/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.ts index 792305400d00b..cfd8e3d31a6b5 100644 --- a/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.ts +++ b/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.ts @@ -223,11 +223,11 @@ class PieceTreeSearchCache { return null; } - public get2(lineNumber: number): { node: TreeNode, nodeStartOffset: number, nodeStartLineNumber: number } | null { + public get2(lineNumber: number): { node: TreeNode; nodeStartOffset: number; nodeStartLineNumber: number } | null { for (let i = this._cache.length - 1; i >= 0; i--) { const nodePos = this._cache[i]; if (nodePos.nodeStartLineNumber && nodePos.nodeStartLineNumber < lineNumber && nodePos.nodeStartLineNumber + nodePos.node.piece.lineFeedCnt >= lineNumber) { - return <{ node: TreeNode, nodeStartOffset: number, nodeStartLineNumber: number }>nodePos; + return <{ node: TreeNode; nodeStartOffset: number; nodeStartLineNumber: number }>nodePos; } } return null; @@ -275,7 +275,7 @@ export class PieceTreeBase { protected _EOLNormalized!: boolean; private _lastChangeBufferPos!: BufferCursor; private _searchCache!: PieceTreeSearchCache; - private _lastVisitedLine!: { lineNumber: number; value: string; }; + private _lastVisitedLine!: { lineNumber: number; value: string }; constructor(chunks: StringBuffer[], eol: '\r\n' | '\n', eolNormalized: boolean) { this.create(chunks, eol, eolNormalized); @@ -1318,7 +1318,7 @@ export class PieceTreeBase { } // #region node operations - private getIndexOf(node: TreeNode, accumulatedValue: number): { index: number, remainder: number } { + private getIndexOf(node: TreeNode, accumulatedValue: number): { index: number; remainder: number } { const piece = node.piece; const pos = this.positionInBuffer(node, accumulatedValue); const lineCnt = pos.line - piece.start.line; diff --git a/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.ts b/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.ts index 96109b4eb143a..1a927ff4c5780 100644 --- a/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.ts +++ b/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.ts @@ -308,7 +308,7 @@ export class PieceTreeTextBuffer extends Disposable implements ITextBuffer { // Delta encode operations const reverseRanges = (computeUndoEdits || recordTrimAutoWhitespace ? PieceTreeTextBuffer._getInverseEditRanges(operations) : []); - const newTrimAutoWhitespaceCandidates: { lineNumber: number, oldContent: string }[] = []; + const newTrimAutoWhitespaceCandidates: { lineNumber: number; oldContent: string }[] = []; if (recordTrimAutoWhitespace) { for (let i = 0; i < operations.length; i++) { const op = operations[i]; diff --git a/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.ts b/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.ts index f6ad9ed70ca66..f0bdedc4507fa 100644 --- a/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.ts +++ b/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.ts @@ -39,7 +39,7 @@ export class PieceTreeTextBufferFactory implements ITextBufferFactory { return '\n'; } - public create(defaultEOL: DefaultEndOfLine): { textBuffer: ITextBuffer; disposable: IDisposable; } { + public create(defaultEOL: DefaultEndOfLine): { textBuffer: ITextBuffer; disposable: IDisposable } { const eol = this._getEOL(defaultEOL); const chunks = this._chunks; diff --git a/src/vs/editor/common/model/textModel.ts b/src/vs/editor/common/model/textModel.ts index 9e944ddc12589..c7e84d94febbe 100644 --- a/src/vs/editor/common/model/textModel.ts +++ b/src/vs/editor/common/model/textModel.ts @@ -106,7 +106,7 @@ export function createTextBufferFactoryFromSnapshot(snapshot: model.ITextSnapsho return builder.finish(); } -export function createTextBuffer(value: string | model.ITextBufferFactory, defaultEOL: model.DefaultEndOfLine): { textBuffer: model.ITextBuffer; disposable: IDisposable; } { +export function createTextBuffer(value: string | model.ITextBufferFactory, defaultEOL: model.DefaultEndOfLine): { textBuffer: model.ITextBuffer; disposable: IDisposable } { const factory = (typeof value === 'string' ? createTextBufferFactory(value) : value); return factory.create(defaultEOL); } @@ -291,7 +291,7 @@ export class TextModel extends Disposable implements model.ITextModel, IDecorati */ private readonly _instanceId: string; private _lastDecorationId: number; - private _decorations: { [decorationId: string]: IntervalNode; }; + private _decorations: { [decorationId: string]: IntervalNode }; private _decorationsTree: DecorationsTrees; private readonly _decorationProvider: DecorationProvider; //#endregion @@ -1938,7 +1938,7 @@ export class TextModel extends Disposable implements model.ITextModel, IDecorati public setTokens(tokens: ContiguousMultilineTokens[], backgroundTokenizationCompleted: boolean = false): void { if (tokens.length !== 0) { - const ranges: { fromLineNumber: number; toLineNumber: number; }[] = []; + const ranges: { fromLineNumber: number; toLineNumber: number }[] = []; for (let i = 0, len = tokens.length; i < len; i++) { const element = tokens[i]; diff --git a/src/vs/editor/common/modelLineProjectionData.ts b/src/vs/editor/common/modelLineProjectionData.ts index a77a05debb094..3c51b88491b61 100644 --- a/src/vs/editor/common/modelLineProjectionData.ts +++ b/src/vs/editor/common/modelLineProjectionData.ts @@ -264,7 +264,7 @@ export class ModelLineProjectionData { }; } - private getInjectedTextAtOffset(offsetInInputWithInjections: number): { injectedTextIndex: number, offsetInInputWithInjections: number, length: number } | undefined { + private getInjectedTextAtOffset(offsetInInputWithInjections: number): { injectedTextIndex: number; offsetInInputWithInjections: number; length: number } | undefined { const injectionOffsets = this.injectionOffsets; const injectionOptions = this.injectionOptions; diff --git a/src/vs/editor/common/services/editorSimpleWorker.ts b/src/vs/editor/common/services/editorSimpleWorker.ts index f02fe56bcef82..7f5f74da589b2 100644 --- a/src/vs/editor/common/services/editorSimpleWorker.ts +++ b/src/vs/editor/common/services/editorSimpleWorker.ts @@ -327,7 +327,7 @@ export class EditorSimpleWorker implements IRequestHandler, IDisposable { _requestHandlerBrand: any; protected readonly _host: IEditorWorkerHost; - private _models: { [uri: string]: MirrorModel; }; + private _models: { [uri: string]: MirrorModel }; private readonly _foreignModuleFactory: IForeignModuleFactory | null; private _foreignModule: any; @@ -533,7 +533,7 @@ export class EditorSimpleWorker implements IRequestHandler, IDisposable { private static readonly _suggestionsLimit = 10000; - public async textualSuggest(modelUrls: string[], leadingWord: string | undefined, wordDef: string, wordDefFlags: string): Promise<{ words: string[], duration: number } | null> { + public async textualSuggest(modelUrls: string[], leadingWord: string | undefined, wordDef: string, wordDefFlags: string): Promise<{ words: string[]; duration: number } | null> { const sw = new StopWatch(true); const wordDefRegExp = new RegExp(wordDef, wordDefFlags); diff --git a/src/vs/editor/common/services/languageFeatureDebounce.ts b/src/vs/editor/common/services/languageFeatureDebounce.ts index dcd928004b351..a3a2b38f62f25 100644 --- a/src/vs/editor/common/services/languageFeatureDebounce.ts +++ b/src/vs/editor/common/services/languageFeatureDebounce.ts @@ -19,7 +19,7 @@ export interface ILanguageFeatureDebounceService { readonly _serviceBrand: undefined; - for(feature: LanguageFeatureRegistry, debugName: string, config?: { min?: number, max?: number, salt?: string }): IFeatureDebounceInformation; + for(feature: LanguageFeatureRegistry, debugName: string, config?: { min?: number; max?: number; salt?: string }): IFeatureDebounceInformation; } export interface IFeatureDebounceInformation { @@ -103,7 +103,7 @@ export class LanguageFeatureDebounceService implements ILanguageFeatureDebounceS } - for(feature: LanguageFeatureRegistry, name: string, config?: { min?: number, max?: number, key?: string }): IFeatureDebounceInformation { + for(feature: LanguageFeatureRegistry, name: string, config?: { min?: number; max?: number; key?: string }): IFeatureDebounceInformation { const min = config?.min ?? 50; const max = config?.max ?? min ** 2; const extra = config?.key ?? undefined; diff --git a/src/vs/editor/common/services/languagesRegistry.ts b/src/vs/editor/common/services/languagesRegistry.ts index 39d0167439a47..038df4188604c 100644 --- a/src/vs/editor/common/services/languagesRegistry.ts +++ b/src/vs/editor/common/services/languagesRegistry.ts @@ -74,10 +74,10 @@ export class LanguagesRegistry extends Disposable { private readonly _warnOnOverwrite: boolean; public readonly languageIdCodec: LanguageIdCodec; private _dynamicLanguages: ILanguageExtensionPoint[]; - private _languages: { [id: string]: IResolvedLanguage; }; - private _mimeTypesMap: { [mimeType: string]: string; }; - private _nameMap: { [name: string]: string; }; - private _lowercaseNameMap: { [name: string]: string; }; + private _languages: { [id: string]: IResolvedLanguage }; + private _mimeTypesMap: { [mimeType: string]: string }; + private _nameMap: { [name: string]: string }; + private _lowercaseNameMap: { [name: string]: string }; constructor(useModesRegistry = true, warnOnOverwrite = false) { super(); diff --git a/src/vs/editor/common/services/model.ts b/src/vs/editor/common/services/model.ts index 32a63a9bbac36..037ac0ca2703c 100644 --- a/src/vs/editor/common/services/model.ts +++ b/src/vs/editor/common/services/model.ts @@ -38,5 +38,5 @@ export interface IModelService { onModelRemoved: Event; - onModelLanguageChanged: Event<{ model: ITextModel; oldLanguageId: string; }>; + onModelLanguageChanged: Event<{ model: ITextModel; oldLanguageId: string }>; } diff --git a/src/vs/editor/common/services/modelService.ts b/src/vs/editor/common/services/modelService.ts index 66a74e3f2beb6..6af5b0c879c1d 100644 --- a/src/vs/editor/common/services/modelService.ts +++ b/src/vs/editor/common/services/modelService.ts @@ -147,15 +147,15 @@ export class ModelService extends Disposable implements IModelService { private readonly _onModelRemoved: Emitter = this._register(new Emitter()); public readonly onModelRemoved: Event = this._onModelRemoved.event; - private readonly _onModelModeChanged = this._register(new Emitter<{ model: ITextModel; oldLanguageId: string; }>()); + private readonly _onModelModeChanged = this._register(new Emitter<{ model: ITextModel; oldLanguageId: string }>()); public readonly onModelLanguageChanged = this._onModelModeChanged.event; - private _modelCreationOptionsByLanguageAndResource: { [languageAndResource: string]: ITextModelCreationOptions; }; + private _modelCreationOptionsByLanguageAndResource: { [languageAndResource: string]: ITextModelCreationOptions }; /** * All the models known in the system. */ - private readonly _models: { [modelId: string]: ModelData; }; + private readonly _models: { [modelId: string]: ModelData }; private readonly _disposedModels: Map; private _disposedModelsHeapSize: number; private readonly _semanticStyling: SemanticStyling; diff --git a/src/vs/editor/common/services/semanticTokensDto.ts b/src/vs/editor/common/services/semanticTokensDto.ts index 82fcef57c739b..652ae69b65a4b 100644 --- a/src/vs/editor/common/services/semanticTokensDto.ts +++ b/src/vs/editor/common/services/semanticTokensDto.ts @@ -15,7 +15,7 @@ export interface IFullSemanticTokensDto { export interface IDeltaSemanticTokensDto { id: number; type: 'delta'; - deltas: { start: number; deleteCount: number; data?: Uint32Array; }[]; + deltas: { start: number; deleteCount: number; data?: Uint32Array }[]; } export type ISemanticTokensDto = IFullSemanticTokensDto | IDeltaSemanticTokensDto; @@ -133,7 +133,7 @@ export function decodeSemanticTokensDto(_buff: VSBuffer): ISemanticTokensDto { }; } const deltaCount = src[offset++]; - const deltas: { start: number; deleteCount: number; data?: Uint32Array; }[] = []; + const deltas: { start: number; deleteCount: number; data?: Uint32Array }[] = []; for (let i = 0; i < deltaCount; i++) { const start = src[offset++]; const deleteCount = src[offset++]; diff --git a/src/vs/editor/common/services/unicodeTextModelHighlighter.ts b/src/vs/editor/common/services/unicodeTextModelHighlighter.ts index 379d2d1e15bb2..d4c28d4dd1803 100644 --- a/src/vs/editor/common/services/unicodeTextModelHighlighter.ts +++ b/src/vs/editor/common/services/unicodeTextModelHighlighter.ts @@ -139,7 +139,7 @@ export type UnicodeHighlighterReason = { } | { kind: UnicodeHighlighterReasonKind.Invisible; } | { - kind: UnicodeHighlighterReasonKind.NonBasicAscii + kind: UnicodeHighlighterReasonKind.NonBasicAscii; }; class CodePointHighlighter { diff --git a/src/vs/editor/common/textModelGuides.ts b/src/vs/editor/common/textModelGuides.ts index 9a4acded66049..5d36491e39197 100644 --- a/src/vs/editor/common/textModelGuides.ts +++ b/src/vs/editor/common/textModelGuides.ts @@ -35,9 +35,9 @@ export enum HorizontalGuidesState { } export interface BracketGuideOptions { - includeInactive: boolean, - horizontalGuides: HorizontalGuidesState, - highlightActive: boolean, + includeInactive: boolean; + horizontalGuides: HorizontalGuidesState; + highlightActive: boolean; } export class IndentGuide { diff --git a/src/vs/editor/common/tokens/lineTokens.ts b/src/vs/editor/common/tokens/lineTokens.ts index 4cf845fe7105f..b950acf47685d 100644 --- a/src/vs/editor/common/tokens/lineTokens.ts +++ b/src/vs/editor/common/tokens/lineTokens.ts @@ -184,7 +184,7 @@ export class LineTokens implements IViewLineTokens { * @pure * @param insertTokens Must be sorted by offset. */ - public withInserted(insertTokens: { offset: number, text: string, tokenMetadata: number }[]): LineTokens { + public withInserted(insertTokens: { offset: number; text: string; tokenMetadata: number }[]): LineTokens { if (insertTokens.length === 0) { return this; } diff --git a/src/vs/editor/common/tokens/sparseTokensStore.ts b/src/vs/editor/common/tokens/sparseTokensStore.ts index 28a7bd045ccde..578bf2eecfab1 100644 --- a/src/vs/editor/common/tokens/sparseTokensStore.ts +++ b/src/vs/editor/common/tokens/sparseTokensStore.ts @@ -51,7 +51,7 @@ export class SparseTokensStore { range = _range.plusRange(_firstRange).plusRange(_lastRange); } - let insertPosition: { index: number; } | null = null; + let insertPosition: { index: number } | null = null; for (let i = 0, len = this._pieces.length; i < len; i++) { const piece = this._pieces[i]; if (piece.endLineNumber < range.startLineNumber) { diff --git a/src/vs/editor/common/viewEvents.ts b/src/vs/editor/common/viewEvents.ts index 13a6696c36397..a4ed90c3992de 100644 --- a/src/vs/editor/common/viewEvents.ts +++ b/src/vs/editor/common/viewEvents.ts @@ -278,7 +278,7 @@ export class ViewTokensChangedEvent { readonly toLineNumber: number; }[]; - constructor(ranges: { fromLineNumber: number; toLineNumber: number; }[]) { + constructor(ranges: { fromLineNumber: number; toLineNumber: number }[]) { this.ranges = ranges; } } diff --git a/src/vs/editor/common/viewLayout/linesLayout.ts b/src/vs/editor/common/viewLayout/linesLayout.ts index f007fc76cc7a7..01e2d26cf5ace 100644 --- a/src/vs/editor/common/viewLayout/linesLayout.ts +++ b/src/vs/editor/common/viewLayout/linesLayout.ts @@ -6,8 +6,8 @@ import { IEditorWhitespace, IPartialViewLinesViewportData, IViewWhitespaceViewportData, IWhitespaceChangeAccessor } from 'vs/editor/common/viewModel'; import * as strings from 'vs/base/common/strings'; -interface IPendingChange { id: string; newAfterLineNumber: number; newHeight: number; } -interface IPendingRemove { id: string; } +interface IPendingChange { id: string; newAfterLineNumber: number; newHeight: number } +interface IPendingRemove { id: string } class PendingChanges { private _hasPending: boolean; diff --git a/src/vs/editor/common/viewLayout/viewLayout.ts b/src/vs/editor/common/viewLayout/viewLayout.ts index 4042aa021b390..f6c1de10eebfa 100644 --- a/src/vs/editor/common/viewLayout/viewLayout.ts +++ b/src/vs/editor/common/viewLayout/viewLayout.ts @@ -342,7 +342,7 @@ export class ViewLayout extends Disposable implements IViewLayout { // ---- view state - public saveState(): { scrollTop: number; scrollTopWithoutViewZones: number; scrollLeft: number; } { + public saveState(): { scrollTop: number; scrollTopWithoutViewZones: number; scrollLeft: number } { const currentScrollPosition = this._scrollable.getFutureScrollPosition(); const scrollTop = currentScrollPosition.scrollTop; const firstLineNumberInViewport = this._linesLayout.getLineNumberAtOrAfterVerticalOffset(scrollTop); diff --git a/src/vs/editor/common/viewModel.ts b/src/vs/editor/common/viewModel.ts index 8aca76cfba175..19fea69d49c58 100644 --- a/src/vs/editor/common/viewModel.ts +++ b/src/vs/editor/common/viewModel.ts @@ -64,7 +64,7 @@ export interface IViewModel extends ICursorSimpleModel { deduceModelPositionRelativeToViewPosition(viewAnchorPosition: Position, deltaOffset: number, lineFeedCnt: number): Position; getPlainTextToCopy(modelRanges: Range[], emptySelectionClipboard: boolean, forceCRLF: boolean): string | string[]; - getRichTextToCopy(modelRanges: Range[], emptySelectionClipboard: boolean): { html: string, mode: string } | null; + getRichTextToCopy(modelRanges: Range[], emptySelectionClipboard: boolean): { html: string; mode: string } | null; createLineBreaksComputer(): ILineBreaksComputer; diff --git a/src/vs/editor/common/viewModel/overviewZoneManager.ts b/src/vs/editor/common/viewModel/overviewZoneManager.ts index 254659785bef6..8cf1b7764dcbb 100644 --- a/src/vs/editor/common/viewModel/overviewZoneManager.ts +++ b/src/vs/editor/common/viewModel/overviewZoneManager.ts @@ -85,7 +85,7 @@ export class OverviewZoneManager { private _pixelRatio: number; private _lastAssignedId: number; - private readonly _color2Id: { [color: string]: number; }; + private readonly _color2Id: { [color: string]: number }; private readonly _id2Color: string[]; constructor(getVerticalOffsetForLine: (lineNumber: number) => number) { diff --git a/src/vs/editor/common/viewModel/viewModelDecorations.ts b/src/vs/editor/common/viewModel/viewModelDecorations.ts index efaa25f58c19f..47d1d23ea99f5 100644 --- a/src/vs/editor/common/viewModel/viewModelDecorations.ts +++ b/src/vs/editor/common/viewModel/viewModelDecorations.ts @@ -32,7 +32,7 @@ export class ViewModelDecorations implements IDisposable { private readonly _linesCollection: IViewModelLines; private readonly _coordinatesConverter: ICoordinatesConverter; - private _decorationsCache: { [decorationId: string]: ViewModelDecoration; }; + private _decorationsCache: { [decorationId: string]: ViewModelDecoration }; private _cachedModelDecorationsResolver: IDecorationsViewportData | null; private _cachedModelDecorationsResolverViewRange: Range | null; diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index 0033bac507d07..48d60971b87d0 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -400,7 +400,7 @@ export class ViewModel extends Disposable implements IViewModel { })); this._register(this.model.onDidChangeTokens((e) => { - const viewRanges: { fromLineNumber: number; toLineNumber: number; }[] = []; + const viewRanges: { fromLineNumber: number; toLineNumber: number }[] = []; for (let j = 0, lenJ = e.ranges.length; j < lenJ; j++) { const modelRange = e.ranges[j]; const viewStartLineNumber = this.coordinatesConverter.convertModelPositionToViewPosition(new Position(modelRange.fromLineNumber, 1)).lineNumber; @@ -580,7 +580,7 @@ export class ViewModel extends Disposable implements IViewModel { }; } - public reduceRestoreState(state: IViewState): { scrollLeft: number; scrollTop: number; } { + public reduceRestoreState(state: IViewState): { scrollLeft: number; scrollTop: number } { if (typeof state.firstPosition === 'undefined') { // This is a view state serialized by an older version return this._reduceRestoreStateCompatibility(state); @@ -595,7 +595,7 @@ export class ViewModel extends Disposable implements IViewModel { }; } - private _reduceRestoreStateCompatibility(state: IViewState): { scrollLeft: number; scrollTop: number; } { + private _reduceRestoreStateCompatibility(state: IViewState): { scrollLeft: number; scrollTop: number } { return { scrollLeft: state.scrollLeft, scrollTop: state.scrollTopWithoutViewZones! @@ -835,7 +835,7 @@ export class ViewModel extends Disposable implements IViewModel { return result.length === 1 ? result[0] : result; } - public getRichTextToCopy(modelRanges: Range[], emptySelectionClipboard: boolean): { html: string, mode: string } | null { + public getRichTextToCopy(modelRanges: Range[], emptySelectionClipboard: boolean): { html: string; mode: string } | null { const languageId = this.model.getLanguageId(); if (languageId === PLAINTEXT_LANGUAGE_ID) { return null; @@ -1069,7 +1069,7 @@ export class ViewModel extends Disposable implements IViewModel { class OverviewRulerDecorations { - private readonly _asMap: { [color: string]: OverviewRulerDecorationsGroup; } = Object.create(null); + private readonly _asMap: { [color: string]: OverviewRulerDecorationsGroup } = Object.create(null); readonly asArray: OverviewRulerDecorationsGroup[] = []; public accept(color: string, zIndex: number, startLineNumber: number, endLineNumber: number, lane: number): void { diff --git a/src/vs/editor/contrib/codeAction/browser/codeAction.ts b/src/vs/editor/contrib/codeAction/browser/codeAction.ts index a95b1580d4ffc..9eaf64af04680 100644 --- a/src/vs/editor/contrib/codeAction/browser/codeAction.ts +++ b/src/vs/editor/contrib/codeAction/browser/codeAction.ts @@ -193,7 +193,7 @@ function getDocumentation( const documentation = provider.documentation.map(entry => ({ kind: new CodeActionKind(entry.kind), command: entry.command })); if (only) { - let currentBest: { readonly kind: CodeActionKind, readonly command: modes.Command; } | undefined; + let currentBest: { readonly kind: CodeActionKind; readonly command: modes.Command } | undefined; for (const entry of documentation) { if (entry.kind.contains(only)) { if (!currentBest) { diff --git a/src/vs/editor/contrib/codeAction/browser/codeActionCommands.ts b/src/vs/editor/contrib/codeAction/browser/codeActionCommands.ts index b6de37f214bc6..4cfe3155a588c 100644 --- a/src/vs/editor/contrib/codeAction/browser/codeActionCommands.ts +++ b/src/vs/editor/contrib/codeAction/browser/codeActionCommands.ts @@ -154,9 +154,9 @@ export async function applyCodeAction( codeActionIsPreferred: boolean; }; type ApplyCodeEventClassification = { - codeActionTitle: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - codeActionKind: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - codeActionIsPreferred: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + codeActionTitle: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + codeActionKind: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + codeActionIsPreferred: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; telemetryService.publicLog2('codeAction.applyCodeAction', { diff --git a/src/vs/editor/contrib/codeAction/browser/codeActionMenu.ts b/src/vs/editor/contrib/codeAction/browser/codeActionMenu.ts index da2bda4098fcb..9978c8a442caa 100644 --- a/src/vs/editor/contrib/codeAction/browser/codeActionMenu.ts +++ b/src/vs/editor/contrib/codeAction/browser/codeActionMenu.ts @@ -141,7 +141,7 @@ export class CodeActionMenu extends Disposable { return result; } - private _toCoords(position: IPosition): { x: number, y: number } { + private _toCoords(position: IPosition): { x: number; y: number } { if (!this._editor.hasModel()) { return { x: 0, y: 0 }; } @@ -169,7 +169,7 @@ export class CodeActionKeybindingResolver { constructor( private readonly _keybindingProvider: { - getKeybindings(): readonly ResolvedKeybindingItem[], + getKeybindings(): readonly ResolvedKeybindingItem[]; }, ) { } diff --git a/src/vs/editor/contrib/codeAction/browser/codeActionUi.ts b/src/vs/editor/contrib/codeAction/browser/codeActionUi.ts index 58497ed01582b..e191d6ba9f52a 100644 --- a/src/vs/editor/contrib/codeAction/browser/codeActionUi.ts +++ b/src/vs/editor/contrib/codeAction/browser/codeActionUi.ts @@ -31,7 +31,7 @@ export class CodeActionUi extends Disposable { quickFixActionId: string, preferredFixActionId: string, private readonly delegate: { - applyCodeAction: (action: CodeActionItem, regtriggerAfterApply: boolean) => Promise + applyCodeAction: (action: CodeActionItem, regtriggerAfterApply: boolean) => Promise; }, @IInstantiationService instantiationService: IInstantiationService, ) { diff --git a/src/vs/editor/contrib/codeAction/browser/types.ts b/src/vs/editor/contrib/codeAction/browser/types.ts index 00c0ca8bf6eac..ae406530c687e 100644 --- a/src/vs/editor/contrib/codeAction/browser/types.ts +++ b/src/vs/editor/contrib/codeAction/browser/types.ts @@ -125,7 +125,7 @@ export interface CodeActionTrigger { } export class CodeActionCommandArgs { - public static fromUser(arg: any, defaults: { kind: CodeActionKind, apply: CodeActionAutoApply }): CodeActionCommandArgs { + public static fromUser(arg: any, defaults: { kind: CodeActionKind; apply: CodeActionAutoApply }): CodeActionCommandArgs { if (!arg || typeof arg !== 'object') { return new CodeActionCommandArgs(defaults.kind, defaults.apply, false); } diff --git a/src/vs/editor/contrib/codelens/browser/codelensController.ts b/src/vs/editor/contrib/codelens/browser/codelensController.ts index 101b17cfb154c..d2d2eca45e7bd 100644 --- a/src/vs/editor/contrib/codelens/browser/codelensController.ts +++ b/src/vs/editor/contrib/codelens/browser/codelensController.ts @@ -486,7 +486,7 @@ registerEditorAction(class ShowLensesInCurrentLine extends EditorAction { return; } - const items: { label: string, command: Command }[] = []; + const items: { label: string; command: Command }[] = []; for (const lens of model.lenses) { if (lens.symbol.command && lens.symbol.range.startLineNumber === lineNumber) { items.push({ diff --git a/src/vs/editor/contrib/colorPicker/browser/color.ts b/src/vs/editor/contrib/colorPicker/browser/color.ts index e36aecd3ef920..a1c10b2f148d5 100644 --- a/src/vs/editor/contrib/colorPicker/browser/color.ts +++ b/src/vs/editor/contrib/colorPicker/browser/color.ts @@ -50,7 +50,7 @@ CommandsRegistry.registerCommand('_executeDocumentColorProvider', function (acce throw illegalArgument(); } - const rawCIs: { range: IRange, color: [number, number, number, number] }[] = []; + const rawCIs: { range: IRange; color: [number, number, number, number] }[] = []; const providers = colorProviderRegistry.ordered(model).reverse(); const promises = providers.map(provider => Promise.resolve(provider.provideDocumentColors(model, CancellationToken.None)).then(result => { if (Array.isArray(result)) { diff --git a/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.ts b/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.ts index 61442a9df18e8..8ab8dadf1e0b1 100644 --- a/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.ts +++ b/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.ts @@ -102,7 +102,7 @@ export class ColorPickerBody extends Disposable { this.model.flushColor(); } - private onDidSaturationValueChange({ s, v }: { s: number, v: number }): void { + private onDidSaturationValueChange({ s, v }: { s: number; v: number }): void { const hsva = this.model.color.hsva; this.model.color = new Color(new HSVA(hsva.h, s, v, hsva.a)); } @@ -135,8 +135,8 @@ class SaturationBox extends Disposable { private height!: number; private monitor: GlobalMouseMoveMonitor | null; - private readonly _onDidChange = new Emitter<{ s: number, v: number }>(); - readonly onDidChange: Event<{ s: number, v: number }> = this._onDidChange.event; + private readonly _onDidChange = new Emitter<{ s: number; v: number }>(); + readonly onDidChange: Event<{ s: number; v: number }> = this._onDidChange.event; private readonly _onColorFlushed = new Emitter(); readonly onColorFlushed: Event = this._onColorFlushed.event; diff --git a/src/vs/editor/contrib/documentSymbols/browser/outlineModel.ts b/src/vs/editor/contrib/documentSymbols/browser/outlineModel.ts index d19c43c0f33eb..2ffbf79fd5d04 100644 --- a/src/vs/editor/contrib/documentSymbols/browser/outlineModel.ts +++ b/src/vs/editor/contrib/documentSymbols/browser/outlineModel.ts @@ -100,7 +100,7 @@ export interface IOutlineMarker { export class OutlineElement extends TreeElement { children = new Map(); - marker: { count: number, topSev: MarkerSeverity } | undefined; + marker: { count: number; topSev: MarkerSeverity } | undefined; constructor( readonly id: string, diff --git a/src/vs/editor/contrib/editorState/browser/keybindingCancellation.ts b/src/vs/editor/contrib/editorState/browser/keybindingCancellation.ts index 2fc418a32a4ea..7682be5a22847 100644 --- a/src/vs/editor/contrib/editorState/browser/keybindingCancellation.ts +++ b/src/vs/editor/contrib/editorState/browser/keybindingCancellation.ts @@ -29,7 +29,7 @@ registerSingleton(IEditorCancellationTokens, class implements IEditorCancellatio declare readonly _serviceBrand: undefined; - private readonly _tokens = new WeakMap, tokens: LinkedList }>(); + private readonly _tokens = new WeakMap; tokens: LinkedList }>(); add(editor: ICodeEditor, cts: CancellationTokenSource): () => void { let data = this._tokens.get(editor); diff --git a/src/vs/editor/contrib/editorState/test/browser/editorState.test.ts b/src/vs/editor/contrib/editorState/test/browser/editorState.test.ts index cb19b0ed40f30..686847de0c005 100644 --- a/src/vs/editor/contrib/editorState/test/browser/editorState.test.ts +++ b/src/vs/editor/contrib/editorState/test/browser/editorState.test.ts @@ -12,10 +12,10 @@ import { Selection } from 'vs/editor/common/core/selection'; import { ITextModel } from 'vs/editor/common/model'; interface IStubEditorState { - model?: { uri?: URI, version?: number }; + model?: { uri?: URI; version?: number }; position?: Position; selection?: Selection; - scroll?: { left?: number, top?: number }; + scroll?: { left?: number; top?: number }; } suite('Editor Core - Editor State', () => { diff --git a/src/vs/editor/contrib/find/browser/findState.ts b/src/vs/editor/contrib/find/browser/findState.ts index 33ba7d943eec6..50c2357f7daa9 100644 --- a/src/vs/editor/contrib/find/browser/findState.ts +++ b/src/vs/editor/contrib/find/browser/findState.ts @@ -35,7 +35,7 @@ export const enum FindOptionOverride { False = 2 } -export interface INewFindReplaceState void; } = { update: () => {} }> { +export interface INewFindReplaceState void } = { update: () => {} }> { searchString?: string; replaceString?: string; isRevealed?: boolean; @@ -64,7 +64,7 @@ function effectiveOptionValue(override: FindOptionOverride, value: boolean): boo return value; } -export class FindReplaceState void; } = { update: () => {} }> extends Disposable { +export class FindReplaceState void } = { update: () => {} }> extends Disposable { private _searchString: string; private _replaceString: string; private _isRevealed: boolean; diff --git a/src/vs/editor/contrib/find/test/browser/findController.test.ts b/src/vs/editor/contrib/find/test/browser/findController.test.ts index db3681ae88f6a..6792db92b8416 100644 --- a/src/vs/editor/contrib/find/test/browser/findController.test.ts +++ b/src/vs/editor/contrib/find/test/browser/findController.test.ts @@ -64,7 +64,7 @@ function executeAction(instantiationService: IInstantiationService, editor: ICod } suite('FindController', async () => { - const queryState: { [key: string]: any; } = {}; + const queryState: { [key: string]: any } = {}; let clipboardState = ''; const serviceCollection = new ServiceCollection(); serviceCollection.set(IStorageService, { @@ -493,7 +493,7 @@ suite('FindController', async () => { }); suite('FindController query options persistence', async () => { - let queryState: { [key: string]: any; } = {}; + let queryState: { [key: string]: any } = {}; queryState['editor.isRegex'] = false; queryState['editor.matchCase'] = false; queryState['editor.wholeWord'] = false; diff --git a/src/vs/editor/contrib/folding/browser/folding.ts b/src/vs/editor/contrib/folding/browser/folding.ts index e11da0e0cc693..e714b54aeb6cb 100644 --- a/src/vs/editor/contrib/folding/browser/folding.ts +++ b/src/vs/editor/contrib/folding/browser/folding.ts @@ -54,7 +54,7 @@ interface FoldingStateMemento { collapsedRegions?: CollapseMemento; lineCount?: number; provider?: string; - foldedImports?: boolean + foldedImports?: boolean; } export class FoldingController extends Disposable implements IEditorContribution { @@ -94,7 +94,7 @@ export class FoldingController extends Disposable implements IEditorContribution private cursorChangedScheduler: RunOnceScheduler | null; private readonly localToDispose = this._register(new DisposableStore()); - private mouseDownInfo: { lineNumber: number, iconClicked: boolean } | null; + private mouseDownInfo: { lineNumber: number; iconClicked: boolean } | null; constructor( editor: ICodeEditor, diff --git a/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.ts b/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.ts index d3f994595499c..db0d755e5df71 100644 --- a/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.ts +++ b/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.ts @@ -58,7 +58,7 @@ export interface SymbolNavigationActionConfig { const _goToActionIds = new Set(); -function registerGoToAction(ctor: { new(): T; }): T { +function registerGoToAction(ctor: { new(): T }): T { const result = new ctor(); registerInstantiatedEditorAction(result); _goToActionIds.add(result.id); diff --git a/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.ts b/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.ts index 5ded91884f086..787120fc1e748 100644 --- a/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.ts +++ b/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.ts @@ -81,7 +81,7 @@ export class StringRepresentationProvider implements IKeyboardNavigationLabelPro constructor(@IKeybindingService private readonly _keybindingService: IKeybindingService) { } - getKeyboardNavigationLabel(element: TreeElement): { toString(): string; } { + getKeyboardNavigationLabel(element: TreeElement): { toString(): string } { if (element instanceof OneReference) { const parts = element.parent.getPreview(element)?.preview(element.range); if (parts) { @@ -99,7 +99,7 @@ export class StringRepresentationProvider implements IKeyboardNavigationLabelPro export class IdentityProvider implements IIdentityProvider { - getId(element: TreeElement): { toString(): string; } { + getId(element: TreeElement): { toString(): string } { return element instanceof OneReference ? element.id : element.uri; } } diff --git a/src/vs/editor/contrib/hover/browser/contentHover.ts b/src/vs/editor/contrib/hover/browser/contentHover.ts index f8aa2a1d124d4..af0789876b9d0 100644 --- a/src/vs/editor/contrib/hover/browser/contentHover.ts +++ b/src/vs/editor/contrib/hover/browser/contentHover.ts @@ -483,7 +483,7 @@ class EditorHoverStatusBar extends Disposable implements IEditorHoverStatusBar { this.actionsElement = dom.append(this.hoverElement, $('div.actions')); } - public addAction(actionOptions: { label: string, iconClass?: string, run: (target: HTMLElement) => void, commandId: string }): IEditorHoverAction { + public addAction(actionOptions: { label: string; iconClass?: string; run: (target: HTMLElement) => void; commandId: string }): IEditorHoverAction { const keybinding = this._keybindingService.lookupKeybinding(actionOptions.commandId); const keybindingLabel = keybinding ? keybinding.getLabel() : null; this._hasContent = true; diff --git a/src/vs/editor/contrib/hover/browser/hoverTypes.ts b/src/vs/editor/contrib/hover/browser/hoverTypes.ts index 4598d59eceaa3..7dfa9e2a91608 100644 --- a/src/vs/editor/contrib/hover/browser/hoverTypes.ts +++ b/src/vs/editor/contrib/hover/browser/hoverTypes.ts @@ -71,7 +71,7 @@ export class HoverForeignElementAnchor { export type HoverAnchor = HoverRangeAnchor | HoverForeignElementAnchor; export interface IEditorHoverStatusBar { - addAction(actionOptions: { label: string, iconClass?: string, run: (target: HTMLElement) => void, commandId: string }): IEditorHoverAction; + addAction(actionOptions: { label: string; iconClass?: string; run: (target: HTMLElement) => void; commandId: string }): IEditorHoverAction; append(element: HTMLElement): HTMLElement; } diff --git a/src/vs/editor/contrib/hover/browser/markerHoverParticipant.ts b/src/vs/editor/contrib/hover/browser/markerHoverParticipant.ts index 1bfde6b194c8d..275acba7e5a09 100644 --- a/src/vs/editor/contrib/hover/browser/markerHoverParticipant.ts +++ b/src/vs/editor/contrib/hover/browser/markerHoverParticipant.ts @@ -57,7 +57,7 @@ export class MarkerHoverParticipant implements IEditorHoverParticipant(); + private readonly _decorationsMetadata = new Map(); private readonly _ruleFactory = new DynamicCssRules(this._editor); private _activeInlayHintPart?: RenderedInlayHintLabelPart; @@ -341,7 +341,7 @@ export class InlayHintsController implements IEditorContribution { private _updateHintsDecorators(ranges: readonly Range[], items: readonly InlayHintItem[]): void { // utils to collect/create injected text decorations - const newDecorationsData: { item: InlayHintItem, decoration: IModelDeltaDecoration, classNameRef: IDisposable; }[] = []; + const newDecorationsData: { item: InlayHintItem; decoration: IModelDeltaDecoration; classNameRef: IDisposable }[] = []; const addInjectedText = (item: InlayHintItem, ref: ClassNameReference, content: string, cursorStops: InjectedTextCursorStops, attachedData?: RenderedInlayHintLabelPart): void => { newDecorationsData.push({ item, diff --git a/src/vs/editor/contrib/inlineCompletions/browser/ghostText.ts b/src/vs/editor/contrib/inlineCompletions/browser/ghostText.ts index 5e1876d1ba794..56370689ed593 100644 --- a/src/vs/editor/contrib/inlineCompletions/browser/ghostText.ts +++ b/src/vs/editor/contrib/inlineCompletions/browser/ghostText.ts @@ -76,7 +76,7 @@ class PositionOffsetTransformer { } } -function applyEdits(text: string, edits: { range: IRange, text: string }[]): string { +function applyEdits(text: string, edits: { range: IRange; text: string }[]): string { const transformer = new PositionOffsetTransformer(text); const offsetEdits = edits.map(e => { const range = Range.lift(e.range); diff --git a/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionToGhostText.ts b/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionToGhostText.ts index 8eeadc5709865..f8c25639ecb00 100644 --- a/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionToGhostText.ts +++ b/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionToGhostText.ts @@ -138,7 +138,7 @@ export function inlineCompletionToGhostText( return new GhostText(lineNumber, parts, 0); } -let lastRequest: { originalValue: string; newValue: string; changes: readonly IDiffChange[] | undefined; } | undefined = undefined; +let lastRequest: { originalValue: string; newValue: string; changes: readonly IDiffChange[] | undefined } | undefined = undefined; function cachingDiff(originalValue: string, newValue: string): readonly IDiffChange[] | undefined { if (lastRequest?.originalValue === originalValue && lastRequest?.newValue === newValue) { return lastRequest?.changes; diff --git a/src/vs/editor/contrib/inlineCompletions/test/browser/inlineCompletionsProvider.test.ts b/src/vs/editor/contrib/inlineCompletions/test/browser/inlineCompletionsProvider.test.ts index 0c27b6a637dad..02cb7a564fa05 100644 --- a/src/vs/editor/contrib/inlineCompletions/test/browser/inlineCompletionsProvider.test.ts +++ b/src/vs/editor/contrib/inlineCompletions/test/browser/inlineCompletionsProvider.test.ts @@ -540,8 +540,8 @@ suite('Inline Completions', () => { async function withAsyncTestCodeEditorAndInlineCompletionsModel( text: string, - options: TestCodeEditorInstantiationOptions & { provider?: InlineCompletionsProvider, fakeClock?: boolean }, - callback: (args: { editor: ITestCodeEditor, editorViewModel: ViewModel, model: InlineCompletionsModel, context: GhostTextContext }) => Promise + options: TestCodeEditorInstantiationOptions & { provider?: InlineCompletionsProvider; fakeClock?: boolean }, + callback: (args: { editor: ITestCodeEditor; editorViewModel: ViewModel; model: InlineCompletionsModel; context: GhostTextContext }) => Promise ): Promise { return await runWithFakedTimers({ useFakeTimers: options.fakeClock, diff --git a/src/vs/editor/contrib/inlineCompletions/test/browser/suggestWidgetModel.test.ts b/src/vs/editor/contrib/inlineCompletions/test/browser/suggestWidgetModel.test.ts index 107dd45f74c17..7e03f58e981a1 100644 --- a/src/vs/editor/contrib/inlineCompletions/test/browser/suggestWidgetModel.test.ts +++ b/src/vs/editor/contrib/inlineCompletions/test/browser/suggestWidgetModel.test.ts @@ -140,8 +140,8 @@ const provider: CompletionItemProvider = { async function withAsyncTestCodeEditorAndInlineCompletionsModel( text: string, - options: TestCodeEditorInstantiationOptions & { provider?: CompletionItemProvider, fakeClock?: boolean, serviceCollection?: never }, - callback: (args: { editor: ITestCodeEditor, editorViewModel: ViewModel, model: SuggestWidgetPreviewModel, context: GhostTextContext }) => Promise + options: TestCodeEditorInstantiationOptions & { provider?: CompletionItemProvider; fakeClock?: boolean; serviceCollection?: never }, + callback: (args: { editor: ITestCodeEditor; editorViewModel: ViewModel; model: SuggestWidgetPreviewModel; context: GhostTextContext }) => Promise ): Promise { await runWithFakedTimers({ useFakeTimers: options.fakeClock }, async () => { const disposableStore = new DisposableStore(); diff --git a/src/vs/editor/contrib/linkedEditing/test/browser/linkedEditing.test..ts b/src/vs/editor/contrib/linkedEditing/test/browser/linkedEditing.test..ts index 9569068b3abb5..953f4a2d06216 100644 --- a/src/vs/editor/contrib/linkedEditing/test/browser/linkedEditing.test..ts +++ b/src/vs/editor/contrib/linkedEditing/test/browser/linkedEditing.test..ts @@ -61,7 +61,7 @@ suite('linked editing', () => { function testCase( name: string, - initialState: { text: string | string[], responseWordPattern?: RegExp }, + initialState: { text: string | string[]; responseWordPattern?: RegExp }, operations: (editor: TestEditor) => Promise, expectedEndText: string | string[] ) { diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index b3ac34f4a2d9d..329b3de9cd695 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -134,7 +134,7 @@ export class LinkDetector implements IEditorContribution { private activeLinkDecorationId: string | null; private readonly openerService: IOpenerService; private readonly notificationService: INotificationService; - private currentOccurrences: { [decorationId: string]: LinkOccurrence; }; + private currentOccurrences: { [decorationId: string]: LinkOccurrence }; constructor( editor: ICodeEditor, diff --git a/src/vs/editor/contrib/multicursor/test/browser/multicursor.test.ts b/src/vs/editor/contrib/multicursor/test/browser/multicursor.test.ts index fcdd916a8844c..c05ab3cd861db 100644 --- a/src/vs/editor/contrib/multicursor/test/browser/multicursor.test.ts +++ b/src/vs/editor/contrib/multicursor/test/browser/multicursor.test.ts @@ -82,7 +82,7 @@ function fromRange(rng: Range): number[] { } suite('Multicursor selection', () => { - let queryState: { [key: string]: any; } = {}; + let queryState: { [key: string]: any } = {}; let serviceCollection = new ServiceCollection(); serviceCollection.set(IStorageService, { _serviceBrand: undefined, diff --git a/src/vs/editor/contrib/peekView/browser/peekView.ts b/src/vs/editor/contrib/peekView/browser/peekView.ts index 177272b2a87e3..07a5b527d8c26 100644 --- a/src/vs/editor/contrib/peekView/browser/peekView.ts +++ b/src/vs/editor/contrib/peekView/browser/peekView.ts @@ -36,7 +36,7 @@ export interface IPeekViewService { registerSingleton(IPeekViewService, class implements IPeekViewService { declare readonly _serviceBrand: undefined; - private readonly _widgets = new Map(); + private readonly _widgets = new Map(); addExclusiveWidget(editor: ICodeEditor, widget: PeekViewWidget): void { const existing = this._widgets.get(editor); diff --git a/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.ts b/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.ts index 0328d3cd8e274..f07e73969b3ff 100644 --- a/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.ts +++ b/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.ts @@ -140,7 +140,7 @@ export abstract class AbstractEditorNavigationQuickAccessProvider implements IQu */ protected abstract provideWithoutTextEditor(picker: IQuickPick, token: CancellationToken): IDisposable; - protected gotoLocation({ editor }: IQuickAccessTextEditorContext, options: { range: IRange, keyMods: IKeyMods, forceSideBySide?: boolean, preserveFocus?: boolean }): void { + protected gotoLocation({ editor }: IQuickAccessTextEditorContext, options: { range: IRange; keyMods: IKeyMods; forceSideBySide?: boolean; preserveFocus?: boolean }): void { editor.setSelection(options.range); editor.revealRangeInCenter(options.range, ScrollType.Smooth); if (!options.preserveFocus) { diff --git a/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.ts b/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.ts index bd6b39df02c67..1801ab785386a 100644 --- a/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.ts +++ b/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.ts @@ -21,14 +21,14 @@ import { IQuickPick, IQuickPickItem, IQuickPickSeparator } from 'vs/platform/qui import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures'; export interface IGotoSymbolQuickPickItem extends IQuickPickItem { - kind: SymbolKind, - index: number, + kind: SymbolKind; + index: number; score?: number; - range?: { decoration: IRange, selection: IRange } + range?: { decoration: IRange; selection: IRange }; } export interface IGotoSymbolQuickAccessProviderOptions extends IEditorNavigationQuickAccessOptions { - openSideBySideDirection?: () => undefined | 'right' | 'down' + openSideBySideDirection?: () => undefined | 'right' | 'down'; } export abstract class AbstractGotoSymbolQuickAccessProvider extends AbstractEditorNavigationQuickAccessProvider { diff --git a/src/vs/editor/contrib/smartSelect/browser/smartSelect.ts b/src/vs/editor/contrib/smartSelect/browser/smartSelect.ts index 849c94087922c..7f6c704fd1a93 100644 --- a/src/vs/editor/contrib/smartSelect/browser/smartSelect.ts +++ b/src/vs/editor/contrib/smartSelect/browser/smartSelect.ts @@ -210,7 +210,7 @@ registerEditorAction(GrowSelectionAction); registerEditorAction(ShrinkSelectionAction); export interface SelectionRangesOptions { - selectLeadingAndTrailingWhitespace: boolean + selectLeadingAndTrailingWhitespace: boolean; } export async function provideSelectionRanges(registry: LanguageFeatureRegistry, model: ITextModel, positions: Position[], options: SelectionRangesOptions, token: CancellationToken): Promise { diff --git a/src/vs/editor/contrib/snippet/browser/snippetParser.ts b/src/vs/editor/contrib/snippet/browser/snippetParser.ts index 6b63318c36c2f..b896cff1f7419 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetParser.ts @@ -498,7 +498,7 @@ function walk(marker: Marker[], visitor: (marker: Marker) => boolean): void { export class TextmateSnippet extends Marker { - private _placeholders?: { all: Placeholder[], last?: Placeholder }; + private _placeholders?: { all: Placeholder[]; last?: Placeholder }; get placeholderInfo() { if (!this._placeholders) { diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 307fbe4c88fb8..73108d88f15c1 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -392,7 +392,7 @@ export class SnippetSession { return selection; } - static createEditsAndSnippets(editor: IActiveCodeEditor, template: string, overwriteBefore: number, overwriteAfter: number, enforceFinalTabstop: boolean, adjustWhitespace: boolean, clipboardText: string | undefined, overtypingCapturer: OvertypingCapturer | undefined): { edits: IIdentifiedSingleEditOperation[], snippets: OneSnippet[] } { + static createEditsAndSnippets(editor: IActiveCodeEditor, template: string, overwriteBefore: number, overwriteAfter: number, enforceFinalTabstop: boolean, adjustWhitespace: boolean, clipboardText: string | undefined, overtypingCapturer: OvertypingCapturer | undefined): { edits: IIdentifiedSingleEditOperation[]; snippets: OneSnippet[] } { const edits: IIdentifiedSingleEditOperation[] = []; const snippets: OneSnippet[] = []; diff --git a/src/vs/editor/contrib/suggest/browser/suggest.ts b/src/vs/editor/contrib/suggest/browser/suggest.ts index 593c1c90f97b3..b7a58ee171b1a 100644 --- a/src/vs/editor/contrib/suggest/browser/suggest.ts +++ b/src/vs/editor/contrib/suggest/browser/suggest.ts @@ -346,7 +346,7 @@ function snippetDownComparator(a: CompletionItem, b: CompletionItem): number { return defaultComparator(a, b); } -interface Comparator { (a: T, b: T): number; } +interface Comparator { (a: T, b: T): number } const _snippetComparators = new Map>(); _snippetComparators.set(SnippetSortOrder.Top, snippetUpComparator); _snippetComparators.set(SnippetSortOrder.Bottom, snippetDownComparator); diff --git a/src/vs/editor/contrib/suggest/browser/suggestController.ts b/src/vs/editor/contrib/suggest/browser/suggestController.ts index 1600c3b25fbf7..9d10443ee4708 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestController.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestController.ts @@ -448,12 +448,12 @@ export class SuggestController implements IEditorContribution { return; } - type AcceptedSuggestion = { providerId: string; fileExtension: string; languageId: string; basenameHash: string; }; + type AcceptedSuggestion = { providerId: string; fileExtension: string; languageId: string; basenameHash: string }; type AcceptedSuggestionClassification = { - providerId: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight'; }; - basenameHash: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight'; }; - fileExtension: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; }; - languageId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; }; + providerId: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; + basenameHash: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; + fileExtension: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + languageId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; // _debugDisplayName looks like `vscode.css-language-features(/-:)`, where the last bit is the trigger chars // normalize it to just the extension ID and lowercase @@ -466,7 +466,7 @@ export class SuggestController implements IEditorContribution { }); } - getOverwriteInfo(item: CompletionItem, toggleMode: boolean): { overwriteBefore: number, overwriteAfter: number } { + getOverwriteInfo(item: CompletionItem, toggleMode: boolean): { overwriteBefore: number; overwriteAfter: number } { assertType(this.editor.hasModel()); let replace = this.editor.getOption(EditorOption.suggest).insertMode === 'replace'; diff --git a/src/vs/editor/contrib/suggest/browser/suggestModel.ts b/src/vs/editor/contrib/suggest/browser/suggestModel.ts index 9bafb0256b69c..9f9e03991427e 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestModel.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestModel.ts @@ -455,7 +455,7 @@ export class SuggestModel implements IDisposable { }); } - trigger(context: SuggestTriggerContext, retrigger: boolean = false, onlyFrom?: Set, existing?: { items: CompletionItem[], clipboardText: string | undefined }): void { + trigger(context: SuggestTriggerContext, retrigger: boolean = false, onlyFrom?: Set, existing?: { items: CompletionItem[]; clipboardText: string | undefined }): void { if (!this._editor.hasModel()) { return; } @@ -567,8 +567,8 @@ export class SuggestModel implements IDisposable { } setTimeout(() => { - type Durations = { data: string; }; - type DurationsClassification = { data: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' } }; + type Durations = { data: string }; + type DurationsClassification = { data: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' } }; this._telemetryService.publicLog2('suggest.durations.json', { data: JSON.stringify(durations) }); this._logService.debug('suggest.durations.json', durations); }); diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 2a7addb4ccc28..920659b3d3850 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -107,7 +107,7 @@ export class SuggestWidget implements IDisposable { private _focusedItem?: CompletionItem; private _ignoreFocusEvents: boolean = false; private _completionModel?: CompletionModel; - private _cappedHeight?: { wanted: number; capped: number; }; + private _cappedHeight?: { wanted: number; capped: number }; private _forceRenderingAbove: boolean = false; private _explainMode: boolean = false; diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.ts b/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.ts index e0e3da1d86c80..fc4a44920ede4 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.ts @@ -377,7 +377,7 @@ export class SuggestDetailsOverlay implements IOverlayWidget { const defaultMinSize = new dom.Dimension(220, 2 * info.lineHeight); const defaultTop = anchorBox.top; - type Placement = { top: number, left: number, fit: number, maxSizeTop: dom.Dimension, maxSizeBottom: dom.Dimension, minSize: dom.Dimension }; + type Placement = { top: number; left: number; fit: number; maxSizeTop: dom.Dimension; maxSizeBottom: dom.Dimension; minSize: dom.Dimension }; // EAST const eastPlacement: Placement = (function () { diff --git a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts index 671f8e39ad3ee..c65d7f7e539e0 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts +++ b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts @@ -494,7 +494,7 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider { this._resizeSash.state = SashState.Disabled; } - let data: { startY: number; heightInLines: number; } | undefined; + let data: { startY: number; heightInLines: number } | undefined; this._disposables.add(this._resizeSash.onDidStart((e: ISashEvent) => { if (this._viewZone) { data = { diff --git a/src/vs/editor/standalone/browser/standaloneEditor.ts b/src/vs/editor/standalone/browser/standaloneEditor.ts index e3255c793b017..4b99cfe9ba6ca 100644 --- a/src/vs/editor/standalone/browser/standaloneEditor.ts +++ b/src/vs/editor/standalone/browser/standaloneEditor.ts @@ -112,7 +112,7 @@ export function setModelMarkers(model: ITextModel, owner: string, markers: IMark * * @returns list of markers */ -export function getModelMarkers(filter: { owner?: string, resource?: URI, take?: number }): IMarker[] { +export function getModelMarkers(filter: { owner?: string; resource?: URI; take?: number }): IMarker[] { const markerService = StandaloneServices.get(IMarkerService); return markerService.read(filter); } @@ -164,7 +164,7 @@ export function onWillDisposeModel(listener: (model: ITextModel) => void): IDisp * Emitted when a different language is set to a model. * @event */ -export function onDidChangeModelLanguage(listener: (e: { readonly model: ITextModel; readonly oldLanguage: string; }) => void): IDisposable { +export function onDidChangeModelLanguage(listener: (e: { readonly model: ITextModel; readonly oldLanguage: string }) => void): IDisposable { const modelService = StandaloneServices.get(IModelService); return modelService.onModelLanguageChanged((e) => { listener({ diff --git a/src/vs/editor/standalone/browser/standaloneLanguages.ts b/src/vs/editor/standalone/browser/standaloneLanguages.ts index 8ae8d3c05182f..dbf5359e1a572 100644 --- a/src/vs/editor/standalone/browser/standaloneLanguages.ts +++ b/src/vs/editor/standalone/browser/standaloneLanguages.ts @@ -91,7 +91,7 @@ export class EncodedTokenizationSupportAdapter implements languages.ITokenizatio public tokenize(line: string, hasEOL: boolean, state: languages.IState): languages.TokenizationResult { if (typeof this._actual.tokenize === 'function') { - return TokenizationSupportAdapter.adaptTokenize(this._languageId, <{ tokenize(line: string, state: languages.IState): ILineTokens; }>this._actual, line, state); + return TokenizationSupportAdapter.adaptTokenize(this._languageId, <{ tokenize(line: string, state: languages.IState): ILineTokens }>this._actual, line, state); } throw new Error('Not supported!'); } @@ -142,7 +142,7 @@ export class TokenizationSupportAdapter implements languages.ITokenizationSuppor return result; } - public static adaptTokenize(language: string, actual: { tokenize(line: string, state: languages.IState): ILineTokens; }, line: string, state: languages.IState): languages.TokenizationResult { + public static adaptTokenize(language: string, actual: { tokenize(line: string, state: languages.IState): ILineTokens }, line: string, state: languages.IState): languages.TokenizationResult { const actualResult = actual.tokenize(line, state); const tokens = TokenizationSupportAdapter._toClassicTokens(actualResult.tokens, language); diff --git a/src/vs/editor/standalone/browser/standaloneServices.ts b/src/vs/editor/standalone/browser/standaloneServices.ts index 123f610c13397..e303d81ec201d 100644 --- a/src/vs/editor/standalone/browser/standaloneServices.ts +++ b/src/vs/editor/standalone/browser/standaloneServices.ts @@ -810,7 +810,7 @@ class StandaloneUriLabelService implements ILabelService { public readonly onDidChangeFormatters: Event = Event.None; - public getUriLabel(resource: URI, options?: { relative?: boolean, forceNoTildify?: boolean }): string { + public getUriLabel(resource: URI, options?: { relative?: boolean; forceNoTildify?: boolean }): string { if (resource.scheme === 'file') { return resource.fsPath; } @@ -821,7 +821,7 @@ class StandaloneUriLabelService implements ILabelService { return basename(resource); } - public getWorkspaceLabel(workspace: IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier | URI | IWorkspace, options?: { verbose: boolean; }): string { + public getWorkspaceLabel(workspace: IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier | URI | IWorkspace, options?: { verbose: boolean }): string { return ''; } diff --git a/src/vs/editor/standalone/browser/standaloneThemeService.ts b/src/vs/editor/standalone/browser/standaloneThemeService.ts index 32fca3d7bbb20..025cc66a24c4a 100644 --- a/src/vs/editor/standalone/browser/standaloneThemeService.ts +++ b/src/vs/editor/standalone/browser/standaloneThemeService.ts @@ -32,7 +32,7 @@ class StandaloneTheme implements IStandaloneTheme { private readonly themeData: IStandaloneThemeData; private colors: Map | null; - private readonly defaultColors: { [colorId: string]: Color | undefined; }; + private readonly defaultColors: { [colorId: string]: Color | undefined }; private _tokenTheme: TokenTheme | null; constructor(name: string, standaloneThemeData: IStandaloneThemeData) { @@ -354,7 +354,7 @@ export class StandaloneThemeService extends Disposable implements IStandaloneThe private _updateThemeOrColorMap(): void { const cssRules: string[] = []; - const hasRule: { [rule: string]: boolean; } = {}; + const hasRule: { [rule: string]: boolean } = {}; const ruleCollector: ICssStyleCollector = { addRule: (rule: string) => { if (!hasRule[rule]) { diff --git a/src/vs/editor/standalone/common/monarch/monarchCommon.ts b/src/vs/editor/standalone/common/monarch/monarchCommon.ts index bd96a9f08798d..9c7febccbc8ab 100644 --- a/src/vs/editor/standalone/common/monarch/monarchCommon.ts +++ b/src/vs/editor/standalone/common/monarch/monarchCommon.ts @@ -28,7 +28,7 @@ export interface ILexerMin { unicode: boolean; usesEmbedded: boolean; defaultToken: string; - stateNames: { [stateName: string]: any; }; + stateNames: { [stateName: string]: any }; [attr: string]: any; } @@ -39,7 +39,7 @@ export interface ILexer extends ILexerMin { unicode: boolean; tokenPostfix: string; - tokenizer: { [stateName: string]: IRule[]; }; + tokenizer: { [stateName: string]: IRule[] }; brackets: IBracket[]; } diff --git a/src/vs/editor/standalone/common/monarch/monarchLexer.ts b/src/vs/editor/standalone/common/monarch/monarchLexer.ts index b04a2a98d2263..bdbd251cbaaf1 100644 --- a/src/vs/editor/standalone/common/monarch/monarchLexer.ts +++ b/src/vs/editor/standalone/common/monarch/monarchLexer.ts @@ -29,7 +29,7 @@ class MonarchStackElementFactory { } private readonly _maxCacheDepth: number; - private readonly _entries: { [stackElementId: string]: MonarchStackElement; }; + private readonly _entries: { [stackElementId: string]: MonarchStackElement }; constructor(maxCacheDepth: number) { this._maxCacheDepth = maxCacheDepth; @@ -160,7 +160,7 @@ class MonarchLineStateFactory { } private readonly _maxCacheDepth: number; - private readonly _entries: { [stackElementId: string]: MonarchLineState; }; + private readonly _entries: { [stackElementId: string]: MonarchLineState }; constructor(maxCacheDepth: number) { this._maxCacheDepth = maxCacheDepth; @@ -383,7 +383,7 @@ class MonarchModernTokensCollector implements IMonarchTokensCollector { } } -export type ILoadStatus = { loaded: true; } | { loaded: false; promise: Promise; }; +export type ILoadStatus = { loaded: true } | { loaded: false; promise: Promise }; export class MonarchTokenizer implements languages.ITokenizationSupport { @@ -391,7 +391,7 @@ export class MonarchTokenizer implements languages.ITokenizationSupport { private readonly _standaloneThemeService: IStandaloneThemeService; private readonly _languageId: string; private readonly _lexer: monarchCommon.ILexer; - private readonly _embeddedLanguages: { [languageId: string]: boolean; }; + private readonly _embeddedLanguages: { [languageId: string]: boolean }; public embeddedLoaded: Promise; private readonly _tokenizationRegistryListener: IDisposable; @@ -571,7 +571,7 @@ export class MonarchTokenizer implements languages.ITokenizationSupport { interface GroupMatching { matches: string[]; rule: monarchCommon.IRule | null; - groups: { action: monarchCommon.FuzzyAction; matched: string; }[]; + groups: { action: monarchCommon.FuzzyAction; matched: string }[]; } let groupMatching: GroupMatching | null = null; diff --git a/src/vs/editor/standalone/common/standaloneTheme.ts b/src/vs/editor/standalone/common/standaloneTheme.ts index 78988e643f35c..5be2dd3d110df 100644 --- a/src/vs/editor/standalone/common/standaloneTheme.ts +++ b/src/vs/editor/standalone/common/standaloneTheme.ts @@ -11,7 +11,7 @@ import { IColorTheme, IThemeService } from 'vs/platform/theme/common/themeServic export const IStandaloneThemeService = createDecorator('themeService'); export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black'; -export type IColors = { [colorId: string]: string; }; +export type IColors = { [colorId: string]: string }; export interface IStandaloneThemeData { base: BuiltinTheme; diff --git a/src/vs/editor/test/browser/controller/cursor.test.ts b/src/vs/editor/test/browser/controller/cursor.test.ts index 57687a128d041..ecf4cb652fb8e 100644 --- a/src/vs/editor/test/browser/controller/cursor.test.ts +++ b/src/vs/editor/test/browser/controller/cursor.test.ts @@ -4829,7 +4829,7 @@ suite('autoClosingPairs', () => { tokenize: undefined!, tokenizeEncoded: function (line: string, hasEOL: boolean, _state: IState): EncodedTokenizationResult { let state = _state; - const tokens: { length: number; type: StandardTokenType; }[] = []; + const tokens: { length: number; type: StandardTokenType }[] = []; const generateToken = (length: number, type: StandardTokenType, newState?: State) => { if (tokens.length > 0 && tokens[tokens.length - 1].type === type) { // grow last tokens diff --git a/src/vs/editor/test/browser/controller/imeRecordedTypes.ts b/src/vs/editor/test/browser/controller/imeRecordedTypes.ts index 01224552e459b..70499b308f164 100644 --- a/src/vs/editor/test/browser/controller/imeRecordedTypes.ts +++ b/src/vs/editor/test/browser/controller/imeRecordedTypes.ts @@ -50,9 +50,9 @@ export type IRecordedEvent = IRecordedKeyboardEvent | IRecordedCompositionEvent export interface IRecorded { env: { - OS: OperatingSystem, - browser: IBrowser - } + OS: OperatingSystem; + browser: IBrowser; + }; initial: IRecordedTextareaState; events: IRecordedEvent[]; final: IRecordedTextareaState; diff --git a/src/vs/editor/test/common/model/bracketPairColorizer/beforeEditPositionMapper.test.ts b/src/vs/editor/test/common/model/bracketPairColorizer/beforeEditPositionMapper.test.ts index 5401b4fab6b55..27fe72154f801 100644 --- a/src/vs/editor/test/common/model/bracketPairColorizer/beforeEditPositionMapper.test.ts +++ b/src/vs/editor/test/common/model/bracketPairColorizer/beforeEditPositionMapper.test.ts @@ -392,7 +392,7 @@ class PositionOffsetTransformer { } } -function applyLineColumnEdits(text: string, edits: { range: IRange, text: string }[]): string { +function applyLineColumnEdits(text: string, edits: { range: IRange; text: string }[]): string { const transformer = new PositionOffsetTransformer(text); const offsetEdits = edits.map(e => { const range = Range.lift(e.range); diff --git a/src/vs/editor/test/common/model/bracketPairColorizer/getBracketPairsInRange.test.ts b/src/vs/editor/test/common/model/bracketPairColorizer/getBracketPairsInRange.test.ts index dab879b9c8113..70180f74827de 100644 --- a/src/vs/editor/test/common/model/bracketPairColorizer/getBracketPairsInRange.test.ts +++ b/src/vs/editor/test/common/model/bracketPairColorizer/getBracketPairsInRange.test.ts @@ -230,7 +230,7 @@ class AnnotatedDocument { } interface MockLanguageOptions { - configuration?: LanguageConfiguration + configuration?: LanguageConfiguration; } class MockLanguage extends Disposable { diff --git a/src/vs/editor/test/common/model/modelDecorations.test.ts b/src/vs/editor/test/common/model/modelDecorations.test.ts index 9166099649484..20cbad78268e6 100644 --- a/src/vs/editor/test/common/model/modelDecorations.test.ts +++ b/src/vs/editor/test/common/model/modelDecorations.test.ts @@ -51,8 +51,8 @@ function addDecoration(model: TextModel, startLineNumber: number, startColumn: n })!; } -function lineHasDecorations(model: TextModel, lineNumber: number, decorations: { start: number; end: number; className: string; }[]) { - let lineDecorations: Array<{ start: number; end: number; className: string | null | undefined; }> = []; +function lineHasDecorations(model: TextModel, lineNumber: number, decorations: { start: number; end: number; className: string }[]) { + let lineDecorations: Array<{ start: number; end: number; className: string | null | undefined }> = []; let decs = model.getLineDecorations(lineNumber); for (let i = 0, len = decs.length; i < len; i++) { lineDecorations.push({ diff --git a/src/vs/editor/test/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.test.ts b/src/vs/editor/test/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.test.ts index 909bcfc98e7a5..a03329482c96f 100644 --- a/src/vs/editor/test/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.test.ts +++ b/src/vs/editor/test/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.test.ts @@ -179,7 +179,7 @@ function depth(n: TreeNode): number { return (n.color === NodeColor.Black ? 1 : 0) + depth(n.left); } -function assertValidNode(n: TreeNode): { size: number, lf_cnt: number } { +function assertValidNode(n: TreeNode): { size: number; lf_cnt: number } { if (n === SENTINEL) { return { size: 0, lf_cnt: 0 }; } diff --git a/src/vs/editor/test/common/model/textModelWithTokens.test.ts b/src/vs/editor/test/common/model/textModelWithTokens.test.ts index 9b28640e0531b..4fe7322bade2c 100644 --- a/src/vs/editor/test/common/model/textModelWithTokens.test.ts +++ b/src/vs/editor/test/common/model/textModelWithTokens.test.ts @@ -239,7 +239,7 @@ suite('TextModelWithTokens - bracket matching', () => { [new Position(5, 5), new Range(5, 4, 5, 5), new Range(1, 11, 1, 12)], ]; - let isABracket: { [lineNumber: number]: { [col: number]: boolean; }; } = { 1: {}, 2: {}, 3: {}, 4: {}, 5: {} }; + let isABracket: { [lineNumber: number]: { [col: number]: boolean } } = { 1: {}, 2: {}, 3: {}, 4: {}, 5: {} }; for (let i = 0, len = brackets.length; i < len; i++) { let [testPos, b1, b2] = brackets[i]; assertIsBracket(model, testPos, [b1, b2]); diff --git a/src/vs/editor/test/common/model/tokensStore.test.ts b/src/vs/editor/test/common/model/tokensStore.test.ts index a895e530dddd3..ba69c425adf18 100644 --- a/src/vs/editor/test/common/model/tokensStore.test.ts +++ b/src/vs/editor/test/common/model/tokensStore.test.ts @@ -18,7 +18,7 @@ suite('TokensStore', () => { const SEMANTIC_COLOR: ColorId = 5; - function parseTokensState(state: string[]): { text: string; tokens: SparseMultilineTokens; } { + function parseTokensState(state: string[]): { text: string; tokens: SparseMultilineTokens } { let text: string[] = []; let tokens: number[] = []; let baseLine = 1; diff --git a/src/vs/editor/test/common/services/semanticTokensDto.test.ts b/src/vs/editor/test/common/services/semanticTokensDto.test.ts index 9cedebd292e18..a0ffe79f823e4 100644 --- a/src/vs/editor/test/common/services/semanticTokensDto.test.ts +++ b/src/vs/editor/test/common/services/semanticTokensDto.test.ts @@ -29,7 +29,7 @@ suite('SemanticTokensDto', () => { } function assertEqualDelta(actual: IDeltaSemanticTokensDto, expected: IDeltaSemanticTokensDto): void { - const convertOne = (delta: { start: number; deleteCount: number; data?: Uint32Array; }) => { + const convertOne = (delta: { start: number; deleteCount: number; data?: Uint32Array }) => { if (!delta.data) { return delta; } diff --git a/src/vs/editor/test/common/viewModel/monospaceLineBreaksComputer.test.ts b/src/vs/editor/test/common/viewModel/monospaceLineBreaksComputer.test.ts index d9e03ef6012fc..fdd4bfcc55b31 100644 --- a/src/vs/editor/test/common/viewModel/monospaceLineBreaksComputer.test.ts +++ b/src/vs/editor/test/common/viewModel/monospaceLineBreaksComputer.test.ts @@ -8,7 +8,7 @@ import { MonospaceLineBreaksComputerFactory } from 'vs/editor/common/viewModel/m import { FontInfo } from 'vs/editor/common/config/fontInfo'; import { ModelLineProjectionData, ILineBreaksComputerFactory } from 'vs/editor/common/modelLineProjectionData'; -function parseAnnotatedText(annotatedText: string): { text: string; indices: number[]; } { +function parseAnnotatedText(annotatedText: string): { text: string; indices: number[] } { let text = ''; let currentLineIndex = 0; const indices: number[] = []; diff --git a/src/vs/platform/actions/browser/menuEntryActionViewItem.ts b/src/vs/platform/actions/browser/menuEntryActionViewItem.ts index 83b5bc8bfb829..dc848c86d1740 100644 --- a/src/vs/platform/actions/browser/menuEntryActionViewItem.ts +++ b/src/vs/platform/actions/browser/menuEntryActionViewItem.ts @@ -24,7 +24,7 @@ import { INotificationService } from 'vs/platform/notification/common/notificati import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import { ThemeIcon } from 'vs/platform/theme/common/themeService'; -export function createAndFillInContextMenuActions(menu: IMenu, options: IMenuActionOptions | undefined, target: IAction[] | { primary: IAction[]; secondary: IAction[]; }, primaryGroup?: string): IDisposable { +export function createAndFillInContextMenuActions(menu: IMenu, options: IMenuActionOptions | undefined, target: IAction[] | { primary: IAction[]; secondary: IAction[] }, primaryGroup?: string): IDisposable { const groups = menu.getActions(options); const modifierKeyEmitter = ModifierKeyEmitter.getInstance(); const useAlternativeActions = modifierKeyEmitter.keyStatus.altKey || ((isWindows || isLinux) && modifierKeyEmitter.keyStatus.shiftKey); @@ -32,7 +32,7 @@ export function createAndFillInContextMenuActions(menu: IMenu, options: IMenuAct return asDisposable(groups); } -export function createAndFillInActionBarActions(menu: IMenu, options: IMenuActionOptions | undefined, target: IAction[] | { primary: IAction[]; secondary: IAction[]; }, primaryGroup?: string | ((actionGroup: string) => boolean), primaryMaxCount?: number, shouldInlineSubmenu?: (action: SubmenuAction, group: string, groupSize: number) => boolean, useSeparatorsInPrimaryActions?: boolean): IDisposable { +export function createAndFillInActionBarActions(menu: IMenu, options: IMenuActionOptions | undefined, target: IAction[] | { primary: IAction[]; secondary: IAction[] }, primaryGroup?: string | ((actionGroup: string) => boolean), primaryMaxCount?: number, shouldInlineSubmenu?: (action: SubmenuAction, group: string, groupSize: number) => boolean, useSeparatorsInPrimaryActions?: boolean): IDisposable { const groups = menu.getActions(options); const isPrimaryAction = typeof primaryGroup === 'string' ? (actionGroup: string) => actionGroup === primaryGroup : primaryGroup; @@ -53,7 +53,7 @@ function asDisposable(groups: ReadonlyArray<[string, ReadonlyArray]>, target: IAction[] | { primary: IAction[]; secondary: IAction[]; }, + groups: ReadonlyArray<[string, ReadonlyArray]>, target: IAction[] | { primary: IAction[]; secondary: IAction[] }, useAlternativeActions: boolean, isPrimaryAction: (actionGroup: string) => boolean = actionGroup => actionGroup === 'navigation', primaryMaxCount: number = Number.MAX_SAFE_INTEGER, @@ -71,7 +71,7 @@ function fillInActions( secondaryBucket = target.secondary; } - const submenuInfo = new Set<{ group: string, action: SubmenuAction, index: number }>(); + const submenuInfo = new Set<{ group: string; action: SubmenuAction; index: number }>(); for (const [group, actions] of groups) { diff --git a/src/vs/platform/actions/common/actions.ts b/src/vs/platform/actions/common/actions.ts index 4f7a3c56191a5..e8129da372206 100644 --- a/src/vs/platform/actions/common/actions.ts +++ b/src/vs/platform/actions/common/actions.ts @@ -36,7 +36,7 @@ export interface ICommandActionTitle extends ILocalizedString { mnemonicTitle?: string; } -export type Icon = { dark?: URI; light?: URI; } | ThemeIcon; +export type Icon = { dark?: URI; light?: URI } | ThemeIcon; export interface ICommandAction { id: string; @@ -47,7 +47,7 @@ export interface ICommandAction { icon?: Icon; source?: string; precondition?: ContextKeyExpression; - toggled?: ContextKeyExpression | { condition: ContextKeyExpression, icon?: Icon, tooltip?: string, title?: string | ILocalizedString }; + toggled?: ContextKeyExpression | { condition: ContextKeyExpression; icon?: Icon; tooltip?: string; title?: string | ILocalizedString }; } export type ISerializableCommandAction = UriDto; @@ -233,7 +233,7 @@ export interface IMenuRegistry { addCommand(userCommand: ICommandAction): IDisposable; getCommand(id: string): ICommandAction | undefined; getCommands(): ICommandsMap; - appendMenuItems(items: Iterable<{ id: MenuId, item: IMenuItem | ISubmenuItem }>): IDisposable; + appendMenuItems(items: Iterable<{ id: MenuId; item: IMenuItem | ISubmenuItem }>): IDisposable; appendMenuItem(menu: MenuId, item: IMenuItem | ISubmenuItem): IDisposable; getMenuItems(loc: MenuId): Array; } @@ -284,7 +284,7 @@ export const MenuRegistry: IMenuRegistry = new class implements IMenuRegistry { return this.appendMenuItems(Iterable.single({ id, item })); } - appendMenuItems(items: Iterable<{ id: MenuId, item: IMenuItem | ISubmenuItem }>): IDisposable { + appendMenuItems(items: Iterable<{ id: MenuId; item: IMenuItem | ISubmenuItem }>): IDisposable { const changedIds = new Set(); const toRemove = new LinkedList(); @@ -408,7 +408,7 @@ export class MenuItemAction implements IAction { if (item.toggled) { const toggled = ((item.toggled as { condition: ContextKeyExpression }).condition ? item.toggled : { condition: item.toggled }) as { - condition: ContextKeyExpression, icon?: Icon, tooltip?: string | ILocalizedString, title?: string | ILocalizedString + condition: ContextKeyExpression; icon?: Icon; tooltip?: string | ILocalizedString; title?: string | ILocalizedString; }; this.checked = contextKeyService.contextMatchesRules(toggled.condition); if (this.checked && toggled.tooltip) { diff --git a/src/vs/platform/backup/node/backup.ts b/src/vs/platform/backup/node/backup.ts index cf98a57aab288..8587d581763c6 100644 --- a/src/vs/platform/backup/node/backup.ts +++ b/src/vs/platform/backup/node/backup.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -export interface ISerializedWorkspace { id: string; configURIPath: string; remoteAuthority?: string; } +export interface ISerializedWorkspace { id: string; configURIPath: string; remoteAuthority?: string } -export interface ISerializedFolder { folderUri: string; remoteAuthority?: string; } +export interface ISerializedFolder { folderUri: string; remoteAuthority?: string } export interface IBackupWorkspacesFormat { rootURIWorkspaces: ISerializedWorkspace[]; diff --git a/src/vs/platform/backup/test/electron-main/backupMainService.test.ts b/src/vs/platform/backup/test/electron-main/backupMainService.test.ts index d4866e55f7209..e3d7232d70d5e 100644 --- a/src/vs/platform/backup/test/electron-main/backupMainService.test.ts +++ b/src/vs/platform/backup/test/electron-main/backupMainService.test.ts @@ -94,7 +94,7 @@ flakySuite('BackupMainService', () => { const fooFile = URI.file(platform.isWindows ? 'C:\\foo' : '/foo'); const barFile = URI.file(platform.isWindows ? 'C:\\bar' : '/bar'); - let service: BackupMainService & { toBackupPath(arg: URI | string): string, getFolderHash(folder: IFolderBackupInfo): string }; + let service: BackupMainService & { toBackupPath(arg: URI | string): string; getFolderHash(folder: IFolderBackupInfo): string }; let configService: TestConfigurationService; let environmentService: EnvironmentMainService; diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index 35553c11678ce..dcfdbd41441be 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -31,7 +31,7 @@ export function isConfigurationUpdateOverrides(thing: any): thing is IConfigurat && (!thing.resource || thing.resource instanceof URI); } -export type IConfigurationUpdateOverrides = Omit & { overrideIdentifiers?: string[] | null; }; +export type IConfigurationUpdateOverrides = Omit & { overrideIdentifiers?: string[] | null }; export const enum ConfigurationTarget { USER = 1, @@ -82,13 +82,13 @@ export interface IConfigurationValue { readonly memoryValue?: T; readonly value?: T; - readonly default?: { value?: T, override?: T }; - readonly user?: { value?: T, override?: T }; - readonly userLocal?: { value?: T, override?: T }; - readonly userRemote?: { value?: T, override?: T }; - readonly workspace?: { value?: T, override?: T }; - readonly workspaceFolder?: { value?: T, override?: T }; - readonly memory?: { value?: T, override?: T }; + readonly default?: { value?: T; override?: T }; + readonly user?: { value?: T; override?: T }; + readonly userLocal?: { value?: T; override?: T }; + readonly userRemote?: { value?: T; override?: T }; + readonly workspace?: { value?: T; override?: T }; + readonly workspaceFolder?: { value?: T; override?: T }; + readonly memory?: { value?: T; override?: T }; readonly overrideIdentifiers?: string[]; } diff --git a/src/vs/platform/configuration/common/configurationModels.ts b/src/vs/platform/configuration/common/configurationModels.ts index eb599ee7f30c4..2cd2bf8487ed2 100644 --- a/src/vs/platform/configuration/common/configurationModels.ts +++ b/src/vs/platform/configuration/common/configurationModels.ts @@ -372,7 +372,7 @@ export class ConfigurationModelParser { return { contents, keys, overrides, restricted: filtered.restricted }; } - private filter(properties: any, configurationProperties: { [qualifiedKey: string]: IConfigurationPropertySchema | undefined }, filterOverriddenProperties: boolean, options?: ConfigurationParseOptions): { raw: {}, restricted: string[] } { + private filter(properties: any, configurationProperties: { [qualifiedKey: string]: IConfigurationPropertySchema | undefined }, filterOverriddenProperties: boolean, options?: ConfigurationParseOptions): { raw: {}; restricted: string[] } { if (!options?.scopes && !options?.skipRestricted) { return { raw: properties, restricted: [] }; } @@ -852,7 +852,7 @@ export class ConfigurationChangeEvent implements IConfigurationChangeEvent { source!: ConfigurationTarget; sourceConfig: any; - constructor(readonly change: IConfigurationChange, private readonly previous: { workspace?: Workspace, data: IConfigurationData } | undefined, private readonly currentConfiguraiton: Configuration, private readonly currentWorkspace?: Workspace) { + constructor(readonly change: IConfigurationChange, private readonly previous: { workspace?: Workspace; data: IConfigurationData } | undefined, private readonly currentConfiguraiton: Configuration, private readonly currentWorkspace?: Workspace) { const keysSet = new Set(); change.keys.forEach(key => keysSet.add(key)); change.overrides.forEach(([, keys]) => keys.forEach(key => keysSet.add(key))); @@ -939,7 +939,7 @@ function compare(from: ConfigurationModel | undefined, to: ConfigurationModel | return { added, removed, updated, overrides }; } -function compareConfigurationContents(to: { keys: string[], contents: any } | undefined, from: { keys: string[], contents: any } | undefined) { +function compareConfigurationContents(to: { keys: string[]; contents: any } | undefined, from: { keys: string[]; contents: any } | undefined) { const added = to ? from ? to.keys.filter(key => from.keys.indexOf(key) === -1) : [...to.keys] : []; diff --git a/src/vs/platform/configuration/common/configurationRegistry.ts b/src/vs/platform/configuration/common/configurationRegistry.ts index a7c036d8a5c80..1aa57c19107fc 100644 --- a/src/vs/platform/configuration/common/configurationRegistry.ts +++ b/src/vs/platform/configuration/common/configurationRegistry.ts @@ -43,7 +43,7 @@ export interface IConfigurationRegistry { * - registering the configurations to add * - dereigstering the configurations to remove */ - updateConfigurations(configurations: { add: IConfigurationNode[], remove: IConfigurationNode[] }): void; + updateConfigurations(configurations: { add: IConfigurationNode[]; remove: IConfigurationNode[] }): void; /** * Register multiple default configurations to the registry. @@ -76,7 +76,7 @@ export interface IConfigurationRegistry { * Event that fires whenever a configuration has been * registered. */ - readonly onDidUpdateConfiguration: Event<{ properties: string[], defaultsOverrides?: boolean }>; + readonly onDidUpdateConfiguration: Event<{ properties: string[]; defaultsOverrides?: boolean }>; /** * Returns all configuration nodes contributed to this registry. @@ -200,19 +200,19 @@ export interface IConfigurationDefaults { } export type IRegisteredConfigurationPropertySchema = IConfigurationPropertySchema & { - defaultDefaultValue?: any, - source?: IExtensionInfo, + defaultDefaultValue?: any; + source?: IExtensionInfo; defaultValueSource?: IExtensionInfo | string; }; -export type IConfigurationDefaultOverride = { value: any, source?: IExtensionInfo | string }; +export type IConfigurationDefaultOverride = { value: any; source?: IExtensionInfo | string }; -export const allSettings: { properties: IStringDictionary, patternProperties: IStringDictionary } = { properties: {}, patternProperties: {} }; -export const applicationSettings: { properties: IStringDictionary, patternProperties: IStringDictionary } = { properties: {}, patternProperties: {} }; -export const machineSettings: { properties: IStringDictionary, patternProperties: IStringDictionary } = { properties: {}, patternProperties: {} }; -export const machineOverridableSettings: { properties: IStringDictionary, patternProperties: IStringDictionary } = { properties: {}, patternProperties: {} }; -export const windowSettings: { properties: IStringDictionary, patternProperties: IStringDictionary } = { properties: {}, patternProperties: {} }; -export const resourceSettings: { properties: IStringDictionary, patternProperties: IStringDictionary } = { properties: {}, patternProperties: {} }; +export const allSettings: { properties: IStringDictionary; patternProperties: IStringDictionary } = { properties: {}, patternProperties: {} }; +export const applicationSettings: { properties: IStringDictionary; patternProperties: IStringDictionary } = { properties: {}, patternProperties: {} }; +export const machineSettings: { properties: IStringDictionary; patternProperties: IStringDictionary } = { properties: {}, patternProperties: {} }; +export const machineOverridableSettings: { properties: IStringDictionary; patternProperties: IStringDictionary } = { properties: {}, patternProperties: {} }; +export const windowSettings: { properties: IStringDictionary; patternProperties: IStringDictionary } = { properties: {}, patternProperties: {} }; +export const resourceSettings: { properties: IStringDictionary; patternProperties: IStringDictionary } = { properties: {}, patternProperties: {} }; export const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage'; export const configurationDefaultsSchemaId = 'vscode://schemas/settings/configurationDefaults'; @@ -232,7 +232,7 @@ class ConfigurationRegistry implements IConfigurationRegistry { private readonly _onDidSchemaChange = new Emitter(); readonly onDidSchemaChange: Event = this._onDidSchemaChange.event; - private readonly _onDidUpdateConfiguration = new Emitter<{ properties: string[], defaultsOverrides?: boolean }>(); + private readonly _onDidUpdateConfiguration = new Emitter<{ properties: string[]; defaultsOverrides?: boolean }>(); readonly onDidUpdateConfiguration = this._onDidUpdateConfiguration.event; constructor() { @@ -271,7 +271,7 @@ class ConfigurationRegistry implements IConfigurationRegistry { this._onDidUpdateConfiguration.fire({ properties }); } - public updateConfigurations({ add, remove }: { add: IConfigurationNode[], remove: IConfigurationNode[] }): void { + public updateConfigurations({ add, remove }: { add: IConfigurationNode[]; remove: IConfigurationNode[] }): void { const properties = []; properties.push(...this.doDeregisterConfigurations(remove)); properties.push(...this.doRegisterConfigurations(add, false)); diff --git a/src/vs/platform/configuration/test/common/configurationService.test.ts b/src/vs/platform/configuration/test/common/configurationService.test.ts index bd9c6f36de7d4..559803b0588c8 100644 --- a/src/vs/platform/configuration/test/common/configurationService.test.ts +++ b/src/vs/platform/configuration/test/common/configurationService.test.ts @@ -139,7 +139,7 @@ suite('ConfigurationService', () => { configuration: { service: { testSetting: string; - } + }; }; } diff --git a/src/vs/platform/contextkey/browser/contextKeyService.ts b/src/vs/platform/contextkey/browser/contextKeyService.ts index 356fbb45d30a4..e434b633cd3ab 100644 --- a/src/vs/platform/contextkey/browser/contextKeyService.ts +++ b/src/vs/platform/contextkey/browser/contextKeyService.ts @@ -18,7 +18,7 @@ const KEYBINDING_CONTEXT_ATTR = 'data-keybinding-context'; export class Context implements IContext { protected _parent: Context | null; - protected _value: { [key: string]: any; }; + protected _value: { [key: string]: any }; protected _id: number; constructor(id: number, parent: Context | null) { @@ -58,7 +58,7 @@ export class Context implements IContext { this._parent = parent; } - public collectAllValues(): { [key: string]: any; } { + public collectAllValues(): { [key: string]: any } { let result = this._parent ? this._parent.collectAllValues() : Object.create(null); result = { ...result, ...this._value }; delete result['_contextId']; @@ -86,7 +86,7 @@ class NullContext extends Context { return undefined; } - override collectAllValues(): { [key: string]: any; } { + override collectAllValues(): { [key: string]: any } { return Object.create(null); } } @@ -175,7 +175,7 @@ class ConfigAwareContextValuesContainer extends Context { return super.removeValue(key); } - override collectAllValues(): { [key: string]: any; } { + override collectAllValues(): { [key: string]: any } { const result: { [key: string]: any } = Object.create(null); this._values.forEach((value, index) => result[index] = value); return { ...result, ...super.collectAllValues() }; diff --git a/src/vs/platform/contextkey/common/contextkey.ts b/src/vs/platform/contextkey/common/contextkey.ts index 97753cb9b12c8..b44172da4c896 100644 --- a/src/vs/platform/contextkey/common/contextkey.ts +++ b/src/vs/platform/contextkey/common/contextkey.ts @@ -1534,7 +1534,7 @@ export class RawContextKey extends ContextKeyDefinedExpr { private readonly _defaultValue: T | undefined; - constructor(key: string, defaultValue: T | undefined, metaOrHide?: string | true | { type: string, description: string }) { + constructor(key: string, defaultValue: T | undefined, metaOrHide?: string | true | { type: string; description: string }) { super(key, null); this._defaultValue = defaultValue; diff --git a/src/vs/platform/contextview/browser/contextView.ts b/src/vs/platform/contextview/browser/contextView.ts index 0b01f2e40c80a..b99bfdc0aa535 100644 --- a/src/vs/platform/contextview/browser/contextView.ts +++ b/src/vs/platform/contextview/browser/contextView.ts @@ -26,7 +26,7 @@ export interface IContextViewDelegate { canRelayout?: boolean; // Default: true - getAnchor(): HTMLElement | { x: number; y: number; width?: number; height?: number; }; + getAnchor(): HTMLElement | { x: number; y: number; width?: number; height?: number }; render(container: HTMLElement): IDisposable; onDOMEvent?(e: any, activeElement: HTMLElement): void; onHide?(data?: any): void; diff --git a/src/vs/platform/credentials/common/credentials.ts b/src/vs/platform/credentials/common/credentials.ts index dbc3ab12a5fd2..5ec41dc712f64 100644 --- a/src/vs/platform/credentials/common/credentials.ts +++ b/src/vs/platform/credentials/common/credentials.ts @@ -13,12 +13,12 @@ export interface ICredentialsProvider { setPassword(service: string, account: string, password: string): Promise; deletePassword(service: string, account: string): Promise; findPassword(service: string): Promise; - findCredentials(service: string): Promise>; + findCredentials(service: string): Promise>; clear?(): Promise; } export interface ICredentialsChangeEvent { - service: string + service: string; account: string; } @@ -70,8 +70,8 @@ export class InMemoryCredentialsProvider implements ICredentialsProvider { return JSON.stringify(this.secretVault[service]) ?? null; } - async findCredentials(service: string): Promise> { - const credentials: { account: string, password: string }[] = []; + async findCredentials(service: string): Promise> { + const credentials: { account: string; password: string }[] = []; for (const account of Object.keys(this.secretVault[service] || {})) { credentials.push({ account, password: this.secretVault[service]![account] }); } diff --git a/src/vs/platform/credentials/node/credentialsMainService.ts b/src/vs/platform/credentials/node/credentialsMainService.ts index 180b31ef9e3ed..ae8bb8de811ce 100644 --- a/src/vs/platform/credentials/node/credentialsMainService.ts +++ b/src/vs/platform/credentials/node/credentialsMainService.ts @@ -137,7 +137,7 @@ export class CredentialsMainService extends Disposable implements ICredentialsMa return keytar.findPassword(service); } - async findCredentials(service: string): Promise> { + async findCredentials(service: string): Promise> { const keytar = await this.withKeytar(); return keytar.findCredentials(service); diff --git a/src/vs/platform/diagnostics/node/diagnosticsService.ts b/src/vs/platform/diagnostics/node/diagnosticsService.ts index 2307970648bb8..192e09c463ecc 100644 --- a/src/vs/platform/diagnostics/node/diagnosticsService.ts +++ b/src/vs/platform/diagnostics/node/diagnosticsService.ts @@ -66,7 +66,7 @@ export async function collectWorkspaceStats(folder: string, filter: string[]): P const MAX_FILES = 20000; - function collect(root: string, dir: string, filter: string[], token: { count: number, maxReached: boolean }): Promise { + function collect(root: string, dir: string, filter: string[], token: { count: number; maxReached: boolean }): Promise { const relativePath = dir.substring(root.length + 1); return Promises.withAsyncBody(async resolve => { @@ -135,7 +135,7 @@ export async function collectWorkspaceStats(folder: string, filter: string[]): P }); } - const token: { count: number, maxReached: boolean } = { count: 0, maxReached: false }; + const token: { count: number; maxReached: boolean } = { count: 0, maxReached: false }; await collect(folder, folder, filter, token); const launchConfigs = await collectLaunchConfigs(folder); @@ -507,8 +507,8 @@ export class DiagnosticsService implements IDiagnosticsService { try { const stats = await collectWorkspaceStats(folder, ['node_modules', '.git']); type WorkspaceStatsClassification = { - 'workspace.id': { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - rendererSessionId: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + 'workspace.id': { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + rendererSessionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; type WorkspaceStatsEvent = { 'workspace.id': string | undefined; @@ -519,9 +519,9 @@ export class DiagnosticsService implements IDiagnosticsService { rendererSessionId: workspace.rendererSessionId }); type WorkspaceStatsFileClassification = { - rendererSessionId: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - type: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - count: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + rendererSessionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + type: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + count: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; type WorkspaceStatsFileEvent = { rendererSessionId: string; diff --git a/src/vs/platform/dialogs/common/dialogs.ts b/src/vs/platform/dialogs/common/dialogs.ts index 2d4d654eb2630..2ae876cdcc87f 100644 --- a/src/vs/platform/dialogs/common/dialogs.ts +++ b/src/vs/platform/dialogs/common/dialogs.ts @@ -193,8 +193,8 @@ export interface ICustomDialogOptions { } export interface ICustomDialogMarkdown { - markdown: IMarkdownString, - classes?: string[] + markdown: IMarkdownString; + classes?: string[]; } export interface IDialogOptions { @@ -206,7 +206,7 @@ export interface IDialogOptions { export interface IInput { placeholder?: string; - type?: 'text' | 'password' + type?: 'text' | 'password'; value?: string; } diff --git a/src/vs/platform/driver/browser/baseDriver.ts b/src/vs/platform/driver/browser/baseDriver.ts index 184ff5d1935af..9875672768af9 100644 --- a/src/vs/platform/driver/browser/baseDriver.ts +++ b/src/vs/platform/driver/browser/baseDriver.ts @@ -99,7 +99,7 @@ export abstract class BaseWindowDriver implements IWindowDriver { }; } - async getElementXY(selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number; y: number; }> { + async getElementXY(selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number; y: number }> { const offset = typeof xoffset === 'number' && typeof yoffset === 'number' ? { x: xoffset, y: yoffset } : undefined; return this._getElementXY(selector, offset); } @@ -176,7 +176,7 @@ export abstract class BaseWindowDriver implements IWindowDriver { }); } - protected async _getElementXY(selector: string, offset?: { x: number, y: number }): Promise<{ x: number; y: number; }> { + protected async _getElementXY(selector: string, offset?: { x: number; y: number }): Promise<{ x: number; y: number }> { const element = document.querySelector(selector); if (!element) { diff --git a/src/vs/platform/driver/common/driver.ts b/src/vs/platform/driver/common/driver.ts index 717e6c82307c3..ca36bc4409b2c 100644 --- a/src/vs/platform/driver/common/driver.ts +++ b/src/vs/platform/driver/common/driver.ts @@ -12,7 +12,7 @@ export interface IElement { tagName: string; className: string; textContent: string; - attributes: { [name: string]: string; }; + attributes: { [name: string]: string }; children: IElement[]; top: number; left: number; @@ -52,7 +52,7 @@ export interface IDriver { getTitle(windowId: number): Promise; isActiveElement(windowId: number, selector: string): Promise; getElements(windowId: number, selector: string, recursive?: boolean): Promise; - getElementXY(windowId: number, selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number; y: number; }>; + getElementXY(windowId: number, selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number; y: number }>; typeInEditor(windowId: number, selector: string, text: string): Promise; getTerminalBuffer(windowId: number, selector: string): Promise; writeInTerminal(windowId: number, selector: string, text: string): Promise; @@ -67,12 +67,12 @@ export interface IWindowDriver { getTitle(): Promise; isActiveElement(selector: string): Promise; getElements(selector: string, recursive: boolean): Promise; - getElementXY(selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number; y: number; }>; + getElementXY(selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number; y: number }>; typeInEditor(selector: string, text: string): Promise; getTerminalBuffer(selector: string): Promise; writeInTerminal(selector: string, text: string): Promise; getLocaleInfo(): Promise; - getLocalizedStrings(): Promise + getLocalizedStrings(): Promise; } //*END diff --git a/src/vs/platform/driver/common/driverIpc.ts b/src/vs/platform/driver/common/driverIpc.ts index 71cf00fc7dc6a..49593c7588264 100644 --- a/src/vs/platform/driver/common/driverIpc.ts +++ b/src/vs/platform/driver/common/driverIpc.ts @@ -65,7 +65,7 @@ export class WindowDriverChannelClient implements IWindowDriver { return this.channel.call('getElements', [selector, recursive]); } - getElementXY(selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number, y: number }> { + getElementXY(selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number; y: number }> { return this.channel.call('getElementXY', [selector, xoffset, yoffset]); } diff --git a/src/vs/platform/driver/electron-main/driver.ts b/src/vs/platform/driver/electron-main/driver.ts index e2c3e7bac08bf..aa1e5f6ee79fc 100644 --- a/src/vs/platform/driver/electron-main/driver.ts +++ b/src/vs/platform/driver/electron-main/driver.ts @@ -200,7 +200,7 @@ export class Driver implements IDriver, IWindowDriverRegistry { return await windowDriver.getElements(selector, recursive); } - async getElementXY(windowId: number, selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number; y: number; }> { + async getElementXY(windowId: number, selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number; y: number }> { const windowDriver = await this.getWindowDriver(windowId); return await windowDriver.getElementXY(selector, xoffset, yoffset); } diff --git a/src/vs/platform/driver/electron-sandbox/driver.ts b/src/vs/platform/driver/electron-sandbox/driver.ts index b43678f1156d3..13bf142a0e62c 100644 --- a/src/vs/platform/driver/electron-sandbox/driver.ts +++ b/src/vs/platform/driver/electron-sandbox/driver.ts @@ -28,7 +28,7 @@ class WindowDriver extends BaseWindowDriver { return this._click(selector, 2); } - private async _click(selector: string, clickCount: number, offset?: { x: number, y: number }): Promise { + private async _click(selector: string, clickCount: number, offset?: { x: number; y: number }): Promise { const { x, y } = await this._getElementXY(selector, offset); await this.nativeHostService.sendInputEvent({ type: 'mouseDown', x, y, button: 'left', clickCount } as any); diff --git a/src/vs/platform/driver/node/driver.ts b/src/vs/platform/driver/node/driver.ts index 9f05cb20932d4..4e56bc540e4b1 100644 --- a/src/vs/platform/driver/node/driver.ts +++ b/src/vs/platform/driver/node/driver.ts @@ -102,7 +102,7 @@ export class DriverChannelClient implements IDriver { return this.channel.call('getElements', [windowId, selector, recursive]); } - getElementXY(windowId: number, selector: string, xoffset: number | undefined, yoffset: number | undefined): Promise<{ x: number, y: number }> { + getElementXY(windowId: number, selector: string, xoffset: number | undefined, yoffset: number | undefined): Promise<{ x: number; y: number }> { return this.channel.call('getElementXY', [windowId, selector, xoffset, yoffset]); } @@ -145,7 +145,7 @@ export class WindowDriverRegistryChannel implements IServerChannel { } } -export async function connect(handle: string): Promise<{ client: Client, driver: IDriver }> { +export async function connect(handle: string): Promise<{ client: Client; driver: IDriver }> { const client = await connectNet(handle, 'driverClient'); const channel = client.getChannel('driver'); const driver = new DriverChannelClient(channel); diff --git a/src/vs/platform/environment/common/environmentService.ts b/src/vs/platform/environment/common/environmentService.ts index f2a3ea1b718e2..82dc379913076 100644 --- a/src/vs/platform/environment/common/environmentService.ts +++ b/src/vs/platform/environment/common/environmentService.ts @@ -22,7 +22,7 @@ export interface INativeEnvironmentPaths { * * Only one instance of VSCode can use the same `userDataDir`. */ - userDataDir: string + userDataDir: string; /** * The user home directory mainly used for persisting extensions @@ -34,7 +34,7 @@ export interface INativeEnvironmentPaths { /** * OS tmp dir. */ - tmpDir: string, + tmpDir: string; } export abstract class AbstractNativeEnvironmentService implements INativeEnvironmentService { diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index 6f324a9e88ce7..c27ce56b9f5df 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -305,7 +305,7 @@ function wrapText(text: string, columns: number): string[] { return lines; } -export function buildHelpMessage(productName: string, executableName: string, version: string, options: OptionDescriptions, capabilities?: { noPipe?: boolean, noInputFiles: boolean }): string { +export function buildHelpMessage(productName: string, executableName: string, version: string, options: OptionDescriptions, capabilities?: { noPipe?: boolean; noInputFiles: boolean }): string { const columns = (process.stdout).isTTY && (process.stdout).columns || 80; const inputFiles = capabilities?.noInputFiles !== true ? `[${localize('paths', 'paths')}...]` : ''; diff --git a/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.ts b/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.ts index f7d6391c5bf4b..7f175cb3ab600 100644 --- a/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.ts +++ b/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.ts @@ -146,7 +146,7 @@ export abstract class AbstractExtensionManagementService extends Disposable impl options = { ...options, installOnlyNewlyAddedFromExtensionPack: true /* always true for gallery extensions */ }; } - const allInstallExtensionTasks: { task: IInstallExtensionTask, manifest: IExtensionManifest }[] = []; + const allInstallExtensionTasks: { task: IInstallExtensionTask; manifest: IExtensionManifest }[] = []; const installResults: (InstallExtensionResult & { local: ILocalExtension })[] = []; const installExtensionTask = this.createInstallExtensionTask(manifest, extension, options); if (!URI.isUri(extension)) { @@ -195,7 +195,7 @@ export abstract class AbstractExtensionManagementService extends Disposable impl const extensionsToInstallMap = allInstallExtensionTasks.reduce((result, { task, manifest }) => { result.set(task.identifier.id.toLowerCase(), { task, manifest }); return result; - }, new Map()); + }, new Map()); while (extensionsToInstallMap.size) { let extensionsToInstall; @@ -295,7 +295,7 @@ export abstract class AbstractExtensionManagementService extends Disposable impl return results; } - private async getAllDepsAndPackExtensionsToInstall(extensionIdentifier: IExtensionIdentifier, manifest: IExtensionManifest, getOnlyNewlyAddedFromExtensionPack: boolean, installPreRelease: boolean): Promise<{ gallery: IGalleryExtension, manifest: IExtensionManifest }[]> { + private async getAllDepsAndPackExtensionsToInstall(extensionIdentifier: IExtensionIdentifier, manifest: IExtensionManifest, getOnlyNewlyAddedFromExtensionPack: boolean, installPreRelease: boolean): Promise<{ gallery: IGalleryExtension; manifest: IExtensionManifest }[]> { if (!this.galleryService.isEnabled()) { return []; } @@ -303,7 +303,7 @@ export abstract class AbstractExtensionManagementService extends Disposable impl let installed = await this.getInstalled(); const knownIdentifiers = [extensionIdentifier, ...(installed).map(i => i.identifier)]; - const allDependenciesAndPacks: { gallery: IGalleryExtension, manifest: IExtensionManifest }[] = []; + const allDependenciesAndPacks: { gallery: IGalleryExtension; manifest: IExtensionManifest }[] = []; const collectDependenciesAndPackExtensionsToInstall = async (extensionIdentifier: IExtensionIdentifier, manifest: IExtensionManifest): Promise => { const dependecies: string[] = manifest.extensionDependencies || []; const dependenciesAndPackExtensions = [...dependecies]; @@ -353,7 +353,7 @@ export abstract class AbstractExtensionManagementService extends Disposable impl return allDependenciesAndPacks.filter(e => !installed.some(i => areSameExtensions(i.identifier, e.gallery.identifier))); } - private async checkAndGetCompatibleVersion(extension: IGalleryExtension, fetchCompatibleVersion: boolean, installPreRelease: boolean): Promise<{ extension: IGalleryExtension, manifest: IExtensionManifest }> { + private async checkAndGetCompatibleVersion(extension: IGalleryExtension, fetchCompatibleVersion: boolean, installPreRelease: boolean): Promise<{ extension: IGalleryExtension; manifest: IExtensionManifest }> { const report = await this.getExtensionsControlManifest(); if (getMaliciousExtensionsSet(report).has(extension.identifier.id)) { throw new ExtensionManagementError(nls.localize('malicious extension', "Can't install '{0}' extension since it was reported to be problematic.", extension.identifier.id), ExtensionManagementErrorCode.Malicious); diff --git a/src/vs/platform/extensionManagement/common/extensionEnablementService.ts b/src/vs/platform/extensionManagement/common/extensionEnablementService.ts index 58f97c18c0996..9011756540b70 100644 --- a/src/vs/platform/extensionManagement/common/extensionEnablementService.ts +++ b/src/vs/platform/extensionManagement/common/extensionEnablementService.ts @@ -14,8 +14,8 @@ export class GlobalExtensionEnablementService extends Disposable implements IGlo declare readonly _serviceBrand: undefined; - private _onDidChangeEnablement = new Emitter<{ readonly extensions: IExtensionIdentifier[], readonly source?: string }>(); - readonly onDidChangeEnablement: Event<{ readonly extensions: IExtensionIdentifier[], readonly source?: string }> = this._onDidChangeEnablement.event; + private _onDidChangeEnablement = new Emitter<{ readonly extensions: IExtensionIdentifier[]; readonly source?: string }>(); + readonly onDidChangeEnablement: Event<{ readonly extensions: IExtensionIdentifier[]; readonly source?: string }> = this._onDidChangeEnablement.event; private readonly storageManger: StorageManager; constructor( diff --git a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts index 0edc274d65aa2..182be5b33ba0d 100644 --- a/src/vs/platform/extensionManagement/common/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/common/extensionGalleryService.ts @@ -234,17 +234,17 @@ const DefaultQueryState: IQueryState = { }; type GalleryServiceQueryClassification = { - readonly filterTypes: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - readonly flags: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - readonly sortBy: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - readonly sortOrder: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - readonly duration: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', 'isMeasurement': true; }; - readonly success: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - readonly requestBodySize: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - readonly responseBodySize?: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - readonly statusCode?: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - readonly errorCode?: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - readonly count?: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; + readonly filterTypes: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + readonly flags: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + readonly sortBy: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + readonly sortOrder: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + readonly duration: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; 'isMeasurement': true }; + readonly success: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + readonly requestBodySize: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + readonly responseBodySize?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + readonly statusCode?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + readonly errorCode?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + readonly count?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; type QueryTelemetryData = { @@ -265,8 +265,8 @@ type GalleryServiceQueryEvent = QueryTelemetryData & { }; type GalleryServiceAdditionalQueryClassification = { - readonly duration: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', 'isMeasurement': true }; - readonly count: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + readonly duration: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; 'isMeasurement': true }; + readonly count: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; type GalleryServiceAdditionalQueryEvent = { @@ -530,10 +530,10 @@ function toExtension(galleryExtension: IRawGalleryExtension, version: IRawGaller }; } -type PreReleaseMigrationInfo = { id: string, displayName: string, migrateStorage?: boolean, engine?: string }; +type PreReleaseMigrationInfo = { id: string; displayName: string; migrateStorage?: boolean; engine?: string }; interface IRawExtensionsControlManifest { malicious: string[]; - unsupported?: IStringDictionary; + unsupported?: IStringDictionary; migrateToPreRelease?: IStringDictionary; } @@ -544,7 +544,7 @@ abstract class AbstractExtensionGalleryService implements IExtensionGalleryServi private extensionsGalleryUrl: string | undefined; private extensionsControlUrl: string | undefined; - private readonly commonHeadersPromise: Promise<{ [key: string]: string; }>; + private readonly commonHeadersPromise: Promise<{ [key: string]: string }>; constructor( storageService: IStorageService | undefined, @@ -740,7 +740,7 @@ abstract class AbstractExtensionGalleryService implements IExtensionGalleryServi return { firstPage: extensions, total, pageSize: query.pageSize, getPage } as IPager; } - private async queryGalleryExtensions(query: Query, criteria: IExtensionCriteria, token: CancellationToken): Promise<{ extensions: IGalleryExtension[], total: number; }> { + private async queryGalleryExtensions(query: Query, criteria: IExtensionCriteria, token: CancellationToken): Promise<{ extensions: IGalleryExtension[]; total: number }> { const flags = query.flags; /** @@ -866,7 +866,7 @@ abstract class AbstractExtensionGalleryService implements IExtensionGalleryServi return toExtension(rawGalleryExtension, rawGalleryExtension.versions[0], allTargetPlatforms); } - private async queryRawGalleryExtensions(query: Query, token: CancellationToken): Promise<{ galleryExtensions: IRawGalleryExtension[], total: number; }> { + private async queryRawGalleryExtensions(query: Query, token: CancellationToken): Promise<{ galleryExtensions: IRawGalleryExtension[]; total: number }> { if (!this.isEnabled()) { throw new Error('No extension gallery service configured.'); } @@ -1085,8 +1085,8 @@ abstract class AbstractExtensionGalleryService implements IExtensionGalleryServi const message = getErrorMessage(err); type GalleryServiceCDNFallbackClassification = { - url: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - message: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; + url: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + message: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; type GalleryServiceCDNFallbackEvent = { url: string; @@ -1127,7 +1127,7 @@ abstract class AbstractExtensionGalleryService implements IExtensionGalleryServi const result = await asJson(context); const malicious: IExtensionIdentifier[] = []; - const unsupportedPreReleaseExtensions: IStringDictionary<{ id: string, displayName: string, migrateStorage?: boolean }> = {}; + const unsupportedPreReleaseExtensions: IStringDictionary<{ id: string; displayName: string; migrateStorage?: boolean }> = {}; if (result) { for (const id of result.malicious) { diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts index d7d68b73ce26c..6542cb7d5fec3 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagement.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts @@ -250,7 +250,7 @@ export interface IGalleryExtension { publisherId: string; publisher: string; publisherDisplayName: string; - publisherDomain?: { link: string, verified: boolean }; + publisherDomain?: { link: string; verified: boolean }; description: string; installCount: number; rating: number; @@ -272,10 +272,10 @@ export interface IGalleryMetadata { id: string; publisherId: string; publisherDisplayName: string; - isPreReleaseVersion: boolean, + isPreReleaseVersion: boolean; } -export type Metadata = Partial; +export type Metadata = Partial; export interface ILocalExtension extends IExtension { isMachineScoped: boolean; @@ -321,7 +321,7 @@ export const enum StatisticType { export interface IExtensionsControlManifest { malicious: IExtensionIdentifier[]; - unsupportedPreReleaseExtensions?: IStringDictionary<{ id: string, displayName: string, migrateStorage?: boolean }>; + unsupportedPreReleaseExtensions?: IStringDictionary<{ id: string; displayName: string; migrateStorage?: boolean }>; } export const enum InstallOperation { @@ -409,9 +409,9 @@ export class ExtensionManagementError extends Error { } } -export type InstallOptions = { isBuiltin?: boolean, isMachineScoped?: boolean, donotIncludePackAndDependencies?: boolean, installGivenVersion?: boolean, installPreReleaseVersion?: boolean, operation?: InstallOperation }; +export type InstallOptions = { isBuiltin?: boolean; isMachineScoped?: boolean; donotIncludePackAndDependencies?: boolean; installGivenVersion?: boolean; installPreReleaseVersion?: boolean; operation?: InstallOperation }; export type InstallVSIXOptions = Omit & { installOnlyNewlyAddedFromExtensionPack?: boolean }; -export type UninstallOptions = { donotIncludePack?: boolean, donotCheckDependents?: boolean }; +export type UninstallOptions = { donotIncludePack?: boolean; donotCheckDependents?: boolean }; export interface IExtensionManagementParticipant { postInstall(local: ILocalExtension, source: URI | IGalleryExtension, options: InstallOptions | InstallVSIXOptions, token: CancellationToken): Promise; @@ -451,7 +451,7 @@ export const IGlobalExtensionEnablementService = createDecorator; + readonly onDidChangeEnablement: Event<{ readonly extensions: IExtensionIdentifier[]; readonly source?: string }>; getDisabledExtensions(): IExtensionIdentifier[]; enableExtension(extension: IExtensionIdentifier, source?: string): Promise; @@ -460,23 +460,23 @@ export interface IGlobalExtensionEnablementService { } export type IConfigBasedExtensionTip = { - readonly extensionId: string, - readonly extensionName: string, - readonly isExtensionPack: boolean, - readonly configName: string, - readonly important: boolean, + readonly extensionId: string; + readonly extensionName: string; + readonly isExtensionPack: boolean; + readonly configName: string; + readonly important: boolean; }; export type IExecutableBasedExtensionTip = { - readonly extensionId: string, - readonly extensionName: string, - readonly isExtensionPack: boolean, - readonly exeName: string, - readonly exeFriendlyName: string, - readonly windowsPath?: string, + readonly extensionId: string; + readonly extensionName: string; + readonly isExtensionPack: boolean; + readonly exeName: string; + readonly exeFriendlyName: string; + readonly windowsPath?: string; }; -export type IWorkspaceTips = { readonly remoteSet: string[]; readonly recommendations: string[]; }; +export type IWorkspaceTips = { readonly remoteSet: string[]; readonly recommendations: string[] }; export const IExtensionTipsService = createDecorator('IExtensionTipsService'); export interface IExtensionTipsService { diff --git a/src/vs/platform/extensionManagement/common/extensionManagementCLIService.ts b/src/vs/platform/extensionManagement/common/extensionManagementCLIService.ts index a1cac3f59db0e..33a63d5e81cdc 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagementCLIService.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagementCLIService.ts @@ -27,7 +27,7 @@ function getId(manifest: IExtensionManifest, withVersion?: boolean): string { } } -type InstallExtensionInfo = { id: string, version?: string, installOptions: InstallOptions; }; +type InstallExtensionInfo = { id: string; version?: string; installOptions: InstallOptions }; export class ExtensionManagementCLIService implements IExtensionManagementCLIService { diff --git a/src/vs/platform/extensionManagement/electron-sandbox/extensionTipsService.ts b/src/vs/platform/extensionManagement/electron-sandbox/extensionTipsService.ts index 5e72182fb26ac..f8d77a97cc092 100644 --- a/src/vs/platform/extensionManagement/electron-sandbox/extensionTipsService.ts +++ b/src/vs/platform/extensionManagement/electron-sandbox/extensionTipsService.ts @@ -25,14 +25,14 @@ import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storag import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; type ExeExtensionRecommendationsClassification = { - extensionId: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; - exeName: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; + extensionId: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; + exeName: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; }; type IExeBasedExtensionTips = { - readonly exeFriendlyName: string, - readonly windowsPath?: string, - readonly recommendations: { extensionId: string, extensionName: string, isExtensionPack: boolean }[]; + readonly exeFriendlyName: string; + readonly windowsPath?: string; + readonly recommendations: { extensionId: string; extensionName: string; isExtensionPack: boolean }[]; }; const promptedExecutableTipsStorageKey = 'extensionTips/promptedExecutableTips'; @@ -64,9 +64,9 @@ export class ExtensionTipsService extends BaseExtensionTipsService { super(fileService, productService, requestService, logService); if (productService.exeBasedExtensionTips) { forEach(productService.exeBasedExtensionTips, ({ key, value: exeBasedExtensionTip }) => { - const highImportanceRecommendations: { extensionId: string, extensionName: string, isExtensionPack: boolean }[] = []; - const mediumImportanceRecommendations: { extensionId: string, extensionName: string, isExtensionPack: boolean }[] = []; - const otherRecommendations: { extensionId: string, extensionName: string, isExtensionPack: boolean }[] = []; + const highImportanceRecommendations: { extensionId: string; extensionName: string; isExtensionPack: boolean }[] = []; + const mediumImportanceRecommendations: { extensionId: string; extensionName: string; isExtensionPack: boolean }[] = []; + const otherRecommendations: { extensionId: string; extensionName: string; isExtensionPack: boolean }[] = []; forEach(exeBasedExtensionTip.recommendations, ({ key: extensionId, value }) => { if (value.important) { if (exeBasedExtensionTip.important) { @@ -130,13 +130,13 @@ export class ExtensionTipsService extends BaseExtensionTipsService { for (const extensionId of installed) { const tip = importantExeBasedRecommendations.get(extensionId); if (tip) { - this.telemetryService.publicLog2<{ exeName: string, extensionId: string }, ExeExtensionRecommendationsClassification>('exeExtensionRecommendations:alreadyInstalled', { extensionId, exeName: tip.exeName }); + this.telemetryService.publicLog2<{ exeName: string; extensionId: string }, ExeExtensionRecommendationsClassification>('exeExtensionRecommendations:alreadyInstalled', { extensionId, exeName: tip.exeName }); } } for (const extensionId of recommendations) { const tip = importantExeBasedRecommendations.get(extensionId); if (tip) { - this.telemetryService.publicLog2<{ exeName: string, extensionId: string }, ExeExtensionRecommendationsClassification>('exeExtensionRecommendations:notInstalled', { extensionId, exeName: tip.exeName }); + this.telemetryService.publicLog2<{ exeName: string; extensionId: string }, ExeExtensionRecommendationsClassification>('exeExtensionRecommendations:notInstalled', { extensionId, exeName: tip.exeName }); } } @@ -271,7 +271,7 @@ export class ExtensionTipsService extends BaseExtensionTipsService { this.storageService.store(promptedExecutableTipsStorageKey, JSON.stringify(promptedExecutableTips), StorageScope.GLOBAL, StorageTarget.USER); } - private groupByInstalled(recommendationsToSuggest: string[], local: ILocalExtension[]): { installed: string[], uninstalled: string[] } { + private groupByInstalled(recommendationsToSuggest: string[], local: ILocalExtension[]): { installed: string[]; uninstalled: string[] } { const installed: string[] = [], uninstalled: string[] = []; const installedExtensionsIds = local.reduce((result, i) => { result.add(i.identifier.id.toLowerCase()); return result; }, new Set()); recommendationsToSuggest.forEach(id => { diff --git a/src/vs/platform/extensionManagement/node/extensionLifecycle.ts b/src/vs/platform/extensionManagement/node/extensionLifecycle.ts index 730d2357c1284..5ebcea3b9665a 100644 --- a/src/vs/platform/extensionManagement/node/extensionLifecycle.ts +++ b/src/vs/platform/extensionManagement/node/extensionLifecycle.ts @@ -37,7 +37,7 @@ export class ExtensionsLifecycle extends Disposable { return Promises.rm(this.getExtensionStoragePath(extension)).then(undefined, e => this.logService.error('Error while removing extension storage path', e)); } - private parseScript(extension: ILocalExtension, type: string): { script: string, args: string[] } | null { + private parseScript(extension: ILocalExtension, type: string): { script: string; args: string[] } | null { const scriptKey = `vscode:${type}`; if (extension.location.scheme === Schemas.file && extension.manifest && extension.manifest['scripts'] && typeof extension.manifest['scripts'][scriptKey] === 'string') { const script = (extension.manifest['scripts'][scriptKey]).split(' '); @@ -97,7 +97,7 @@ export class ExtensionsLifecycle extends Disposable { const extensionUninstallProcess = fork(uninstallHook, [`--type=extension-post-${lifecycleType}`, ...args], opts); // Catch all output coming from the process - type Output = { data: string, format: string[] }; + type Output = { data: string; format: string[] }; extensionUninstallProcess.stdout!.setEncoding('utf8'); extensionUninstallProcess.stderr!.setEncoding('utf8'); diff --git a/src/vs/platform/extensionManagement/node/extensionsScanner.ts b/src/vs/platform/extensionManagement/node/extensionsScanner.ts index 7cc7514198caf..593ae22edfcf7 100644 --- a/src/vs/platform/extensionManagement/node/extensionsScanner.ts +++ b/src/vs/platform/extensionManagement/node/extensionsScanner.ts @@ -391,7 +391,7 @@ export class ExtensionsScanner extends Disposable { return this._devSystemExtensionsPath; } - private async readManifest(extensionPath: string): Promise<{ manifest: IExtensionManifest; metadata: Metadata | null; }> { + private async readManifest(extensionPath: string): Promise<{ manifest: IExtensionManifest; metadata: Metadata | null }> { const promises = [ pfs.Promises.readFile(path.join(extensionPath, 'package.json'), 'utf8') .then(raw => this.parseManifest(raw)), @@ -407,7 +407,7 @@ export class ExtensionsScanner extends Disposable { }; } - private parseManifest(raw: string): Promise<{ manifest: IExtensionManifest; metadata: Metadata | null; }> { + private parseManifest(raw: string): Promise<{ manifest: IExtensionManifest; metadata: Metadata | null }> { return new Promise((c, e) => { try { const manifest = JSON.parse(raw); diff --git a/src/vs/platform/extensionManagement/node/extensionsWatcher.ts b/src/vs/platform/extensionManagement/node/extensionsWatcher.ts index 0c8f7e0044c84..0c32205fe91eb 100644 --- a/src/vs/platform/extensionManagement/node/extensionsWatcher.ts +++ b/src/vs/platform/extensionManagement/node/extensionsWatcher.ts @@ -16,7 +16,7 @@ import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity' export class ExtensionsWatcher extends Disposable { - private readonly _onDidChangeExtensionsByAnotherSource = this._register(new Emitter<{ added: ILocalExtension[], removed: IExtensionIdentifier[] }>()); + private readonly _onDidChangeExtensionsByAnotherSource = this._register(new Emitter<{ added: ILocalExtension[]; removed: IExtensionIdentifier[] }>()); readonly onDidChangeExtensionsByAnotherSource = this._onDidChangeExtensionsByAnotherSource.event; private startTimestamp = 0; diff --git a/src/vs/platform/extensions/common/extensionHostStarter.ts b/src/vs/platform/extensions/common/extensionHostStarter.ts index 66f5483cfe351..d4fc6b48112f5 100644 --- a/src/vs/platform/extensions/common/extensionHostStarter.ts +++ b/src/vs/platform/extensions/common/extensionHostStarter.ts @@ -12,7 +12,7 @@ export const IExtensionHostStarter = createDecorator('ext export const ipcExtensionHostStarterChannelName = 'extensionHostStarter'; export interface IExtensionHostProcessOptions { - env: { [key: string]: string | undefined; }; + env: { [key: string]: string | undefined }; detached: boolean; execArgv: string[] | undefined; silent: boolean; @@ -24,11 +24,11 @@ export interface IExtensionHostStarter { onDynamicStdout(id: string): Event; onDynamicStderr(id: string): Event; onDynamicMessage(id: string): Event; - onDynamicError(id: string): Event<{ error: SerializedError; }>; + onDynamicError(id: string): Event<{ error: SerializedError }>; onDynamicExit(id: string): Event<{ code: number; signal: string }>; - createExtensionHost(): Promise<{ id: string; }>; - start(id: string, opts: IExtensionHostProcessOptions): Promise<{ pid: number; }>; + createExtensionHost(): Promise<{ id: string }>; + start(id: string, opts: IExtensionHostProcessOptions): Promise<{ pid: number }>; enableInspectPort(id: string): Promise; kill(id: string): Promise; diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts index d151f658be064..5aa0a9b745e19 100644 --- a/src/vs/platform/extensions/common/extensions.ts +++ b/src/vs/platform/extensions/common/extensions.ts @@ -27,10 +27,10 @@ export interface IConfigurationProperty { } export interface IConfiguration { - id?: string, - order?: number, - title?: string, - properties: { [key: string]: IConfigurationProperty; }; + id?: string; + order?: number; + title?: string; + properties: { [key: string]: IConfigurationProperty }; } export interface IDebugger { @@ -91,7 +91,7 @@ export interface IView { export interface IColor { id: string; description: string; - defaults: { light: string, dark: string, highContrast: string }; + defaults: { light: string; dark: string; highContrast: string }; } export interface IWebviewEditor { @@ -123,9 +123,9 @@ export interface IWalkthroughStep { readonly title: string; readonly description: string | undefined; readonly media: - | { image: string | { dark: string, light: string, hc: string }, altText: string, markdown?: never, svg?: never } - | { markdown: string, image?: never, svg?: never } - | { svg: string, altText: string, markdown?: never, image?: never } + | { image: string | { dark: string; light: string; hc: string }; altText: string; markdown?: never; svg?: never } + | { markdown: string; image?: never; svg?: never } + | { svg: string; altText: string; markdown?: never; image?: never }; readonly completionEvents?: string[]; /** @deprecated use `completionEvents: 'onCommand:...'` */ readonly doneOn?: { command: string }; @@ -133,7 +133,7 @@ export interface IWalkthroughStep { } export interface IWalkthrough { - readonly id: string, + readonly id: string; readonly title: string; readonly description: string; readonly steps: IWalkthroughStep[]; @@ -209,10 +209,10 @@ export const ALL_EXTENSION_KINDS: readonly ExtensionKind[] = ['ui', 'workspace', export type LimitedWorkspaceSupportType = 'limited'; export type ExtensionUntrustedWorkspaceSupportType = boolean | LimitedWorkspaceSupportType; -export type ExtensionUntrustedWorkspaceSupport = { supported: true; } | { supported: false, description: string } | { supported: LimitedWorkspaceSupportType, description: string, restrictedConfigurations?: string[] }; +export type ExtensionUntrustedWorkspaceSupport = { supported: true } | { supported: false; description: string } | { supported: LimitedWorkspaceSupportType; description: string; restrictedConfigurations?: string[] }; export type ExtensionVirtualWorkspaceSupportType = boolean | LimitedWorkspaceSupportType; -export type ExtensionVirtualWorkspaceSupport = boolean | { supported: true; } | { supported: false | LimitedWorkspaceSupportType, description: string }; +export type ExtensionVirtualWorkspaceSupport = boolean | { supported: true } | { supported: false | LimitedWorkspaceSupportType; description: string }; export function getWorkspaceSupportTypeMessage(supportType: ExtensionUntrustedWorkspaceSupport | ExtensionVirtualWorkspaceSupport | undefined): string | undefined { if (typeof supportType === 'object' && supportType !== null) { @@ -274,11 +274,11 @@ export interface IExtensionManifest { readonly extensionPack?: string[]; readonly extensionKind?: ExtensionKind | ExtensionKind[]; readonly contributes?: IExtensionContributions; - readonly repository?: { url: string; }; - readonly bugs?: { url: string; }; + readonly repository?: { url: string }; + readonly bugs?: { url: string }; readonly enabledApiProposals?: readonly string[]; readonly api?: string; - readonly scripts?: { [key: string]: string; }; + readonly scripts?: { [key: string]: string }; readonly capabilities?: IExtensionCapabilities; } diff --git a/src/vs/platform/extensions/electron-main/workerMainProcessExtensionHostStarter.ts b/src/vs/platform/extensions/electron-main/workerMainProcessExtensionHostStarter.ts index d7b4370b3f8f8..f78d3e2db1f50 100644 --- a/src/vs/platform/extensions/electron-main/workerMainProcessExtensionHostStarter.ts +++ b/src/vs/platform/extensions/electron-main/workerMainProcessExtensionHostStarter.ts @@ -123,15 +123,15 @@ export class WorkerMainProcessExtensionHostStarter implements IDisposable, IExte return this._proxy!.onDynamicMessage(id); } - onDynamicError(id: string): Event<{ error: SerializedError; }> { + onDynamicError(id: string): Event<{ error: SerializedError }> { return this._proxy!.onDynamicError(id); } - onDynamicExit(id: string): Event<{ code: number; signal: string; }> { + onDynamicExit(id: string): Event<{ code: number; signal: string }> { return this._proxy!.onDynamicExit(id); } - async createExtensionHost(): Promise<{ id: string; }> { + async createExtensionHost(): Promise<{ id: string }> { const proxy = await this._worker.getProxyObject(); if (this._shutdown) { throw canceled(); @@ -139,7 +139,7 @@ export class WorkerMainProcessExtensionHostStarter implements IDisposable, IExte return proxy.createExtensionHost(); } - async start(id: string, opts: IExtensionHostProcessOptions): Promise<{ pid: number; }> { + async start(id: string, opts: IExtensionHostProcessOptions): Promise<{ pid: number }> { const sw = StopWatch.create(false); const proxy = await this._worker.getProxyObject(); if (this._shutdown) { diff --git a/src/vs/platform/extensions/node/extensionHostStarterWorker.ts b/src/vs/platform/extensions/node/extensionHostStarterWorker.ts index 89090775c3c7d..ed03fbc07f5ec 100644 --- a/src/vs/platform/extensions/node/extensionHostStarterWorker.ts +++ b/src/vs/platform/extensions/node/extensionHostStarterWorker.ts @@ -31,7 +31,7 @@ class ExtensionHostProcess extends Disposable { readonly _onMessage = this._register(new Emitter()); readonly onMessage = this._onMessage.event; - readonly _onError = this._register(new Emitter<{ error: SerializedError; }>()); + readonly _onError = this._register(new Emitter<{ error: SerializedError }>()); readonly onError = this._onError.event; readonly _onExit = this._register(new Emitter<{ pid: number; code: number; signal: string }>()); @@ -47,7 +47,7 @@ class ExtensionHostProcess extends Disposable { super(); } - start(opts: IExtensionHostProcessOptions): { pid: number; } { + start(opts: IExtensionHostProcessOptions): { pid: number } { if (platform.isCI) { this._host.logInfo(`Calling fork to start extension host...`); } @@ -176,15 +176,15 @@ export class ExtensionHostStarter implements IDisposable, IExtensionHostStarter return this._getExtHost(id).onMessage; } - onDynamicError(id: string): Event<{ error: SerializedError; }> { + onDynamicError(id: string): Event<{ error: SerializedError }> { return this._getExtHost(id).onError; } - onDynamicExit(id: string): Event<{ code: number; signal: string; }> { + onDynamicExit(id: string): Event<{ code: number; signal: string }> { return this._getExtHost(id).onExit; } - async createExtensionHost(): Promise<{ id: string; }> { + async createExtensionHost(): Promise<{ id: string }> { const id = String(++ExtensionHostStarter._lastId); const extHost = new ExtensionHostProcess(id, this._host); this._extHosts.set(id, extHost); @@ -198,7 +198,7 @@ export class ExtensionHostStarter implements IDisposable, IExtensionHostStarter return { id }; } - async start(id: string, opts: IExtensionHostProcessOptions): Promise<{ pid: number; }> { + async start(id: string, opts: IExtensionHostProcessOptions): Promise<{ pid: number }> { return this._getExtHost(id).start(opts); } diff --git a/src/vs/platform/externalTerminal/common/externalTerminal.ts b/src/vs/platform/externalTerminal/common/externalTerminal.ts index 34a0fdc34a239..822ccb24e37a3 100644 --- a/src/vs/platform/externalTerminal/common/externalTerminal.ts +++ b/src/vs/platform/externalTerminal/common/externalTerminal.ts @@ -15,9 +15,9 @@ export interface IExternalTerminalSettings { } export interface ITerminalForPlatform { - windows: string, - linux: string, - osx: string + windows: string; + linux: string; + osx: string; } export interface IExternalTerminalService { @@ -29,7 +29,7 @@ export interface IExternalTerminalService { export interface IExternalTerminalConfiguration { terminal: { - explorerKind: 'integrated' | 'external', + explorerKind: 'integrated' | 'external'; external: IExternalTerminalSettings; }; } diff --git a/src/vs/platform/externalTerminal/node/externalTerminalService.ts b/src/vs/platform/externalTerminal/node/externalTerminalService.ts index 344322eb4bc87..0b37a5d84d8ee 100644 --- a/src/vs/platform/externalTerminal/node/externalTerminalService.ts +++ b/src/vs/platform/externalTerminal/node/externalTerminalService.ts @@ -320,7 +320,7 @@ function getSanitizedEnvironment(process: NodeJS.Process) { /** * tries to turn OS errors into more meaningful error messages */ -function improveError(err: Error & { errno?: string, path?: string }): Error { +function improveError(err: Error & { errno?: string; path?: string }): Error { if ('errno' in err && err['errno'] === 'ENOENT' && 'path' in err && typeof err['path'] === 'string') { return new Error(nls.localize('ext.term.app.not.found', "can't find terminal application '{0}'", err['path'])); } diff --git a/src/vs/platform/files/browser/indexedDBFileSystemProvider.ts b/src/vs/platform/files/browser/indexedDBFileSystemProvider.ts index 466113c93bfc8..b1a6755d5805a 100644 --- a/src/vs/platform/files/browser/indexedDBFileSystemProvider.ts +++ b/src/vs/platform/files/browser/indexedDBFileSystemProvider.ts @@ -28,14 +28,14 @@ type DirEntry = [string, FileType]; type IndexedDBFileSystemEntry = | { - path: string, - type: FileType.Directory, - children: Map, + path: string; + type: FileType.Directory; + children: Map; } | { - path: string, - type: FileType.File, - size: number | undefined, + path: string; + type: FileType.File; + size: number | undefined; }; class IndexedDBFileSystemNode { @@ -92,11 +92,11 @@ class IndexedDBFileSystemNode { } } - add(path: string, entry: { type: 'file', size?: number } | { type: 'dir' }) { + add(path: string, entry: { type: 'file'; size?: number } | { type: 'dir' }) { this.doAdd(path.split('/').filter(p => p.length), entry, path); } - private doAdd(pathParts: string[], entry: { type: 'file', size?: number } | { type: 'dir' }, originalPath: string) { + private doAdd(pathParts: string[], entry: { type: 'file'; size?: number } | { type: 'dir' }, originalPath: string) { if (pathParts.length === 0) { throw ERR_UNKNOWN_INTERNAL(`Internal error creating IndexedDBFSNode -- adding empty path (encountered while adding ${originalPath})`); } @@ -464,7 +464,7 @@ export class IndexedDBFileSystemProvider extends Disposable implements IFileSyst this.triggerChanges(files.map(([resource]) => ({ resource, type: FileChangeType.UPDATED }))); } - private fileWriteBatch: { resource: URI, content: Uint8Array }[] = []; + private fileWriteBatch: { resource: URI; content: Uint8Array }[] = []; private async writeMany() { if (this.fileWriteBatch.length) { const fileBatch = this.fileWriteBatch.splice(0, this.fileWriteBatch.length); diff --git a/src/vs/platform/files/common/diskFileSystemProviderClient.ts b/src/vs/platform/files/common/diskFileSystemProviderClient.ts index cf6479d8d4aad..1980081887fb7 100644 --- a/src/vs/platform/files/common/diskFileSystemProviderClient.ts +++ b/src/vs/platform/files/common/diskFileSystemProviderClient.ts @@ -31,7 +31,7 @@ export class DiskFileSystemProviderClient extends Disposable implements constructor( private readonly channel: IChannel, - private readonly extraCapabilities: { trash?: boolean, pathCaseSensitive?: boolean } + private readonly extraCapabilities: { trash?: boolean; pathCaseSensitive?: boolean } ) { super(); @@ -210,7 +210,7 @@ export class DiskFileSystemProviderClient extends Disposable implements // for both events and errors from the watcher. So we need to // unwrap the event from the remote and emit through the proper // emitter. - this._register(this.channel.listen<{ resource: UriComponents; type: FileChangeType; }[] | string>('fileChange', [this.sessionId])(eventsOrError => { + this._register(this.channel.listen<{ resource: UriComponents; type: FileChangeType }[] | string>('fileChange', [this.sessionId])(eventsOrError => { if (Array.isArray(eventsOrError)) { const events = eventsOrError; this._onDidChange.fire(events.map(event => ({ resource: URI.revive(event.resource), type: event.type }))); diff --git a/src/vs/platform/files/common/fileService.ts b/src/vs/platform/files/common/fileService.ts index d2adec89ea31c..2dcc1cd1ba5f9 100644 --- a/src/vs/platform/files/common/fileService.ts +++ b/src/vs/platform/files/common/fileService.ts @@ -119,7 +119,7 @@ export class FileService extends Disposable implements IFileService { return !!(provider && (provider.capabilities & capability)); } - listCapabilities(): Iterable<{ scheme: string, capabilities: FileSystemProviderCapabilities; }> { + listCapabilities(): Iterable<{ scheme: string; capabilities: FileSystemProviderCapabilities }> { return Iterable.map(this.provider, ([scheme, provider]) => ({ scheme, capabilities: provider.capabilities })); } @@ -233,9 +233,9 @@ export class FileService extends Disposable implements IFileService { }); } - private async toFileStat(provider: IFileSystemProvider, resource: URI, stat: IStat | { type: FileType; } & Partial, siblings: number | undefined, resolveMetadata: boolean, recurse: (stat: IFileStat, siblings?: number) => boolean): Promise; + private async toFileStat(provider: IFileSystemProvider, resource: URI, stat: IStat | { type: FileType } & Partial, siblings: number | undefined, resolveMetadata: boolean, recurse: (stat: IFileStat, siblings?: number) => boolean): Promise; private async toFileStat(provider: IFileSystemProvider, resource: URI, stat: IStat, siblings: number | undefined, resolveMetadata: true, recurse: (stat: IFileStat, siblings?: number) => boolean): Promise; - private async toFileStat(provider: IFileSystemProvider, resource: URI, stat: IStat | { type: FileType; } & Partial, siblings: number | undefined, resolveMetadata: boolean, recurse: (stat: IFileStat, siblings?: number) => boolean): Promise { + private async toFileStat(provider: IFileSystemProvider, resource: URI, stat: IStat | { type: FileType } & Partial, siblings: number | undefined, resolveMetadata: boolean, recurse: (stat: IFileStat, siblings?: number) => boolean): Promise { const { providerExtUri } = this.getExtUri(provider); // convert to file stat @@ -283,9 +283,9 @@ export class FileService extends Disposable implements IFileService { return fileStat; } - async resolveAll(toResolve: { resource: URI, options?: IResolveFileOptions; }[]): Promise; - async resolveAll(toResolve: { resource: URI, options: IResolveMetadataFileOptions; }[]): Promise; - async resolveAll(toResolve: { resource: URI; options?: IResolveFileOptions; }[]): Promise { + async resolveAll(toResolve: { resource: URI; options?: IResolveFileOptions }[]): Promise; + async resolveAll(toResolve: { resource: URI; options: IResolveMetadataFileOptions }[]): Promise; + async resolveAll(toResolve: { resource: URI; options?: IResolveFileOptions }[]): Promise { return Promises.settled(toResolve.map(async entry => { try { return { stat: await this.doResolveFile(entry.resource, entry.options), success: true }; @@ -488,7 +488,7 @@ export class FileService extends Disposable implements IFileService { return this.doReadFileStream(provider, resource, options, token); } - private async doReadFileStream(provider: IFileSystemProviderWithFileReadWriteCapability | IFileSystemProviderWithOpenReadWriteCloseCapability | IFileSystemProviderWithFileReadStreamCapability, resource: URI, options?: IReadFileOptions & IReadFileStreamOptions & { preferUnbuffered?: boolean; }, token?: CancellationToken): Promise { + private async doReadFileStream(provider: IFileSystemProviderWithFileReadWriteCapability | IFileSystemProviderWithOpenReadWriteCloseCapability | IFileSystemProviderWithFileReadStreamCapability, resource: URI, options?: IReadFileOptions & IReadFileStreamOptions & { preferUnbuffered?: boolean }, token?: CancellationToken): Promise { // install a cancellation token that gets cancelled // when any error occurs. this allows us to resolve @@ -813,7 +813,7 @@ export class FileService extends Disposable implements IFileService { } } - private async doValidateMoveCopy(sourceProvider: IFileSystemProvider, source: URI, targetProvider: IFileSystemProvider, target: URI, mode: 'move' | 'copy', overwrite?: boolean): Promise<{ exists: boolean, isSameResourceWithDifferentPathCase: boolean; }> { + private async doValidateMoveCopy(sourceProvider: IFileSystemProvider, source: URI, targetProvider: IFileSystemProvider, target: URI, mode: 'move' | 'copy', overwrite?: boolean): Promise<{ exists: boolean; isSameResourceWithDifferentPathCase: boolean }> { let isSameResourceWithDifferentPathCase = false; // Check if source is equal or parent to target (requires providers to be the same) @@ -854,7 +854,7 @@ export class FileService extends Disposable implements IFileService { return { exists, isSameResourceWithDifferentPathCase }; } - private getExtUri(provider: IFileSystemProvider): { providerExtUri: IExtUri, isPathCaseSensitive: boolean; } { + private getExtUri(provider: IFileSystemProvider): { providerExtUri: IExtUri; isPathCaseSensitive: boolean } { const isPathCaseSensitive = this.isPathCaseSensitive(provider); return { @@ -998,7 +998,7 @@ export class FileService extends Disposable implements IFileService { private readonly _onDidWatchError = this._register(new Emitter()); readonly onDidWatchError = this._onDidWatchError.event; - private readonly activeWatchers = new Map(); + private readonly activeWatchers = new Map(); watch(resource: URI, options: IWatchOptions = { recursive: false, excludes: [] }): IDisposable { const disposables = new DisposableStore(); diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 568a29a0648ba..70c8c4f14d9ea 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -82,7 +82,7 @@ export interface IFileService { /** * List the schemes and capabilies for registered file system providers */ - listCapabilities(): Iterable<{ scheme: string, capabilities: FileSystemProviderCapabilities }> + listCapabilities(): Iterable<{ scheme: string; capabilities: FileSystemProviderCapabilities }>; /** * Allows to listen for file changes. The event will fire for every file within the opened workspace @@ -116,8 +116,8 @@ export interface IFileService { * Same as resolve() but supports resolving multiple resources in parallel. * If one of the resolve targets fails to resolve returns a fake IFileStat instead of making the whole call fail. */ - resolveAll(toResolve: { resource: URI, options: IResolveMetadataFileOptions }[]): Promise; - resolveAll(toResolve: { resource: URI, options?: IResolveFileOptions }[]): Promise; + resolveAll(toResolve: { resource: URI; options: IResolveMetadataFileOptions }[]): Promise; + resolveAll(toResolve: { resource: URI; options?: IResolveFileOptions }[]): Promise; /** * Finds out if a file/folder identified by the resource exists. @@ -1171,9 +1171,9 @@ export enum FileKind { */ export const ETAG_DISABLED = ''; -export function etag(stat: { mtime: number, size: number }): string; -export function etag(stat: { mtime: number | undefined, size: number | undefined }): string | undefined; -export function etag(stat: { mtime: number | undefined, size: number | undefined }): string | undefined { +export function etag(stat: { mtime: number; size: number }): string; +export function etag(stat: { mtime: number | undefined; size: number | undefined }): string | undefined; +export function etag(stat: { mtime: number | undefined; size: number | undefined }): string | undefined { if (typeof stat.size !== 'number' || typeof stat.mtime !== 'number') { return undefined; } diff --git a/src/vs/platform/files/common/watcher.ts b/src/vs/platform/files/common/watcher.ts index ae04e5dae497b..d4dd3e528022d 100644 --- a/src/vs/platform/files/common/watcher.ts +++ b/src/vs/platform/files/common/watcher.ts @@ -143,8 +143,8 @@ export abstract class AbstractWatcherClient extends Disposable { private readonly onLogMessage: (msg: ILogMessage) => void, private verboseLogging: boolean, private options: { - type: string, - restartOnError: boolean + type: string; + restartOnError: boolean; } ) { super(); diff --git a/src/vs/platform/files/node/watcher/parcel/parcelWatcher.ts b/src/vs/platform/files/node/watcher/parcel/parcelWatcher.ts index 692cd03586b8a..bc796f15a1788 100644 --- a/src/vs/platform/files/node/watcher/parcel/parcelWatcher.ts +++ b/src/vs/platform/files/node/watcher/parcel/parcelWatcher.ts @@ -457,7 +457,7 @@ export class ParcelWatcher extends Disposable implements IRecursiveWatcher { } } - private normalizePath(request: IRecursiveWatchRequest): { realPath: string, realPathDiffers: boolean, realPathLength: number } { + private normalizePath(request: IRecursiveWatchRequest): { realPath: string; realPathDiffers: boolean; realPathLength: number } { let realPath = request.path; let realPathDiffers = false; let realPathLength = request.path.length; @@ -487,7 +487,7 @@ export class ParcelWatcher extends Disposable implements IRecursiveWatcher { return { realPath, realPathDiffers, realPathLength }; } - private normalizeEvents(events: IDiskFileChange[], request: IRecursiveWatchRequest, realPathDiffers: boolean, realPathLength: number): { events: IDiskFileChange[], rootDeleted: boolean } { + private normalizeEvents(events: IDiskFileChange[], request: IRecursiveWatchRequest, realPathDiffers: boolean, realPathLength: number): { events: IDiskFileChange[]; rootDeleted: boolean } { let rootDeleted = false; for (const event of events) { diff --git a/src/vs/platform/files/test/node/watcherCoalescer.test.ts b/src/vs/platform/files/test/node/watcherCoalescer.test.ts index 7853f6ce565f0..e6bef2015b550 100644 --- a/src/vs/platform/files/test/node/watcherCoalescer.test.ts +++ b/src/vs/platform/files/test/node/watcherCoalescer.test.ts @@ -12,13 +12,13 @@ import { FileChangesEvent, FileChangeType, IFileChange } from 'vs/platform/files import { IDiskFileChange, coalesceEvents, toFileChanges } from 'vs/platform/files/common/watcher'; class TestFileWatcher { - private readonly _onDidFilesChange: Emitter<{ raw: IFileChange[], event: FileChangesEvent }>; + private readonly _onDidFilesChange: Emitter<{ raw: IFileChange[]; event: FileChangesEvent }>; constructor() { - this._onDidFilesChange = new Emitter<{ raw: IFileChange[], event: FileChangesEvent }>(); + this._onDidFilesChange = new Emitter<{ raw: IFileChange[]; event: FileChangesEvent }>(); } - get onDidFilesChange(): Event<{ raw: IFileChange[], event: FileChangesEvent }> { + get onDidFilesChange(): Event<{ raw: IFileChange[]; event: FileChangesEvent }> { return this._onDidFilesChange.event; } diff --git a/src/vs/platform/history/browser/contextScopedHistoryWidget.ts b/src/vs/platform/history/browser/contextScopedHistoryWidget.ts index e692a4ae7ae27..20ed59a159f72 100644 --- a/src/vs/platform/history/browser/contextScopedHistoryWidget.ts +++ b/src/vs/platform/history/browser/contextScopedHistoryWidget.ts @@ -40,9 +40,9 @@ export interface IContextScopedHistoryNavigationWidget extends IContextScopedWid } export interface IHistoryNavigationContext { - scopedContextKeyService: IContextKeyService, - historyNavigationForwardsEnablement: IContextKey, - historyNavigationBackwardsEnablement: IContextKey, + scopedContextKeyService: IContextKeyService; + historyNavigationForwardsEnablement: IContextKey; + historyNavigationBackwardsEnablement: IContextKey; } export function createAndBindHistoryNavigationWidgetScopedContextKeyService(contextKeyService: IContextKeyService, widget: IContextScopedHistoryNavigationWidget): IHistoryNavigationContext { diff --git a/src/vs/platform/instantiation/common/instantiation.ts b/src/vs/platform/instantiation/common/instantiation.ts index 32567ff6ffa3d..c6613724a06bd 100644 --- a/src/vs/platform/instantiation/common/instantiation.ts +++ b/src/vs/platform/instantiation/common/instantiation.ts @@ -15,7 +15,7 @@ export namespace _util { export const DI_TARGET = '$di$target'; export const DI_DEPENDENCIES = '$di$dependencies'; - export function getServiceDependencies(ctor: any): { id: ServiceIdentifier, index: number, optional: boolean }[] { + export function getServiceDependencies(ctor: any): { id: ServiceIdentifier; index: number; optional: boolean }[] { return ctor[DI_DEPENDENCIES] || []; } } diff --git a/src/vs/platform/instantiation/common/instantiationService.ts b/src/vs/platform/instantiation/common/instantiationService.ts index 69cb2fe385743..7844e04fa0f80 100644 --- a/src/vs/platform/instantiation/common/instantiationService.ts +++ b/src/vs/platform/instantiation/common/instantiationService.ts @@ -156,7 +156,7 @@ export class InstantiationService implements IInstantiationService { private _createAndCacheServiceInstance(id: ServiceIdentifier, desc: SyncDescriptor, _trace: Trace): T { - type Triple = { id: ServiceIdentifier, desc: SyncDescriptor, _trace: Trace; }; + type Triple = { id: ServiceIdentifier; desc: SyncDescriptor; _trace: Trace }; const graph = new Graph(data => data.id.toString()); let cycleCount = 0; diff --git a/src/vs/platform/ipc/electron-sandbox/services.ts b/src/vs/platform/ipc/electron-sandbox/services.ts index eb62cfa728a9d..8c78c98f03bc1 100644 --- a/src/vs/platform/ipc/electron-sandbox/services.ts +++ b/src/vs/platform/ipc/electron-sandbox/services.ts @@ -9,7 +9,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; type ChannelClientCtor = { new(channel: IChannel): T }; -type Remote = { getChannel(channelName: string): IChannel; }; +type Remote = { getChannel(channelName: string): IChannel }; abstract class RemoteServiceStub { constructor( diff --git a/src/vs/platform/issue/common/issue.ts b/src/vs/platform/issue/common/issue.ts index 0f398932e6d86..550c83be0d90c 100644 --- a/src/vs/platform/issue/common/issue.ts +++ b/src/vs/platform/issue/common/issue.ts @@ -102,7 +102,7 @@ export interface IssueReporterWindowConfiguration extends ISandboxConfiguration type: string; arch: string; release: string; - } + }; } export interface ProcessExplorerWindowConfiguration extends ISandboxConfiguration { diff --git a/src/vs/platform/issue/electron-main/issueMainService.ts b/src/vs/platform/issue/electron-main/issueMainService.ts index aa202846f04cd..36cd84f124adb 100644 --- a/src/vs/platform/issue/electron-main/issueMainService.ts +++ b/src/vs/platform/issue/electron-main/issueMainService.ts @@ -152,7 +152,7 @@ export class IssueMainService implements ICommonIssueService { } }); - ipcMain.on('vscode:workbenchCommand', (_: unknown, commandInfo: { id: any; from: any; args: any; }) => { + ipcMain.on('vscode:workbenchCommand', (_: unknown, commandInfo: { id: any; from: any; args: any }) => { const { id, from, args } = commandInfo; let parentWindow: BrowserWindow | null; diff --git a/src/vs/platform/keybinding/common/keybindingsRegistry.ts b/src/vs/platform/keybinding/common/keybindingsRegistry.ts index e8f7a8daa756b..75c0bd4dec2b3 100644 --- a/src/vs/platform/keybinding/common/keybindingsRegistry.ts +++ b/src/vs/platform/keybinding/common/keybindingsRegistry.ts @@ -90,7 +90,7 @@ class KeybindingsRegistryImpl implements IKeybindingsRegistry { /** * Take current platform into account and reduce to primary & secondary. */ - private static bindToCurrentPlatform(kb: IKeybindings): { primary?: number; secondary?: number[]; } { + private static bindToCurrentPlatform(kb: IKeybindings): { primary?: number; secondary?: number[] } { if (OS === OperatingSystem.Windows) { if (kb && kb.win) { return kb.win; diff --git a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts index b38e330aba6b5..ed30931fd889f 100644 --- a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts +++ b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts @@ -97,8 +97,8 @@ suite('AbstractKeybindingService', () => { let createTestKeybindingService: (items: ResolvedKeybindingItem[], contextValue?: any) => TestKeybindingService = null!; let currentContextValue: IContext | null = null; - let executeCommandCalls: { commandId: string; args: any[]; }[] = null!; - let showMessageCalls: { sev: Severity, message: any; }[] = null!; + let executeCommandCalls: { commandId: string; args: any[] }[] = null!; + let showMessageCalls: { sev: Severity; message: any }[] = null!; let statusMessageCalls: string[] | null = null; let statusMessageCallsDisposed: string[] | null = null; diff --git a/src/vs/platform/keyboardLayout/common/keyboardLayout.ts b/src/vs/platform/keyboardLayout/common/keyboardLayout.ts index 4375b23ffb7c9..ab93738d115f2 100644 --- a/src/vs/platform/keyboardLayout/common/keyboardLayout.ts +++ b/src/vs/platform/keyboardLayout/common/keyboardLayout.ts @@ -108,7 +108,7 @@ export function areKeyboardLayoutsEqual(a: IKeyboardLayoutInfo | null, b: IKeybo return false; } -export function parseKeyboardLayoutDescription(layout: IKeyboardLayoutInfo | null): { label: string, description: string } { +export function parseKeyboardLayoutDescription(layout: IKeyboardLayoutInfo | null): { label: string; description: string } { if (!layout) { return { label: '', description: '' }; } diff --git a/src/vs/platform/label/common/label.ts b/src/vs/platform/label/common/label.ts index 4b484c379d1ca..e2b772bf2d6c5 100644 --- a/src/vs/platform/label/common/label.ts +++ b/src/vs/platform/label/common/label.ts @@ -22,7 +22,7 @@ export interface ILabelService { * If `noPrefix` is passed does not tildify the label and also does not prepand the root name for relative labels in a multi root scenario. * If `separator` is passed, will use that over the defined path separator of the formatter. */ - getUriLabel(resource: URI, options?: { relative?: boolean, noPrefix?: boolean, endWithSeparator?: boolean, separator?: '/' | '\\' }): string; + getUriLabel(resource: URI, options?: { relative?: boolean; noPrefix?: boolean; endWithSeparator?: boolean; separator?: '/' | '\\' }): string; getUriBasenameLabel(resource: URI): string; getWorkspaceLabel(workspace: (IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier | URI | IWorkspace), options?: { verbose: boolean }): string; getHostLabel(scheme: string, authority?: string): string; diff --git a/src/vs/platform/launch/electron-main/launchMainService.ts b/src/vs/platform/launch/electron-main/launchMainService.ts index 318e8bf1684c9..14349bfdc7cb6 100644 --- a/src/vs/platform/launch/electron-main/launchMainService.ts +++ b/src/vs/platform/launch/electron-main/launchMainService.ts @@ -89,7 +89,7 @@ export class LaunchMainService implements ILaunchMainService { } } - private parseOpenUrl(args: NativeParsedArgs): { uri: URI, url: string }[] { + private parseOpenUrl(args: NativeParsedArgs): { uri: URI; url: string }[] { if (args['open-url'] && args._urls && args._urls.length > 0) { // --open-url must contain -- followed by the url(s) // process.argv is used over args._ as args._ are resolved to file paths at this point diff --git a/src/vs/platform/lifecycle/electron-main/lifecycleMainService.ts b/src/vs/platform/lifecycle/electron-main/lifecycleMainService.ts index fc9c0fe9e9a17..6839e4371a703 100644 --- a/src/vs/platform/lifecycle/electron-main/lifecycleMainService.ts +++ b/src/vs/platform/lifecycle/electron-main/lifecycleMainService.ts @@ -109,7 +109,7 @@ export interface ILifecycleMainService { /** * Restart the application with optional arguments (CLI). All lifecycle event handlers are triggered. */ - relaunch(options?: { addArgs?: string[], removeArgs?: string[] }): Promise; + relaunch(options?: { addArgs?: string[]; removeArgs?: string[] }): Promise; /** * Shutdown the application normally. All lifecycle event handlers are triggered. @@ -548,7 +548,7 @@ export class LifecycleMainService extends Disposable implements ILifecycleMainSe return this.pendingQuitPromise; } - async relaunch(options?: { addArgs?: string[], removeArgs?: string[] }): Promise { + async relaunch(options?: { addArgs?: string[]; removeArgs?: string[] }): Promise { this.logService.trace('Lifecycle#relaunch()'); const args = process.argv.slice(1); diff --git a/src/vs/platform/list/browser/listService.ts b/src/vs/platform/list/browser/listService.ts index 8590c473c3e9b..8a0aceeab5acb 100644 --- a/src/vs/platform/list/browser/listService.ts +++ b/src/vs/platform/list/browser/listService.ts @@ -661,8 +661,8 @@ abstract class ResourceNavigator extends Disposable { super(); this._register(Event.filter(this.widget.onDidChangeSelection, e => e.browserEvent instanceof KeyboardEvent)(e => this.onSelectionFromKeyboard(e))); - this._register(this.widget.onPointer((e: { browserEvent: MouseEvent, element: T | undefined }) => this.onPointer(e.element, e.browserEvent))); - this._register(this.widget.onMouseDblClick((e: { browserEvent: MouseEvent, element: T | undefined }) => this.onMouseDblClick(e.element, e.browserEvent))); + this._register(this.widget.onPointer((e: { browserEvent: MouseEvent; element: T | undefined }) => this.onPointer(e.element, e.browserEvent))); + this._register(this.widget.onMouseDblClick((e: { browserEvent: MouseEvent; element: T | undefined }) => this.onMouseDblClick(e.element, e.browserEvent))); if (typeof options?.openOnSingleClick !== 'boolean' && options?.configurationService) { this.openOnSingleClick = options?.configurationService!.getValue(openModeSettingKey) !== 'doubleClick'; @@ -1051,7 +1051,7 @@ function workbenchTreeDataPreamble boolean | undefined, disposable: IDisposable } { +): { options: TOptions; getAutomaticKeyboardNavigation: () => boolean | undefined; disposable: IDisposable } { const getAutomaticKeyboardNavigation = () => { // give priority to the context key value to disable this completely let automaticKeyboardNavigation = Boolean(contextKeyService.getContextKeyValue(WorkbenchListAutomaticKeyboardNavigationKey)); diff --git a/src/vs/platform/markers/common/markerService.ts b/src/vs/platform/markers/common/markerService.ts index 12b87603878c5..67959b38db04c 100644 --- a/src/vs/platform/markers/common/markerService.ts +++ b/src/vs/platform/markers/common/markerService.ts @@ -270,7 +270,7 @@ export class MarkerService implements IMarkerService { } } - read(filter: { owner?: string; resource?: URI; severities?: number, take?: number; } = Object.create(null)): IMarker[] { + read(filter: { owner?: string; resource?: URI; severities?: number; take?: number } = Object.create(null)): IMarker[] { let { owner, resource, severities, take } = filter; diff --git a/src/vs/platform/markers/common/markers.ts b/src/vs/platform/markers/common/markers.ts index 68841243fca67..a4accd2d834aa 100644 --- a/src/vs/platform/markers/common/markers.ts +++ b/src/vs/platform/markers/common/markers.ts @@ -20,7 +20,7 @@ export interface IMarkerService { remove(owner: string, resources: URI[]): void; - read(filter?: { owner?: string; resource?: URI; severities?: number, take?: number; }): IMarker[]; + read(filter?: { owner?: string; resource?: URI; severities?: number; take?: number }): IMarker[]; readonly onMarkerChanged: Event; } @@ -55,7 +55,7 @@ export namespace MarkerSeverity { return b - a; } - const _displayStrings: { [value: number]: string; } = Object.create(null); + const _displayStrings: { [value: number]: string } = Object.create(null); _displayStrings[MarkerSeverity.Error] = localize('sev.error', "Error"); _displayStrings[MarkerSeverity.Warning] = localize('sev.warning', "Warning"); _displayStrings[MarkerSeverity.Info] = localize('sev.info', "Info"); diff --git a/src/vs/platform/menubar/electron-main/menubar.ts b/src/vs/platform/menubar/electron-main/menubar.ts index 2c97abb700a78..977325f11859a 100644 --- a/src/vs/platform/menubar/electron-main/menubar.ts +++ b/src/vs/platform/menubar/electron-main/menubar.ts @@ -33,8 +33,8 @@ interface IMenuItemClickHandler { } type IMenuItemInvocation = ( - { type: 'commandId'; commandId: string; } - | { type: 'keybinding'; userSettingsLabel: string; } + { type: 'commandId'; commandId: string } + | { type: 'keybinding'; userSettingsLabel: string } ); interface IMenuItemWithKeybinding { diff --git a/src/vs/platform/native/common/native.ts b/src/vs/platform/native/common/native.ts index a92cbd3d33631..f457aa37ed086 100644 --- a/src/vs/platform/native/common/native.ts +++ b/src/vs/platform/native/common/native.ts @@ -51,7 +51,7 @@ export interface ICommonNativeHostService { readonly onDidChangeColorScheme: Event; - readonly onDidChangePassword: Event<{ service: string, account: string }>; + readonly onDidChangePassword: Event<{ service: string; account: string }>; // Window getWindows(): Promise; @@ -82,7 +82,7 @@ export interface ICommonNativeHostService { * should only be used if it is necessary to steal focus from the current * focused application which may not be VSCode. */ - focusWindow(options?: { windowId?: number, force?: boolean }): Promise; + focusWindow(options?: { windowId?: number; force?: boolean }): Promise; // Dialogs showMessageBox(options: MessageBoxOptions): Promise; @@ -136,8 +136,8 @@ export interface ICommonNativeHostService { uninstallShellCommand(): Promise; // Lifecycle - notifyReady(): Promise - relaunch(options?: { addArgs?: string[], removeArgs?: string[] }): Promise; + notifyReady(): Promise; + relaunch(options?: { addArgs?: string[]; removeArgs?: string[] }): Promise; reload(options?: { disableExtensions?: boolean }): Promise; closeWindow(): Promise; closeWindowById(windowId: number): Promise; diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts index bbf4ce0abbb5d..c52442bedb008 100644 --- a/src/vs/platform/native/electron-main/nativeHostMainService.ts +++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts @@ -97,7 +97,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain private readonly _onDidChangeColorScheme = this._register(new Emitter()); readonly onDidChangeColorScheme = this._onDidChangeColorScheme.event; - private readonly _onDidChangePassword = this._register(new Emitter<{ account: string, service: string }>()); + private readonly _onDidChangePassword = this._register(new Emitter<{ account: string; service: string }>()); readonly onDidChangePassword = this._onDidChangePassword.event; readonly onDidChangeDisplay = Event.debounce(Event.any( @@ -222,7 +222,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain } } - async focusWindow(windowId: number | undefined, options?: { windowId?: number; force?: boolean; }): Promise { + async focusWindow(windowId: number | undefined, options?: { windowId?: number; force?: boolean }): Promise { if (options && typeof options.windowId === 'number') { windowId = options.windowId; } @@ -350,7 +350,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain } } - private async getShellCommandLink(): Promise<{ readonly source: string, readonly target: string }> { + private async getShellCommandLink(): Promise<{ readonly source: string; readonly target: string }> { const target = resolve(this.environmentMainService.appRoot, 'bin', 'code'); const source = `/usr/local/bin/${this.productService.applicationName}`; @@ -697,7 +697,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain } } - async relaunch(windowId: number | undefined, options?: { addArgs?: string[], removeArgs?: string[] }): Promise { + async relaunch(windowId: number | undefined, options?: { addArgs?: string[]; removeArgs?: string[] }): Promise { return this.lifecycleMainService.relaunch(options); } diff --git a/src/vs/platform/notification/common/notification.ts b/src/vs/platform/notification/common/notification.ts index a3b617490cd25..99e8716173c21 100644 --- a/src/vs/platform/notification/common/notification.ts +++ b/src/vs/platform/notification/common/notification.ts @@ -93,7 +93,7 @@ export interface INotification extends INotificationProperties { /** * The source of the notification appears as additional information. */ - readonly source?: string | { label: string; id: string; }; + readonly source?: string | { label: string; id: string }; /** * Actions to show as part of the notification. Primary actions show up as diff --git a/src/vs/platform/opener/common/opener.ts b/src/vs/platform/opener/common/opener.ts index f71caa5927953..e85edfdfe23f4 100644 --- a/src/vs/platform/opener/common/opener.ts +++ b/src/vs/platform/opener/common/opener.ts @@ -56,7 +56,7 @@ export interface IOpener { } export interface IExternalOpener { - openExternal(href: string, ctx: { sourceUri: URI, preferredOpenerId?: string }, token: CancellationToken): Promise; + openExternal(href: string, ctx: { sourceUri: URI; preferredOpenerId?: string }, token: CancellationToken): Promise; dispose?(): void; } @@ -65,7 +65,7 @@ export interface IValidator { } export interface IExternalUriResolver { - resolveExternalUri(resource: URI, options?: OpenOptions): Promise<{ resolved: URI, dispose(): void } | undefined>; + resolveExternalUri(resource: URI, options?: OpenOptions): Promise<{ resolved: URI; dispose(): void } | undefined>; } export interface IOpenerService { @@ -137,8 +137,8 @@ export function matchesSomeScheme(target: URI | string, ...schemes: string[]): b return schemes.some(scheme => matchesScheme(target, scheme)); } -export function selectionFragment(target: URI): { startLineNumber: number; startColumn: number; } | undefined { - let selection: { startLineNumber: number; startColumn: number; } | undefined = undefined; +export function selectionFragment(target: URI): { startLineNumber: number; startColumn: number } | undefined { + let selection: { startLineNumber: number; startColumn: number } | undefined = undefined; const match = /^L?(\d+)(?:,(\d+))?/.exec(target.fragment); if (match) { // support file:///some/file.js#73,84 diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts index 75ce0b9122954..e22b33e6dcb8b 100644 --- a/src/vs/platform/product/common/product.ts +++ b/src/vs/platform/product/common/product.ts @@ -32,7 +32,7 @@ else if (typeof require?.__$__nodeRequire === 'function') { const rootPath = dirname(FileAccess.asFileUri('', require)); product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath); - const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string; }; + const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string }; // Running out of sources if (env['VSCODE_DEV']) { diff --git a/src/vs/platform/profiling/common/profiling.ts b/src/vs/platform/profiling/common/profiling.ts index 99f99522f35f1..7c3e9bf142c0c 100644 --- a/src/vs/platform/profiling/common/profiling.ts +++ b/src/vs/platform/profiling/common/profiling.ts @@ -37,9 +37,9 @@ export interface IV8InspectProfilingService { _serviceBrand: undefined; - startProfiling(options: { port: number }): Promise + startProfiling(options: { port: number }): Promise; - stopProfiling(sessionId: string): Promise + stopProfiling(sessionId: string): Promise; } diff --git a/src/vs/platform/profiling/node/profilingService.ts b/src/vs/platform/profiling/node/profilingService.ts index ab207607d0a83..6187edd76c3c6 100644 --- a/src/vs/platform/profiling/node/profilingService.ts +++ b/src/vs/platform/profiling/node/profilingService.ts @@ -13,7 +13,7 @@ export class InspectProfilingService implements IV8InspectProfilingService { private readonly _sessions = new Map(); - async startProfiling(options: { port: number; }): Promise { + async startProfiling(options: { port: number }): Promise { const prof = await import('v8-inspect-profiler'); const session = await prof.startProfiling({ port: options.port, checkForPaused: true }); const id = generateUuid(); diff --git a/src/vs/platform/progress/common/progress.ts b/src/vs/platform/progress/common/progress.ts index 5334563dfa03d..17b66a65362fa 100644 --- a/src/vs/platform/progress/common/progress.ts +++ b/src/vs/platform/progress/common/progress.ts @@ -52,7 +52,7 @@ export const enum ProgressLocation { export interface IProgressOptions { readonly location: ProgressLocation | string; readonly title?: string; - readonly source?: string | { label: string; id: string; }; + readonly source?: string | { label: string; id: string }; readonly total?: number; readonly cancellable?: boolean; readonly buttons?: string[]; diff --git a/src/vs/platform/quickinput/browser/commandsQuickAccess.ts b/src/vs/platform/quickinput/browser/commandsQuickAccess.ts index 7a10abeb9f3d9..da1810c841c05 100644 --- a/src/vs/platform/quickinput/browser/commandsQuickAccess.ts +++ b/src/vs/platform/quickinput/browser/commandsQuickAccess.ts @@ -181,7 +181,7 @@ export abstract class AbstractCommandsQuickAccessProvider extends PickerQuickAcc interface ISerializedCommandHistory { usesLRU?: boolean; - entries: { key: string; value: number; }[]; + entries: { key: string; value: number }[]; } interface ICommandsQuickAccessConfiguration { @@ -244,7 +244,7 @@ export class CommandsHistory extends Disposable { const cache = CommandsHistory.cache = new LRUCache(this.configuredCommandsHistoryLength, 1); if (serializedCache) { - let entries: { key: string; value: number; }[]; + let entries: { key: string; value: number }[]; if (serializedCache.usesLRU) { entries = serializedCache.entries; } else { diff --git a/src/vs/platform/quickinput/browser/helpQuickAccess.ts b/src/vs/platform/quickinput/browser/helpQuickAccess.ts index f113c7b743fd3..8b80289ac6641 100644 --- a/src/vs/platform/quickinput/browser/helpQuickAccess.ts +++ b/src/vs/platform/quickinput/browser/helpQuickAccess.ts @@ -61,7 +61,7 @@ export class HelpQuickAccessProvider implements IQuickAccessProvider { return disposables; } - private getQuickAccessProviders(): { editorProviders: IHelpQuickAccessPickItem[], globalProviders: IHelpQuickAccessPickItem[] } { + private getQuickAccessProviders(): { editorProviders: IHelpQuickAccessPickItem[]; globalProviders: IHelpQuickAccessPickItem[] } { const globalProviders: IHelpQuickAccessPickItem[] = []; const editorProviders: IHelpQuickAccessPickItem[] = []; diff --git a/src/vs/platform/quickinput/browser/pickerQuickAccess.ts b/src/vs/platform/quickinput/browser/pickerQuickAccess.ts index ddbed66b0bb9a..bba15d63cfc06 100644 --- a/src/vs/platform/quickinput/browser/pickerQuickAccess.ts +++ b/src/vs/platform/quickinput/browser/pickerQuickAccess.ts @@ -73,9 +73,9 @@ export interface IPickerQuickAccessProviderOptions = T | IQuickPickSeparator; -export type PicksWithActive = { items: readonly Pick[], active?: T }; +export type PicksWithActive = { items: readonly Pick[]; active?: T }; export type Picks = readonly Pick[] | PicksWithActive; -export type FastAndSlowPicks = { picks: Picks, additionalPicks: Promise> }; +export type FastAndSlowPicks = { picks: Picks; additionalPicks: Promise> }; function isPicksWithActive(obj: unknown): obj is PicksWithActive { const candidate = obj as PicksWithActive; diff --git a/src/vs/platform/quickinput/browser/quickAccess.ts b/src/vs/platform/quickinput/browser/quickAccess.ts index cf29d5ae6020c..b2ed573cc7216 100644 --- a/src/vs/platform/quickinput/browser/quickAccess.ts +++ b/src/vs/platform/quickinput/browser/quickAccess.ts @@ -20,9 +20,9 @@ export class QuickAccessController extends Disposable implements IQuickAccessCon private readonly lastAcceptedPickerValues = new Map(); private visibleQuickAccess: { - picker: IQuickPick, - descriptor: IQuickAccessProviderDescriptor | undefined, - value: string + picker: IQuickPick; + descriptor: IQuickAccessProviderDescriptor | undefined; + value: string; } | undefined = undefined; constructor( diff --git a/src/vs/platform/remote/common/remoteAgentConnection.ts b/src/vs/platform/remote/common/remoteAgentConnection.ts index ea36807a8eee1..2f35bafb7dc53 100644 --- a/src/vs/platform/remote/common/remoteAgentConnection.ts +++ b/src/vs/platform/remote/common/remoteAgentConnection.ts @@ -224,7 +224,7 @@ function raceWithTimeoutCancellation(promise: Promise, timeoutCancellation return result.promise; } -async function connectToRemoteExtensionHostAgent(options: ISimpleConnectionOptions, connectionType: ConnectionType, args: any | undefined, timeoutCancellationToken: CancellationToken): Promise<{ protocol: PersistentProtocol; ownsProtocol: boolean; }> { +async function connectToRemoteExtensionHostAgent(options: ISimpleConnectionOptions, connectionType: ConnectionType, args: any | undefined, timeoutCancellationToken: CancellationToken): Promise<{ protocol: PersistentProtocol; ownsProtocol: boolean }> { const logPrefix = connectLogPrefix(options, connectionType); options.logService.trace(`${logPrefix} 1/6. invoking socketFactory.connect().`); @@ -315,11 +315,11 @@ interface IManagementConnectionResult { protocol: PersistentProtocol; } -async function connectToRemoteExtensionHostAgentAndReadOneMessage(options: ISimpleConnectionOptions, connectionType: ConnectionType, args: any | undefined, timeoutCancellationToken: CancellationToken): Promise<{ protocol: PersistentProtocol; firstMessage: T; }> { +async function connectToRemoteExtensionHostAgentAndReadOneMessage(options: ISimpleConnectionOptions, connectionType: ConnectionType, args: any | undefined, timeoutCancellationToken: CancellationToken): Promise<{ protocol: PersistentProtocol; firstMessage: T }> { const startTime = Date.now(); const logPrefix = connectLogPrefix(options, connectionType); const { protocol, ownsProtocol } = await connectToRemoteExtensionHostAgent(options, connectionType, args, timeoutCancellationToken); - const result = new PromiseWithTimeout<{ protocol: PersistentProtocol; firstMessage: T; }>(timeoutCancellationToken); + const result = new PromiseWithTimeout<{ protocol: PersistentProtocol; firstMessage: T }>(timeoutCancellationToken); result.registerDisposable(protocol.onControlMessage(raw => { const msg: T = JSON.parse(raw.toString()); const error = getErrorFromMessage(msg); @@ -351,7 +351,7 @@ export interface IRemoteExtensionHostStartParams { debugId?: string; break?: boolean; port?: number | null; - env?: { [key: string]: string | null; }; + env?: { [key: string]: string | null }; } interface IExtensionHostConnectionResult { @@ -360,7 +360,7 @@ interface IExtensionHostConnectionResult { } async function doConnectRemoteAgentExtensionHost(options: ISimpleConnectionOptions, startArguments: IRemoteExtensionHostStartParams, timeoutCancellationToken: CancellationToken): Promise { - const { protocol, firstMessage } = await connectToRemoteExtensionHostAgentAndReadOneMessage<{ debugPort?: number; }>(options, ConnectionType.ExtensionHost, startArguments, timeoutCancellationToken); + const { protocol, firstMessage } = await connectToRemoteExtensionHostAgentAndReadOneMessage<{ debugPort?: number }>(options, ConnectionType.ExtensionHost, startArguments, timeoutCancellationToken); const debugPort = firstMessage && firstMessage.debugPort; return { protocol, debugPort }; } diff --git a/src/vs/platform/remote/common/remoteAuthorityResolver.ts b/src/vs/platform/remote/common/remoteAuthorityResolver.ts index fb899410b07db..f394d3bbbecfe 100644 --- a/src/vs/platform/remote/common/remoteAuthorityResolver.ts +++ b/src/vs/platform/remote/common/remoteAuthorityResolver.ts @@ -19,12 +19,12 @@ export interface ResolvedAuthority { export interface ResolvedOptions { readonly extensionHostEnv?: { [key: string]: string | null }; readonly isTrusted?: boolean; - readonly authenticationSession?: { id: string, providerId: string }; + readonly authenticationSession?: { id: string; providerId: string }; } export interface TunnelDescription { - remoteAddress: { port: number, host: string }; - localAddress: { port: number, host: string } | string; + remoteAddress: { port: number; host: string }; + localAddress: { port: number; host: string } | string; privacy?: string; protocol?: string; } @@ -39,7 +39,7 @@ export interface TunnelInformation { elevation: boolean; public?: boolean; privacyOptions: TunnelPrivacy[]; - } + }; } export interface ResolverResult { diff --git a/src/vs/platform/sharedProcess/electron-browser/sharedProcessWorkerMain.ts b/src/vs/platform/sharedProcess/electron-browser/sharedProcessWorkerMain.ts index 219eca7dc3f56..e8ec1756bb7e1 100644 --- a/src/vs/platform/sharedProcess/electron-browser/sharedProcessWorkerMain.ts +++ b/src/vs/platform/sharedProcess/electron-browser/sharedProcessWorkerMain.ts @@ -142,7 +142,7 @@ class SharedProcessWorkerProcess extends Disposable { // Handle termination that happens from the process // itself. This can either be a crash or the process // not being long running. - const onExit = Event.fromNodeEventEmitter<{ code: number | null, signal: NodeJS.Signals | null }>(this.child, 'exit', (code: number | null, signal: NodeJS.Signals | null) => ({ code, signal })); + const onExit = Event.fromNodeEventEmitter<{ code: number | null; signal: NodeJS.Signals | null }>(this.child, 'exit', (code: number | null, signal: NodeJS.Signals | null) => ({ code, signal })); this._register(onExit(({ code, signal }) => { const logMsg = `Worker process with pid ${this.child?.pid} terminated by itself with code ${code}, signal: ${signal} (type: ${this.configuration.process.type}, window: ${this.configuration.reply.windowId})`; if (code !== 0 && signal !== 'SIGTERM') { diff --git a/src/vs/platform/sharedProcess/electron-browser/sharedProcessWorkerService.ts b/src/vs/platform/sharedProcess/electron-browser/sharedProcessWorkerService.ts index 39d09c554ca5c..4aa130c3aa2a6 100644 --- a/src/vs/platform/sharedProcess/electron-browser/sharedProcessWorkerService.ts +++ b/src/vs/platform/sharedProcess/electron-browser/sharedProcessWorkerService.ts @@ -155,7 +155,7 @@ export class SharedProcessWorkerService implements ISharedProcessWorkerService { class SharedProcessWebWorker extends Disposable { - private readonly _onDidProcessSelfTerminate = this._register(new Emitter<{ configuration: ISharedProcessWorkerConfiguration, reason: ISharedProcessWorkerProcessExit }>()); + private readonly _onDidProcessSelfTerminate = this._register(new Emitter<{ configuration: ISharedProcessWorkerConfiguration; reason: ISharedProcessWorkerProcessExit }>()); readonly onDidProcessSelfTerminate = this._onDidProcessSelfTerminate.event; private readonly workerReady: Promise = this.doInit(); diff --git a/src/vs/platform/sharedProcess/electron-main/sharedProcess.ts b/src/vs/platform/sharedProcess/electron-main/sharedProcess.ts index 1f75cf92d1880..fc7f4bf0b58c6 100644 --- a/src/vs/platform/sharedProcess/electron-main/sharedProcess.ts +++ b/src/vs/platform/sharedProcess/electron-main/sharedProcess.ts @@ -29,7 +29,7 @@ export class SharedProcess extends Disposable implements ISharedProcess { private window: BrowserWindow | undefined = undefined; private windowCloseListener: ((event: ElectronEvent) => void) | undefined = undefined; - private readonly _onDidError = this._register(new Emitter<{ type: WindowError, details?: { reason: string, exitCode: number } }>()); + private readonly _onDidError = this._register(new Emitter<{ type: WindowError; details?: { reason: string; exitCode: number } }>()); readonly onDidError = Event.buffer(this._onDidError.event); // buffer until we have a listener! constructor( diff --git a/src/vs/platform/state/electron-main/state.ts b/src/vs/platform/state/electron-main/state.ts index 8d498194eb603..d50e7888a41d8 100644 --- a/src/vs/platform/state/electron-main/state.ts +++ b/src/vs/platform/state/electron-main/state.ts @@ -15,7 +15,7 @@ export interface IStateMainService { getItem(key: string, defaultValue?: T): T | undefined; setItem(key: string, data?: object | string | number | boolean | undefined | null): void; - setItems(items: readonly { key: string, data?: object | string | number | boolean | undefined | null }[]): void; + setItems(items: readonly { key: string; data?: object | string | number | boolean | undefined | null }[]): void; removeItem(key: string): void; diff --git a/src/vs/platform/state/electron-main/stateMainService.ts b/src/vs/platform/state/electron-main/stateMainService.ts index 5fe2d26a2c6ae..3b3d0ea7557dc 100644 --- a/src/vs/platform/state/electron-main/stateMainService.ts +++ b/src/vs/platform/state/electron-main/stateMainService.ts @@ -13,7 +13,7 @@ import { FileOperationError, FileOperationResult, IFileService } from 'vs/platfo import { ILogService } from 'vs/platform/log/common/log'; import { IStateMainService } from 'vs/platform/state/electron-main/state'; -type StorageDatabase = { [key: string]: unknown; }; +type StorageDatabase = { [key: string]: unknown }; export class FileStorage { @@ -66,7 +66,7 @@ export class FileStorage { this.setItems([{ key, data }]); } - setItems(items: readonly { key: string, data?: object | string | number | boolean | undefined | null }[]): void { + setItems(items: readonly { key: string; data?: object | string | number | boolean | undefined | null }[]): void { let save = false; for (const { key, data } of items) { @@ -175,7 +175,7 @@ export class StateMainService implements IStateMainService { this.fileStorage.setItem(key, data); } - setItems(items: readonly { key: string, data?: object | string | number | boolean | undefined | null }[]): void { + setItems(items: readonly { key: string; data?: object | string | number | boolean | undefined | null }[]): void { this.fileStorage.setItems(items); } diff --git a/src/vs/platform/storage/common/storage.ts b/src/vs/platform/storage/common/storage.ts index a36597555f956..ae6fdd83e086e 100644 --- a/src/vs/platform/storage/common/storage.ts +++ b/src/vs/platform/storage/common/storage.ts @@ -218,7 +218,7 @@ export interface IStorageTargetChangeEvent { } interface IKeyTargets { - [key: string]: StorageTarget + [key: string]: StorageTarget; } export interface IStorageServiceOptions { @@ -564,7 +564,7 @@ export async function logStorage(global: Map, workspace: Map { globalValues.push({ key, value }); }); @@ -574,7 +574,7 @@ export async function logStorage(global: Map, workspace: Map { workspaceValues.push({ key, value }); }); diff --git a/src/vs/platform/storage/common/storageIpc.ts b/src/vs/platform/storage/common/storageIpc.ts index a95938a3ae5e8..b2c0164e8c1d4 100644 --- a/src/vs/platform/storage/common/storageIpc.ts +++ b/src/vs/platform/storage/common/storageIpc.ts @@ -14,7 +14,7 @@ export type Value = string; export type Item = [Key, Value]; export interface IBaseSerializableStorageRequest { - readonly workspace: ISerializedWorkspaceIdentifier | ISerializedSingleFolderWorkspaceIdentifier | IEmptyWorkspaceIdentifier | undefined + readonly workspace: ISerializedWorkspaceIdentifier | ISerializedSingleFolderWorkspaceIdentifier | IEmptyWorkspaceIdentifier | undefined; } export interface ISerializableUpdateRequest extends IBaseSerializableStorageRequest { diff --git a/src/vs/platform/storage/electron-main/storageMain.ts b/src/vs/platform/storage/electron-main/storageMain.ts index 21bf291b5e9c1..f6a11499f5fc2 100644 --- a/src/vs/platform/storage/electron-main/storageMain.ts +++ b/src/vs/platform/storage/electron-main/storageMain.ts @@ -270,7 +270,7 @@ export class WorkspaceStorageMain extends BaseStorageMain implements IStorageMai }), { hint: wasCreated ? StorageHint.STORAGE_DOES_NOT_EXIST : undefined }); } - private async prepareWorkspaceStorageFolder(): Promise<{ storageFilePath: string, wasCreated: boolean }> { + private async prepareWorkspaceStorageFolder(): Promise<{ storageFilePath: string; wasCreated: boolean }> { // Return early if using inMemory storage if (this.options.useInMemoryStorage) { diff --git a/src/vs/platform/storage/test/common/storageService.test.ts b/src/vs/platform/storage/test/common/storageService.test.ts index 6406c6ff61055..553bf7bdf638e 100644 --- a/src/vs/platform/storage/test/common/storageService.test.ts +++ b/src/vs/platform/storage/test/common/storageService.test.ts @@ -6,7 +6,7 @@ import { ok, strictEqual } from 'assert'; import { InMemoryStorageService, IStorageService, IStorageTargetChangeEvent, IStorageValueChangeEvent, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; -export function createSuite(params: { setup: () => Promise, teardown: (service: T) => Promise }): void { +export function createSuite(params: { setup: () => Promise; teardown: (service: T) => Promise }): void { let storageService: T; diff --git a/src/vs/platform/storage/test/electron-main/storageMainService.test.ts b/src/vs/platform/storage/test/electron-main/storageMainService.test.ts index 782140d4e997a..2788312de193c 100644 --- a/src/vs/platform/storage/test/electron-main/storageMainService.test.ts +++ b/src/vs/platform/storage/test/electron-main/storageMainService.test.ts @@ -66,7 +66,7 @@ suite('StorageMainService', function () { registerWindow(window: ICodeWindow): void { } async reload(window: ICodeWindow, cli?: NativeParsedArgs): Promise { } async unload(window: ICodeWindow, reason: UnloadReason): Promise { return true; } - async relaunch(options?: { addArgs?: string[] | undefined; removeArgs?: string[] | undefined; }): Promise { } + async relaunch(options?: { addArgs?: string[] | undefined; removeArgs?: string[] | undefined }): Promise { } async quit(willRestart?: boolean): Promise { return true; } async kill(code?: number): Promise { } async when(phase: LifecycleMainPhase): Promise { } diff --git a/src/vs/platform/telemetry/common/commonProperties.ts b/src/vs/platform/telemetry/common/commonProperties.ts index 4a704e9c62822..06bd318a5ebba 100644 --- a/src/vs/platform/telemetry/common/commonProperties.ts +++ b/src/vs/platform/telemetry/common/commonProperties.ts @@ -28,8 +28,8 @@ export async function resolveCommonProperties( msftInternalDomains: string[] | undefined, installSourcePath: string, product?: string -): Promise<{ [name: string]: string | boolean | undefined; }> { - const result: { [name: string]: string | boolean | undefined; } = Object.create(null); +): Promise<{ [name: string]: string | boolean | undefined }> { + const result: { [name: string]: string | boolean | undefined } = Object.create(null); // __GDPR__COMMON__ "common.machineId" : { "endPoint": "MacAddressHash", "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } result['common.machineId'] = machineId; diff --git a/src/vs/platform/telemetry/common/errorTelemetry.ts b/src/vs/platform/telemetry/common/errorTelemetry.ts index 78d3e442a47fa..75af33cb15052 100644 --- a/src/vs/platform/telemetry/common/errorTelemetry.ts +++ b/src/vs/platform/telemetry/common/errorTelemetry.ts @@ -10,14 +10,14 @@ import { safeStringify } from 'vs/base/common/objects'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; type ErrorEventFragment = { - callstack: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth' }; - msg?: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth' }; - file?: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth' }; - line?: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth', isMeasurement: true }; - column?: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth', isMeasurement: true }; - uncaught_error_name?: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth' }; - uncaught_error_msg?: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth' }; - count?: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth', isMeasurement: true }; + callstack: { classification: 'CallstackOrException'; purpose: 'PerformanceAndHealth' }; + msg?: { classification: 'CallstackOrException'; purpose: 'PerformanceAndHealth' }; + file?: { classification: 'CallstackOrException'; purpose: 'PerformanceAndHealth' }; + line?: { classification: 'CallstackOrException'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + column?: { classification: 'CallstackOrException'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + uncaught_error_name?: { classification: 'CallstackOrException'; purpose: 'PerformanceAndHealth' }; + uncaught_error_msg?: { classification: 'CallstackOrException'; purpose: 'PerformanceAndHealth' }; + count?: { classification: 'CallstackOrException'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; }; export interface ErrorEvent { callstack: string; diff --git a/src/vs/platform/telemetry/common/telemetryService.ts b/src/vs/platform/telemetry/common/telemetryService.ts index b6b7ea69d7e6f..8d28b03b4cc12 100644 --- a/src/vs/platform/telemetry/common/telemetryService.ts +++ b/src/vs/platform/telemetry/common/telemetryService.ts @@ -31,7 +31,7 @@ export class TelemetryService implements ITelemetryService { declare readonly _serviceBrand: undefined; private _appenders: ITelemetryAppender[]; - private _commonProperties: Promise<{ [name: string]: any; }>; + private _commonProperties: Promise<{ [name: string]: any }>; private _experimentProperties: { [name: string]: string } = {}; private _piiPaths: string[]; private _telemetryLevel: TelemetryLevel; @@ -61,7 +61,7 @@ export class TelemetryService implements ITelemetryService { this._updateTelemetryLevel(); this._configurationService.onDidChangeConfiguration(this._updateTelemetryLevel, this, this._disposables); type OptInClassification = { - optIn: { classification: 'SystemMetaData', purpose: 'BusinessInsight', isMeasurement: true }; + optIn: { classification: 'SystemMetaData'; purpose: 'BusinessInsight'; isMeasurement: true }; }; type OptInEvent = { optIn: boolean; diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index 7c5777a2528e8..41aa8481812b7 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -82,8 +82,8 @@ export function configurationTelemetry(telemetryService: ITelemetryService, conf return configurationService.onDidChangeConfiguration(event => { if (event.source !== ConfigurationTarget.DEFAULT) { type UpdateConfigurationClassification = { - configurationSource: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - configurationKeys: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + configurationSource: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + configurationKeys: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; type UpdateConfigurationEvent = { configurationSource: string; @@ -148,7 +148,7 @@ export interface Measurements { [key: string]: number; } -export function validateTelemetryData(data?: any): { properties: Properties, measurements: Measurements } { +export function validateTelemetryData(data?: any): { properties: Properties; measurements: Measurements } { const properties: Properties = Object.create(null); const measurements: Measurements = Object.create(null); diff --git a/src/vs/platform/terminal/common/terminal.ts b/src/vs/platform/terminal/common/terminal.ts index 9d93252fd1f66..ab36115559b67 100644 --- a/src/vs/platform/terminal/common/terminal.ts +++ b/src/vs/platform/terminal/common/terminal.ts @@ -196,19 +196,19 @@ export const enum ProcessPropertyType { } export interface IProcessProperty { - type: T, - value: IProcessPropertyMap[T] + type: T; + value: IProcessPropertyMap[T]; } export interface IProcessPropertyMap { - [ProcessPropertyType.Cwd]: string, - [ProcessPropertyType.InitialCwd]: string, - [ProcessPropertyType.FixedDimensions]: IFixedTerminalDimensions, - [ProcessPropertyType.Title]: string - [ProcessPropertyType.ShellType]: TerminalShellType | undefined, - [ProcessPropertyType.HasChildProcesses]: boolean, - [ProcessPropertyType.ResolvedShellLaunchConfig]: IShellLaunchConfig, - [ProcessPropertyType.OverrideDimensions]: ITerminalDimensionsOverride | undefined + [ProcessPropertyType.Cwd]: string; + [ProcessPropertyType.InitialCwd]: string; + [ProcessPropertyType.FixedDimensions]: IFixedTerminalDimensions; + [ProcessPropertyType.Title]: string; + [ProcessPropertyType.ShellType]: TerminalShellType | undefined; + [ProcessPropertyType.HasChildProcesses]: boolean; + [ProcessPropertyType.ResolvedShellLaunchConfig]: IShellLaunchConfig; + [ProcessPropertyType.OverrideDimensions]: ITerminalDimensionsOverride | undefined; } export interface IFixedTerminalDimensions { @@ -237,13 +237,13 @@ export interface IPtyHostController { export interface IPtyService extends IPtyHostController { readonly _serviceBrand: undefined; - readonly onProcessData: Event<{ id: number, event: IProcessDataEvent | string }>; - readonly onProcessReady: Event<{ id: number, event: IProcessReadyEvent }>; - readonly onProcessReplay: Event<{ id: number, event: IPtyHostProcessReplayEvent }>; + readonly onProcessData: Event<{ id: number; event: IProcessDataEvent | string }>; + readonly onProcessReady: Event<{ id: number; event: IProcessReadyEvent }>; + readonly onProcessReplay: Event<{ id: number; event: IPtyHostProcessReplayEvent }>; readonly onProcessOrphanQuestion: Event<{ id: number }>; - readonly onDidRequestDetach: Event<{ requestId: number, workspaceId: string, instanceId: number }>; - readonly onDidChangeProperty: Event<{ id: number, property: IProcessProperty }> - readonly onProcessExit: Event<{ id: number, event: number | undefined }>; + readonly onDidRequestDetach: Event<{ requestId: number; workspaceId: string; instanceId: number }>; + readonly onDidChangeProperty: Event<{ id: number; property: IProcessProperty }>; + readonly onProcessExit: Event<{ id: number; event: number | undefined }>; restartPtyHost?(): Promise; shutdownAll?(): Promise; @@ -437,7 +437,7 @@ export interface IShellLaunchConfig { /** * This is a terminal that attaches to an already running terminal. */ - attachPersistentProcess?: { id: number; pid: number; title: string; titleSource: TitleEventSource; cwd: string; icon?: TerminalIcon; color?: string, hasChildProcesses?: boolean, fixedDimensions?: IFixedTerminalDimensions }; + attachPersistentProcess?: { id: number; pid: number; title: string; titleSource: TitleEventSource; cwd: string; icon?: TerminalIcon; color?: string; hasChildProcesses?: boolean; fixedDimensions?: IFixedTerminalDimensions }; /** * Whether the terminal process environment should be exactly as provided in @@ -506,9 +506,9 @@ export interface IShellLaunchConfig { } export interface ICreateContributedTerminalProfileOptions { - icon?: URI | string | { light: URI, dark: URI }; + icon?: URI | string | { light: URI; dark: URI }; color?: string; - location?: TerminalLocation | { viewColumn: number, preserveState?: boolean } | { splitActiveTerminal: boolean }; + location?: TerminalLocation | { viewColumn: number; preserveState?: boolean } | { splitActiveTerminal: boolean }; } export enum TerminalLocation { @@ -543,9 +543,9 @@ export interface ITerminalLaunchError { } export interface IProcessReadyEvent { - pid: number, - cwd: string, - requiresWindowsMode?: boolean + pid: number; + cwd: string; + requiresWindowsMode?: boolean; } /** @@ -690,7 +690,7 @@ export interface ITerminalProfile { env?: ITerminalEnvironment; overrideName?: boolean; color?: string; - icon?: ThemeIcon | URI | { light: URI, dark: URI }; + icon?: ThemeIcon | URI | { light: URI; dark: URI }; } export interface ITerminalDimensionsOverride extends Readonly { @@ -709,7 +709,7 @@ export interface IBaseUnresolvedTerminalProfile { args?: string | string[] | undefined; isAutoDetected?: boolean; overrideName?: boolean; - icon?: string | ThemeIcon | URI | { light: URI, dark: URI }; + icon?: string | ThemeIcon | URI | { light: URI; dark: URI }; color?: string; env?: ITerminalEnvironment; } @@ -730,7 +730,7 @@ export interface ITerminalContributions { export interface ITerminalProfileContribution { title: string; id: string; - icon?: URI | { light: URI, dark: URI } | string; + icon?: URI | { light: URI; dark: URI } | string; color?: string; } diff --git a/src/vs/platform/terminal/common/terminalPlatformConfiguration.ts b/src/vs/platform/terminal/common/terminalPlatformConfiguration.ts index eeb4bcbe56946..25e0f2b934f16 100644 --- a/src/vs/platform/terminal/common/terminalPlatformConfiguration.ts +++ b/src/vs/platform/terminal/common/terminalPlatformConfiguration.ts @@ -475,7 +475,7 @@ export function registerTerminalPlatformConfiguration() { } let defaultProfilesConfiguration: IConfigurationNode | undefined; -export function registerTerminalDefaultProfileConfiguration(detectedProfiles?: { os: OperatingSystem, profiles: ITerminalProfile[] }, extensionContributedProfiles?: readonly IExtensionTerminalProfile[]) { +export function registerTerminalDefaultProfileConfiguration(detectedProfiles?: { os: OperatingSystem; profiles: ITerminalProfile[] }, extensionContributedProfiles?: readonly IExtensionTerminalProfile[]) { const registry = Registry.as(Extensions.Configuration); let profileEnum; if (detectedProfiles) { diff --git a/src/vs/platform/terminal/common/terminalProcess.ts b/src/vs/platform/terminal/common/terminalProcess.ts index 8c5eeedfb82ae..d32d309235bf9 100644 --- a/src/vs/platform/terminal/common/terminalProcess.ts +++ b/src/vs/platform/terminal/common/terminalProcess.ts @@ -63,7 +63,7 @@ export interface IProcessDetails { export type ITerminalTabLayoutInfoDto = IRawTerminalTabLayoutInfo; -export interface ReplayEntry { cols: number; rows: number; data: string; } +export interface ReplayEntry { cols: number; rows: number; data: string } export interface IPtyHostProcessReplayEvent { events: ReplayEntry[]; } diff --git a/src/vs/platform/terminal/common/terminalProfiles.ts b/src/vs/platform/terminal/common/terminalProfiles.ts index 970db1c3b28fc..1b4d411e501b1 100644 --- a/src/vs/platform/terminal/common/terminalProfiles.ts +++ b/src/vs/platform/terminal/common/terminalProfiles.ts @@ -9,8 +9,8 @@ import { IExtensionTerminalProfile, ITerminalProfile, TerminalIcon } from 'vs/pl import { ThemeIcon } from 'vs/platform/theme/common/themeService'; export function createProfileSchemaEnums(detectedProfiles: ITerminalProfile[], extensionProfiles?: readonly IExtensionTerminalProfile[]): { - values: string[] | undefined, - markdownDescriptions: string[] | undefined + values: string[] | undefined; + markdownDescriptions: string[] | undefined; } { const result = detectedProfiles.map(e => { return { @@ -90,16 +90,16 @@ export function terminalIconsEqual(iconOne?: TerminalIcon, iconTwo?: TerminalIco } if (typeof iconOne === 'object' && iconOne && 'light' in iconOne && 'dark' in iconOne && typeof iconTwo === 'object' && iconTwo && 'light' in iconTwo && 'dark' in iconTwo) { - const castedIcon = (iconOne as { light: unknown, dark: unknown }); - const castedIconTwo = (iconTwo as { light: unknown, dark: unknown }); + const castedIcon = (iconOne as { light: unknown; dark: unknown }); + const castedIconTwo = (iconTwo as { light: unknown; dark: unknown }); if ((URI.isUri(castedIcon.light) || isUriComponents(castedIcon.light)) && (URI.isUri(castedIcon.dark) || isUriComponents(castedIcon.dark)) && (URI.isUri(castedIconTwo.light) || isUriComponents(castedIconTwo.light)) && (URI.isUri(castedIconTwo.dark) || isUriComponents(castedIconTwo.dark))) { return castedIcon.light.path === castedIconTwo.light.path && castedIcon.dark.path === castedIconTwo.dark.path; } } if ((URI.isUri(iconOne) && URI.isUri(iconTwo)) || (isUriComponents(iconOne) || isUriComponents(iconTwo))) { - const castedIcon = (iconOne as { scheme: unknown, path: unknown }); - const castedIconTwo = (iconTwo as { scheme: unknown, path: unknown }); + const castedIcon = (iconOne as { scheme: unknown; path: unknown }); + const castedIconTwo = (iconTwo as { scheme: unknown; path: unknown }); return castedIcon.path === castedIconTwo.path && castedIcon.scheme === castedIconTwo.scheme; } diff --git a/src/vs/platform/terminal/node/ptyHostService.ts b/src/vs/platform/terminal/node/ptyHostService.ts index e64e1f5ec2eb5..2dac7c6a3e4b8 100644 --- a/src/vs/platform/terminal/node/ptyHostService.ts +++ b/src/vs/platform/terminal/node/ptyHostService.ts @@ -44,7 +44,7 @@ export class PtyHostService extends Disposable implements IPtyService { private _proxy: IPtyService; private readonly _shellEnv: Promise; - private readonly _resolveVariablesRequestStore: RequestStore; + private readonly _resolveVariablesRequestStore: RequestStore; private _restartCount = 0; private _isResponsive = true; private _isDisposed = false; @@ -62,19 +62,19 @@ export class PtyHostService extends Disposable implements IPtyService { private readonly _onPtyHostRequestResolveVariables = this._register(new Emitter()); readonly onPtyHostRequestResolveVariables = this._onPtyHostRequestResolveVariables.event; - private readonly _onProcessData = this._register(new Emitter<{ id: number, event: IProcessDataEvent | string }>()); + private readonly _onProcessData = this._register(new Emitter<{ id: number; event: IProcessDataEvent | string }>()); readonly onProcessData = this._onProcessData.event; - private readonly _onProcessReady = this._register(new Emitter<{ id: number, event: { pid: number, cwd: string } }>()); + private readonly _onProcessReady = this._register(new Emitter<{ id: number; event: { pid: number; cwd: string } }>()); readonly onProcessReady = this._onProcessReady.event; - private readonly _onProcessReplay = this._register(new Emitter<{ id: number, event: IPtyHostProcessReplayEvent }>()); + private readonly _onProcessReplay = this._register(new Emitter<{ id: number; event: IPtyHostProcessReplayEvent }>()); readonly onProcessReplay = this._onProcessReplay.event; private readonly _onProcessOrphanQuestion = this._register(new Emitter<{ id: number }>()); readonly onProcessOrphanQuestion = this._onProcessOrphanQuestion.event; - private readonly _onDidRequestDetach = this._register(new Emitter<{ requestId: number, workspaceId: string, instanceId: number }>()); + private readonly _onDidRequestDetach = this._register(new Emitter<{ requestId: number; workspaceId: string; instanceId: number }>()); readonly onDidRequestDetach = this._onDidRequestDetach.event; - private readonly _onDidChangeProperty = this._register(new Emitter<{ id: number, property: IProcessProperty }>()); + private readonly _onDidChangeProperty = this._register(new Emitter<{ id: number; property: IProcessProperty }>()); readonly onDidChangeProperty = this._onDidChangeProperty.event; - private readonly _onProcessExit = this._register(new Emitter<{ id: number, event: number | undefined }>()); + private readonly _onProcessExit = this._register(new Emitter<{ id: number; event: number | undefined }>()); readonly onProcessExit = this._onProcessExit.event; constructor( diff --git a/src/vs/platform/terminal/node/ptyService.ts b/src/vs/platform/terminal/node/ptyService.ts index ad34064144c1e..e89a72d589209 100644 --- a/src/vs/platform/terminal/node/ptyService.ts +++ b/src/vs/platform/terminal/node/ptyService.ts @@ -35,26 +35,26 @@ export class PtyService extends Disposable implements IPtyService { private readonly _ptys: Map = new Map(); private readonly _workspaceLayoutInfos = new Map(); - private readonly _detachInstanceRequestStore: RequestStore; - private readonly _revivedPtyIdMap: Map = new Map(); + private readonly _detachInstanceRequestStore: RequestStore; + private readonly _revivedPtyIdMap: Map = new Map(); private readonly _autoReplies: Map = new Map(); private readonly _onHeartbeat = this._register(new Emitter()); readonly onHeartbeat = this._onHeartbeat.event; - private readonly _onProcessData = this._register(new Emitter<{ id: number, event: IProcessDataEvent | string }>()); + private readonly _onProcessData = this._register(new Emitter<{ id: number; event: IProcessDataEvent | string }>()); readonly onProcessData = this._onProcessData.event; - private readonly _onProcessReplay = this._register(new Emitter<{ id: number, event: IPtyHostProcessReplayEvent }>()); + private readonly _onProcessReplay = this._register(new Emitter<{ id: number; event: IPtyHostProcessReplayEvent }>()); readonly onProcessReplay = this._onProcessReplay.event; - private readonly _onProcessReady = this._register(new Emitter<{ id: number, event: { pid: number, cwd: string } }>()); + private readonly _onProcessReady = this._register(new Emitter<{ id: number; event: { pid: number; cwd: string } }>()); readonly onProcessReady = this._onProcessReady.event; - private readonly _onProcessExit = this._register(new Emitter<{ id: number, event: number | undefined }>()); + private readonly _onProcessExit = this._register(new Emitter<{ id: number; event: number | undefined }>()); readonly onProcessExit = this._onProcessExit.event; private readonly _onProcessOrphanQuestion = this._register(new Emitter<{ id: number }>()); readonly onProcessOrphanQuestion = this._onProcessOrphanQuestion.event; - private readonly _onDidRequestDetach = this._register(new Emitter<{ requestId: number, workspaceId: string, instanceId: number }>()); + private readonly _onDidRequestDetach = this._register(new Emitter<{ requestId: number; workspaceId: string; instanceId: number }>()); readonly onDidRequestDetach = this._onDidRequestDetach.event; - private readonly _onDidChangeProperty = this._register(new Emitter<{ id: number, property: IProcessProperty }>()); + private readonly _onDidChangeProperty = this._register(new Emitter<{ id: number; property: IProcessProperty }>()); readonly onDidChangeProperty = this._onDidChangeProperty.event; constructor( @@ -218,7 +218,7 @@ export class PtyService extends Disposable implements IPtyService { this._throwIfNoPty(id).setTitle(title, titleSource); } - async updateIcon(id: number, icon: URI | { light: URI; dark: URI } | { id: string, color?: { id: string } }, color?: string): Promise { + async updateIcon(id: number, icon: URI | { light: URI; dark: URI } | { id: string; color?: { id: string } }, color?: string): Promise { this._throwIfNoPty(id).setIcon(icon, color); } @@ -410,7 +410,7 @@ export class PersistentTerminalProcess extends Disposable { private readonly _bufferer: TerminalDataBufferer; private readonly _autoReplies: Map = new Map(); - private readonly _pendingCommands = new Map void; reject: (err: any) => void; }>(); + private readonly _pendingCommands = new Map void; reject: (err: any) => void }>(); private _isStarted: boolean = false; private _hasWrittenData: boolean = false; diff --git a/src/vs/platform/terminal/node/terminalProcess.ts b/src/vs/platform/terminal/node/terminalProcess.ts index 8c37020f6b5fc..b30e5c07374ea 100644 --- a/src/vs/platform/terminal/node/terminalProcess.ts +++ b/src/vs/platform/terminal/node/terminalProcess.ts @@ -68,8 +68,8 @@ const enum Constants { } interface IWriteObject { - data: string, - isBinary: boolean + data: string; + isBinary: boolean; } export class TerminalProcess extends Disposable implements ITerminalChildProcess { @@ -149,7 +149,7 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess name, cwd, // TODO: When node-pty is updated this cast can be removed - env: env as { [key: string]: string; }, + env: env as { [key: string]: string }, cols, rows, useConpty, @@ -565,8 +565,8 @@ class DelayedResizer extends Disposable { cols: number | undefined; private _timeout: NodeJS.Timeout; - private readonly _onTrigger = this._register(new Emitter<{ rows?: number, cols?: number }>()); - get onTrigger(): Event<{ rows?: number, cols?: number }> { return this._onTrigger.event; } + private readonly _onTrigger = this._register(new Emitter<{ rows?: number; cols?: number }>()); + get onTrigger(): Event<{ rows?: number; cols?: number }> { return this._onTrigger.event; } constructor() { super(); diff --git a/src/vs/platform/terminal/node/terminalProfiles.ts b/src/vs/platform/terminal/node/terminalProfiles.ts index dce492a549bc3..2c44f2358a617 100644 --- a/src/vs/platform/terminal/node/terminalProfiles.ts +++ b/src/vs/platform/terminal/node/terminalProfiles.ts @@ -154,7 +154,7 @@ async function transformToTerminalProfiles( if (profile === null) { continue; } let originalPaths: string[]; let args: string[] | string | undefined; - let icon: ThemeIcon | URI | { light: URI, dark: URI } | undefined = undefined; + let icon: ThemeIcon | URI | { light: URI; dark: URI } | undefined = undefined; if ('source' in profile) { const source = profileSources?.get(profile.source); if (!source) { @@ -367,7 +367,7 @@ async function validateProfilePaths(profileName: string, defaultProfileName: str } export interface IFsProvider { - existsFile(path: string): Promise, + existsFile(path: string): Promise; readFile(path: string): Promise; } @@ -379,7 +379,7 @@ interface IPotentialTerminalProfile { profileName: string; paths: string[]; args?: string[]; - icon?: ThemeIcon | URI | { light: URI, dark: URI }; + icon?: ThemeIcon | URI | { light: URI; dark: URI }; } export type IUnresolvedTerminalProfile = ITerminalExecutable | ITerminalProfileSource | null; diff --git a/src/vs/platform/terminal/test/common/requestStore.test.ts b/src/vs/platform/terminal/test/common/requestStore.test.ts index 369e32adeb52d..4c6d04adefa2c 100644 --- a/src/vs/platform/terminal/test/common/requestStore.test.ts +++ b/src/vs/platform/terminal/test/common/requestStore.test.ts @@ -18,7 +18,7 @@ suite('RequestStore', () => { test('should resolve requests', async () => { const store: RequestStore<{ data: string }, { arg: string }> = instantiationService.createInstance(RequestStore, undefined); - let eventArgs: { requestId: number, arg: string } | undefined; + let eventArgs: { requestId: number; arg: string } | undefined; store.onCreateRequest(e => eventArgs = e); const request = store.createRequest({ arg: 'foo' }); strictEqual(typeof eventArgs?.requestId, 'number'); diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 0cdee079e32bc..75f4eb771a91e 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -50,7 +50,7 @@ export type ColorTransform = | { op: ColorTransformType.Transparent; value: ColorValue; factor: number } | { op: ColorTransformType.OneOf; values: readonly ColorValue[] } | { op: ColorTransformType.LessProminent; value: ColorValue; background: ColorValue; factor: number; transparency: number } - | { op: ColorTransformType.IfDefinedThenElse; if: ColorIdentifier; then: ColorValue, else: ColorValue }; + | { op: ColorTransformType.IfDefinedThenElse; if: ColorIdentifier; then: ColorValue; else: ColorValue }; export interface ColorDefaults { light: ColorValue | null; @@ -114,7 +114,7 @@ class ColorRegistry implements IColorRegistry { private colorsById: { [key: string]: ColorContribution }; private colorSchema: IJSONSchema & { properties: IJSONSchemaMap } = { type: 'object', properties: {} }; - private colorReferenceSchema: IJSONSchema & { enum: string[], enumDescriptions: string[] } = { type: 'string', enum: [], enumDescriptions: [] }; + private colorReferenceSchema: IJSONSchema & { enum: string[]; enumDescriptions: string[] } = { type: 'string', enum: [], enumDescriptions: [] }; constructor() { this.colorsById = {}; diff --git a/src/vs/platform/theme/common/iconRegistry.ts b/src/vs/platform/theme/common/iconRegistry.ts index 7bcc4024a8f9c..be499ee32fb5c 100644 --- a/src/vs/platform/theme/common/iconRegistry.ts +++ b/src/vs/platform/theme/common/iconRegistry.ts @@ -63,7 +63,7 @@ export interface IconFontDefinition { } export interface IconFontSource { - readonly location: URI, + readonly location: URI; readonly format: string; } @@ -143,7 +143,7 @@ class IconRegistry implements IIconRegistry { type: 'object', properties: {} }; - private iconReferenceSchema: IJSONSchema & { enum: string[], enumDescriptions: string[] } = { type: 'string', pattern: `^${CSSIcon.iconNameExpression}$`, enum: [], enumDescriptions: [] }; + private iconReferenceSchema: IJSONSchema & { enum: string[]; enumDescriptions: string[] } = { type: 'string', pattern: `^${CSSIcon.iconNameExpression}$`, enum: [], enumDescriptions: [] }; private iconFontsById: { [key: string]: IconFontDefinition }; diff --git a/src/vs/platform/theme/common/tokenClassificationRegistry.ts b/src/vs/platform/theme/common/tokenClassificationRegistry.ts index b171d0186a465..dad1375e27ba6 100644 --- a/src/vs/platform/theme/common/tokenClassificationRegistry.ts +++ b/src/vs/platform/theme/common/tokenClassificationRegistry.ts @@ -97,7 +97,7 @@ export namespace TokenStyle { export function is(s: any): s is TokenStyle { return s instanceof TokenStyle; } - export function fromData(data: { foreground: Color | undefined, bold: boolean | undefined, underline: boolean | undefined, strikethrough: boolean | undefined, italic: boolean | undefined }): TokenStyle { + export function fromData(data: { foreground: Color | undefined; bold: boolean | undefined; underline: boolean | undefined; strikethrough: boolean | undefined; italic: boolean | undefined }): TokenStyle { return new TokenStyle(data.foreground, data.bold, data.underline, data.strikethrough, data.italic); } export function fromSettings(foreground: string | undefined, fontStyle: string | undefined): TokenStyle; @@ -275,7 +275,7 @@ class TokenClassificationRegistry implements ITokenClassificationRegistry { private typeHierarchy: { [id: string]: string[] }; - private tokenStylingSchema: IJSONSchema & { properties: IJSONSchemaMap, patternProperties: IJSONSchemaMap } = { + private tokenStylingSchema: IJSONSchema & { properties: IJSONSchemaMap; patternProperties: IJSONSchemaMap } = { type: 'object', properties: {}, patternProperties: { @@ -488,9 +488,9 @@ class TokenClassificationRegistry implements ITokenClassificationRegistry { const CHAR_LANGUAGE = TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR.charCodeAt(0); const CHAR_MODIFIER = CLASSIFIER_MODIFIER_SEPARATOR.charCodeAt(0); -export function parseClassifierString(s: string, defaultLanguage: string): { type: string, modifiers: string[], language: string; }; -export function parseClassifierString(s: string, defaultLanguage?: string): { type: string, modifiers: string[], language: string | undefined; }; -export function parseClassifierString(s: string, defaultLanguage: string | undefined): { type: string, modifiers: string[], language: string | undefined; } { +export function parseClassifierString(s: string, defaultLanguage: string): { type: string; modifiers: string[]; language: string }; +export function parseClassifierString(s: string, defaultLanguage?: string): { type: string; modifiers: string[]; language: string | undefined }; +export function parseClassifierString(s: string, defaultLanguage: string | undefined): { type: string; modifiers: string[]; language: string | undefined } { let k = s.length; let language: string | undefined = defaultLanguage; const modifiers = []; diff --git a/src/vs/platform/theme/test/common/testThemeService.ts b/src/vs/platform/theme/test/common/testThemeService.ts index 4e317bbe7cfd7..6655be6e3609f 100644 --- a/src/vs/platform/theme/test/common/testThemeService.ts +++ b/src/vs/platform/theme/test/common/testThemeService.ts @@ -14,7 +14,7 @@ export class TestColorTheme implements IColorTheme { public readonly label = 'test'; constructor( - private colors: { [id: string]: string; } = {}, + private colors: { [id: string]: string } = {}, public type = ColorScheme.DARK, public readonly semanticHighlighting = false ) { } diff --git a/src/vs/platform/tunnel/common/tunnel.ts b/src/vs/platform/tunnel/common/tunnel.ts index f4a174e37cf29..c50a1195d3e55 100644 --- a/src/vs/platform/tunnel/common/tunnel.ts +++ b/src/vs/platform/tunnel/common/tunnel.ts @@ -27,7 +27,7 @@ export interface RemoteTunnel { } export interface TunnelOptions { - remoteAddress: { port: number, host: string; }; + remoteAddress: { port: number; host: string }; localAddressPort?: number; label?: string; public?: boolean; @@ -82,7 +82,7 @@ export interface PortAttributesProvider { } export interface ITunnel { - remoteAddress: { port: number, host: string }; + remoteAddress: { port: number; host: string }; /** * The complete local address(ex. localhost:1234) @@ -119,7 +119,7 @@ export interface ITunnelService { readonly canChangePrivacy: boolean; readonly privacyOptions: TunnelPrivacy[]; readonly onTunnelOpened: Event; - readonly onTunnelClosed: Event<{ host: string, port: number; }>; + readonly onTunnelClosed: Event<{ host: string; port: number }>; readonly canElevate: boolean; readonly hasTunnelProvider: boolean; readonly onAddedTunnelProvider: Event; @@ -131,7 +131,7 @@ export interface ITunnelService { setTunnelFeatures(features: TunnelProviderFeatures): void; } -export function extractLocalHostUriMetaDataForPortMapping(uri: URI): { address: string, port: number; } | undefined { +export function extractLocalHostUriMetaDataForPortMapping(uri: URI): { address: string; port: number } | undefined { if (uri.scheme !== 'http' && uri.scheme !== 'https') { return undefined; } @@ -168,11 +168,11 @@ export abstract class AbstractTunnelService implements ITunnelService { private _onTunnelOpened: Emitter = new Emitter(); public onTunnelOpened: Event = this._onTunnelOpened.event; - private _onTunnelClosed: Emitter<{ host: string, port: number; }> = new Emitter(); - public onTunnelClosed: Event<{ host: string, port: number; }> = this._onTunnelClosed.event; + private _onTunnelClosed: Emitter<{ host: string; port: number }> = new Emitter(); + public onTunnelClosed: Event<{ host: string; port: number }> = this._onTunnelClosed.event; private _onAddedTunnelProvider: Emitter = new Emitter(); public onAddedTunnelProvider: Event = this._onAddedTunnelProvider.event; - protected readonly _tunnels = new Map; }>>(); + protected readonly _tunnels = new Map }>>(); protected _tunnelProvider: ITunnelProvider | undefined; protected _canElevate: boolean = false; private _privacyOptions: TunnelPrivacy[] = []; @@ -307,7 +307,7 @@ export abstract class AbstractTunnelService implements ITunnelService { }; } - private async tryDisposeTunnel(remoteHost: string, remotePort: number, tunnel: { refcount: number, readonly value: Promise }): Promise { + private async tryDisposeTunnel(remoteHost: string, remotePort: number, tunnel: { refcount: number; readonly value: Promise }): Promise { if (tunnel.refcount <= 0) { this.logService.trace(`ForwardedPorts: (TunnelService) Tunnel is being disposed ${remoteHost}:${remotePort}.`); const disposePromise: Promise = tunnel.value.then(async (tunnel) => { @@ -354,7 +354,7 @@ export abstract class AbstractTunnelService implements ITunnelService { } } - protected getTunnelFromMap(remoteHost: string, remotePort: number): { refcount: number, readonly value: Promise } | undefined { + protected getTunnelFromMap(remoteHost: string, remotePort: number): { refcount: number; readonly value: Promise } | undefined { let hosts = [remoteHost]; // Order matters. We want the original host to be first. if (isLocalhost(remoteHost)) { diff --git a/src/vs/platform/undoRedo/common/undoRedoService.ts b/src/vs/platform/undoRedo/common/undoRedoService.ts index ba848b112a526..1dc749a9226aa 100644 --- a/src/vs/platform/undoRedo/common/undoRedoService.ts +++ b/src/vs/platform/undoRedo/common/undoRedoService.ts @@ -156,7 +156,7 @@ class WorkspaceStackElement { this.invalidatedResources = null; } - public canSplit(): this is WorkspaceStackElement & { actual: { split(): IResourceUndoRedoElement[]; } } { + public canSplit(): this is WorkspaceStackElement & { actual: { split(): IResourceUndoRedoElement[] } } { return (typeof this.actual.split === 'function'); } @@ -564,7 +564,7 @@ export class UndoRedoService implements IUndoRedoService { return null; } - private _splitPastWorkspaceElement(toRemove: WorkspaceStackElement & { actual: { split(): IResourceUndoRedoElement[]; } }, ignoreResources: RemovedResources | null): void { + private _splitPastWorkspaceElement(toRemove: WorkspaceStackElement & { actual: { split(): IResourceUndoRedoElement[] } }, ignoreResources: RemovedResources | null): void { const individualArr = toRemove.actual.split(); const individualMap = new Map(); for (const _element of individualArr) { @@ -583,7 +583,7 @@ export class UndoRedoService implements IUndoRedoService { } } - private _splitFutureWorkspaceElement(toRemove: WorkspaceStackElement & { actual: { split(): IResourceUndoRedoElement[]; } }, ignoreResources: RemovedResources | null): void { + private _splitFutureWorkspaceElement(toRemove: WorkspaceStackElement & { actual: { split(): IResourceUndoRedoElement[] } }, ignoreResources: RemovedResources | null): void { const individualArr = toRemove.actual.split(); const individualMap = new Map(); for (const _element of individualArr) { diff --git a/src/vs/platform/update/common/update.ts b/src/vs/platform/update/common/update.ts index ae027c2109ac8..9d8a09a7e89b5 100644 --- a/src/vs/platform/update/common/update.ts +++ b/src/vs/platform/update/common/update.ts @@ -50,13 +50,13 @@ export const enum UpdateType { } export type Uninitialized = { type: StateType.Uninitialized }; -export type Idle = { type: StateType.Idle, updateType: UpdateType, error?: string }; -export type CheckingForUpdates = { type: StateType.CheckingForUpdates, explicit: boolean }; -export type AvailableForDownload = { type: StateType.AvailableForDownload, update: IUpdate }; -export type Downloading = { type: StateType.Downloading, update: IUpdate }; -export type Downloaded = { type: StateType.Downloaded, update: IUpdate }; -export type Updating = { type: StateType.Updating, update: IUpdate }; -export type Ready = { type: StateType.Ready, update: IUpdate }; +export type Idle = { type: StateType.Idle; updateType: UpdateType; error?: string }; +export type CheckingForUpdates = { type: StateType.CheckingForUpdates; explicit: boolean }; +export type AvailableForDownload = { type: StateType.AvailableForDownload; update: IUpdate }; +export type Downloading = { type: StateType.Downloading; update: IUpdate }; +export type Downloaded = { type: StateType.Downloaded; update: IUpdate }; +export type Updating = { type: StateType.Updating; update: IUpdate }; +export type Ready = { type: StateType.Ready; update: IUpdate }; export type State = Uninitialized | Idle | CheckingForUpdates | AvailableForDownload | Downloading | Downloaded | Updating | Ready; diff --git a/src/vs/platform/update/electron-main/abstractUpdateService.ts b/src/vs/platform/update/electron-main/abstractUpdateService.ts index e0696f7bfaf9f..5adf20c74e4b8 100644 --- a/src/vs/platform/update/electron-main/abstractUpdateService.ts +++ b/src/vs/platform/update/electron-main/abstractUpdateService.ts @@ -19,7 +19,7 @@ export function createUpdateURL(platform: string, quality: string, productServic } export type UpdateNotAvailableClassification = { - explicit: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + explicit: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; export abstract class AbstractUpdateService implements IUpdateService { diff --git a/src/vs/platform/update/electron-main/updateService.darwin.ts b/src/vs/platform/update/electron-main/updateService.darwin.ts index de874dc75f57f..0c008ea850493 100644 --- a/src/vs/platform/update/electron-main/updateService.darwin.ts +++ b/src/vs/platform/update/electron-main/updateService.darwin.ts @@ -92,7 +92,7 @@ export class DarwinUpdateService extends AbstractUpdateService { } type UpdateDownloadedClassification = { - version: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + version: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; this.telemetryService.publicLog2<{ version: String }, UpdateDownloadedClassification>('update:downloaded', { version: update.version }); diff --git a/src/vs/platform/url/electron-main/electronUrlListener.ts b/src/vs/platform/url/electron-main/electronUrlListener.ts index 97ce0a05e93cd..521063b156ca2 100644 --- a/src/vs/platform/url/electron-main/electronUrlListener.ts +++ b/src/vs/platform/url/electron-main/electronUrlListener.ts @@ -34,13 +34,13 @@ function uriFromRawUrl(url: string): URI | null { */ export class ElectronURLListener { - private uris: { uri: URI, url: string }[] = []; + private uris: { uri: URI; url: string }[] = []; private retryCount = 0; private flushDisposable: IDisposable = Disposable.None; private disposables = new DisposableStore(); constructor( - initialUrisToHandle: { uri: URI, url: string }[], + initialUrisToHandle: { uri: URI; url: string }[], private readonly urlService: IURLService, windowsMainService: IWindowsMainService, environmentMainService: IEnvironmentMainService, @@ -92,7 +92,7 @@ export class ElectronURLListener { return; } - const uris: { uri: URI, url: string }[] = []; + const uris: { uri: URI; url: string }[] = []; for (const obj of this.uris) { const handled = await this.urlService.open(obj.uri, { originalUrl: obj.url }); diff --git a/src/vs/platform/userDataSync/common/abstractSynchronizer.ts b/src/vs/platform/userDataSync/common/abstractSynchronizer.ts index ecd391864962c..cfc9a5bad3a78 100644 --- a/src/vs/platform/userDataSync/common/abstractSynchronizer.ts +++ b/src/vs/platform/userDataSync/common/abstractSynchronizer.ts @@ -29,7 +29,7 @@ import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity' import { Change, getLastSyncResourceUri, IRemoteUserData, IResourcePreview as IBaseResourcePreview, ISyncData, ISyncResourceHandle, ISyncResourcePreview as IBaseSyncResourcePreview, IUserData, IUserDataInitializer, IUserDataManifest, IUserDataSyncBackupStoreService, IUserDataSyncConfiguration, IUserDataSynchroniser, IUserDataSyncLogService, IUserDataSyncEnablementService, IUserDataSyncStoreService, IUserDataSyncUtilService, MergeState, PREVIEW_DIR_NAME, SyncResource, SyncStatus, UserDataSyncError, UserDataSyncErrorCode, USER_DATA_SYNC_CONFIGURATION_SCOPE, USER_DATA_SYNC_SCHEME } from 'vs/platform/userDataSync/common/userDataSync'; type SyncSourceClassification = { - source?: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + source?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; export function isSyncData(thing: any): thing is ISyncData { @@ -713,7 +713,7 @@ export abstract class AbstractSynchroniser extends Disposable implements IUserDa protected abstract hasRemoteChanged(lastSyncUserData: IRemoteUserData): Promise; abstract hasLocalData(): Promise; - abstract getAssociatedResources(syncResourceHandle: ISyncResourceHandle): Promise<{ resource: URI, comparableResource: URI }[]>; + abstract getAssociatedResources(syncResourceHandle: ISyncResourceHandle): Promise<{ resource: URI; comparableResource: URI }[]>; } export interface IFileResourcePreview extends IResourcePreview { diff --git a/src/vs/platform/userDataSync/common/extensionsMerge.ts b/src/vs/platform/userDataSync/common/extensionsMerge.ts index dd04dced76ce7..8236bb281b310 100644 --- a/src/vs/platform/userDataSync/common/extensionsMerge.ts +++ b/src/vs/platform/userDataSync/common/extensionsMerge.ts @@ -11,8 +11,8 @@ import { IExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; import { ISyncExtension, ISyncExtensionWithVersion } from 'vs/platform/userDataSync/common/userDataSync'; export interface IMergeResult { - readonly local: { added: ISyncExtension[], removed: IExtensionIdentifier[], updated: ISyncExtension[] }; - readonly remote: { added: ISyncExtension[], removed: ISyncExtension[], updated: ISyncExtension[], all: ISyncExtension[] } | null; + readonly local: { added: ISyncExtension[]; removed: IExtensionIdentifier[]; updated: ISyncExtension[] }; + readonly remote: { added: ISyncExtension[]; removed: ISyncExtension[]; updated: ISyncExtension[]; all: ISyncExtension[] } | null; } export function merge(localExtensions: ISyncExtensionWithVersion[], remoteExtensions: ISyncExtension[] | null, lastSyncExtensions: ISyncExtension[] | null, skippedExtensions: ISyncExtension[], ignoredExtensions: string[]): IMergeResult { @@ -199,7 +199,7 @@ export function merge(localExtensions: ISyncExtensionWithVersion[], remoteExtens }; } -function compare(from: Map | null, to: Map, ignoredExtensions: Set, { checkInstalledProperty, checkVersionProperty }: { checkInstalledProperty: boolean, checkVersionProperty: boolean } = { checkInstalledProperty: false, checkVersionProperty: false }): { added: Set, removed: Set, updated: Set } { +function compare(from: Map | null, to: Map, ignoredExtensions: Set, { checkInstalledProperty, checkVersionProperty }: { checkInstalledProperty: boolean; checkVersionProperty: boolean } = { checkInstalledProperty: false, checkVersionProperty: false }): { added: Set; removed: Set; updated: Set } { const fromKeys = from ? [...from.keys()].filter(key => !ignoredExtensions.has(key)) : []; const toKeys = [...to.keys()].filter(key => !ignoredExtensions.has(key)); const added = toKeys.filter(key => fromKeys.indexOf(key) === -1).reduce((r, key) => { r.add(key); return r; }, new Set()); @@ -274,7 +274,7 @@ function mergeExtensionState(localExtension: ISyncExtensionWithVersion, remoteEx return mergedState; } -function compareExtensionState(from: IStringDictionary, to: IStringDictionary): { added: Set, removed: Set, updated: Set } { +function compareExtensionState(from: IStringDictionary, to: IStringDictionary): { added: Set; removed: Set; updated: Set } { const fromKeys = Object.keys(from); const toKeys = Object.keys(to); const added = toKeys.filter(key => fromKeys.indexOf(key) === -1).reduce((r, key) => { r.add(key); return r; }, new Set()); diff --git a/src/vs/platform/userDataSync/common/extensionsSync.ts b/src/vs/platform/userDataSync/common/extensionsSync.ts index d9379bb0b57f0..d3411d4287950 100644 --- a/src/vs/platform/userDataSync/common/extensionsSync.ts +++ b/src/vs/platform/userDataSync/common/extensionsSync.ts @@ -273,7 +273,7 @@ export class ExtensionsSynchroniser extends AbstractSynchroniser implements IUse } } - async getAssociatedResources({ uri }: ISyncResourceHandle): Promise<{ resource: URI, comparableResource: URI }[]> { + async getAssociatedResources({ uri }: ISyncResourceHandle): Promise<{ resource: URI; comparableResource: URI }[]> { return [{ resource: this.extUri.joinPath(uri, 'extensions.json'), comparableResource: ExtensionsSynchroniser.EXTENSIONS_DATA_URI }]; } diff --git a/src/vs/platform/userDataSync/common/globalStateMerge.ts b/src/vs/platform/userDataSync/common/globalStateMerge.ts index 1accab52ec2b6..8f2e51bb67d4d 100644 --- a/src/vs/platform/userDataSync/common/globalStateMerge.ts +++ b/src/vs/platform/userDataSync/common/globalStateMerge.ts @@ -9,11 +9,11 @@ import { ILogService } from 'vs/platform/log/common/log'; import { IStorageValue, SYNC_SERVICE_URL_TYPE } from 'vs/platform/userDataSync/common/userDataSync'; export interface IMergeResult { - local: { added: IStringDictionary, removed: string[], updated: IStringDictionary }; + local: { added: IStringDictionary; removed: string[]; updated: IStringDictionary }; remote: IStringDictionary | null; } -export function merge(localStorage: IStringDictionary, remoteStorage: IStringDictionary | null, baseStorage: IStringDictionary | null, storageKeys: { machine: ReadonlyArray, unregistered: ReadonlyArray }, logService: ILogService): IMergeResult { +export function merge(localStorage: IStringDictionary, remoteStorage: IStringDictionary | null, baseStorage: IStringDictionary | null, storageKeys: { machine: ReadonlyArray; unregistered: ReadonlyArray }, logService: ILogService): IMergeResult { if (!remoteStorage) { return { remote: Object.keys(localStorage).length > 0 ? localStorage : null, local: { added: {}, removed: [], updated: {} } }; } @@ -27,7 +27,7 @@ export function merge(localStorage: IStringDictionary, remoteStor const baseToRemote = baseStorage ? compare(baseStorage, remoteStorage) : { added: Object.keys(remoteStorage).reduce((r, k) => { r.add(k); return r; }, new Set()), removed: new Set(), updated: new Set() }; const baseToLocal = baseStorage ? compare(baseStorage, localStorage) : { added: Object.keys(localStorage).reduce((r, k) => { r.add(k); return r; }, new Set()), removed: new Set(), updated: new Set() }; - const local: { added: IStringDictionary, removed: string[], updated: IStringDictionary } = { added: {}, removed: [], updated: {} }; + const local: { added: IStringDictionary; removed: string[]; updated: IStringDictionary } = { added: {}, removed: [], updated: {} }; const remote: IStringDictionary = objects.deepClone(remoteStorage); const isFirstTimeSync = !baseStorage; @@ -119,7 +119,7 @@ export function merge(localStorage: IStringDictionary, remoteStor return { local, remote: areSame(remote, remoteStorage) ? null : remote }; } -function compare(from: IStringDictionary, to: IStringDictionary): { added: Set, removed: Set, updated: Set } { +function compare(from: IStringDictionary, to: IStringDictionary): { added: Set; removed: Set; updated: Set } { const fromKeys = Object.keys(from); const toKeys = Object.keys(to); const added = toKeys.filter(key => fromKeys.indexOf(key) === -1).reduce((r, key) => { r.add(key); return r; }, new Set()); diff --git a/src/vs/platform/userDataSync/common/globalStateSync.ts b/src/vs/platform/userDataSync/common/globalStateSync.ts index 530bc8f9d98fe..e44eda9ed5e03 100644 --- a/src/vs/platform/userDataSync/common/globalStateSync.ts +++ b/src/vs/platform/userDataSync/common/globalStateSync.ts @@ -31,10 +31,10 @@ import { UserDataSyncStoreClient } from 'vs/platform/userDataSync/common/userDat const argvStoragePrefx = 'globalState.argv.'; const argvProperties: string[] = ['locale']; -type StorageKeys = { machine: string[], user: string[], unregistered: string[] }; +type StorageKeys = { machine: string[]; user: string[]; unregistered: string[] }; interface IGlobalStateResourceMergeResult extends IAcceptResult { - readonly local: { added: IStringDictionary, removed: string[], updated: IStringDictionary }; + readonly local: { added: IStringDictionary; removed: string[]; updated: IStringDictionary }; readonly remote: IStringDictionary | null; } @@ -237,7 +237,7 @@ export class GlobalStateSynchroniser extends AbstractSynchroniser implements IUs } } - async getAssociatedResources({ uri }: ISyncResourceHandle): Promise<{ resource: URI, comparableResource: URI }[]> { + async getAssociatedResources({ uri }: ISyncResourceHandle): Promise<{ resource: URI; comparableResource: URI }[]> { return [{ resource: this.extUri.joinPath(uri, 'globalState.json'), comparableResource: GlobalStateSynchroniser.GLOBAL_STATE_DATA_URI }]; } @@ -313,7 +313,7 @@ export class GlobalStateSynchroniser extends AbstractSynchroniser implements IUs return '{}'; } - private async writeLocalGlobalState({ added, removed, updated }: { added: IStringDictionary, updated: IStringDictionary, removed: string[] }): Promise { + private async writeLocalGlobalState({ added, removed, updated }: { added: IStringDictionary; updated: IStringDictionary; removed: string[] }): Promise { const argv: IStringDictionary = {}; const updatedStorage: IStringDictionary = {}; const handleUpdatedStorage = (keys: string[], storage?: IStringDictionary): void => { diff --git a/src/vs/platform/userDataSync/common/keybindingsMerge.ts b/src/vs/platform/userDataSync/common/keybindingsMerge.ts index 4a1eb3af65910..45d598e39382d 100644 --- a/src/vs/platform/userDataSync/common/keybindingsMerge.ts +++ b/src/vs/platform/userDataSync/common/keybindingsMerge.ts @@ -32,7 +32,7 @@ export function parseKeybindings(content: string): IUserFriendlyKeybinding[] { return parse(content) || []; } -export async function merge(localContent: string, remoteContent: string, baseContent: string | null, formattingOptions: FormattingOptions, userDataSyncUtilService: IUserDataSyncUtilService): Promise<{ mergeContent: string, hasChanges: boolean, hasConflicts: boolean }> { +export async function merge(localContent: string, remoteContent: string, baseContent: string | null, formattingOptions: FormattingOptions, userDataSyncUtilService: IUserDataSyncUtilService): Promise<{ mergeContent: string; hasChanges: boolean; hasConflicts: boolean }> { const local = parseKeybindings(localContent); const remote = parseKeybindings(remoteContent); const base = baseContent ? parseKeybindings(baseContent) : null; @@ -105,7 +105,7 @@ export async function merge(localContent: string, remoteContent: string, baseCon return { mergeContent, hasChanges: true, hasConflicts: commandsMergeResult.conflicts.size > 0 }; } -function computeMergeResult(localToRemote: ICompareResult, baseToLocal: ICompareResult, baseToRemote: ICompareResult): { added: Set, removed: Set, updated: Set, conflicts: Set } { +function computeMergeResult(localToRemote: ICompareResult, baseToLocal: ICompareResult, baseToRemote: ICompareResult): { added: Set; removed: Set; updated: Set; conflicts: Set } { const added: Set = new Set(); const removed: Set = new Set(); const updated: Set = new Set(); diff --git a/src/vs/platform/userDataSync/common/keybindingsSync.ts b/src/vs/platform/userDataSync/common/keybindingsSync.ts index 8c8dd86f0d95a..29839dbcfb258 100644 --- a/src/vs/platform/userDataSync/common/keybindingsSync.ts +++ b/src/vs/platform/userDataSync/common/keybindingsSync.ts @@ -273,7 +273,7 @@ export class KeybindingsSynchroniser extends AbstractJsonFileSynchroniser implem return false; } - async getAssociatedResources({ uri }: ISyncResourceHandle): Promise<{ resource: URI, comparableResource: URI }[]> { + async getAssociatedResources({ uri }: ISyncResourceHandle): Promise<{ resource: URI; comparableResource: URI }[]> { const comparableResource = (await this.fileService.exists(this.file)) ? this.file : this.localResource; return [{ resource: this.extUri.joinPath(uri, 'keybindings.json'), comparableResource }]; } diff --git a/src/vs/platform/userDataSync/common/settingsMerge.ts b/src/vs/platform/userDataSync/common/settingsMerge.ts index 7e35a6a68d720..33941721e942c 100644 --- a/src/vs/platform/userDataSync/common/settingsMerge.ts +++ b/src/vs/platform/userDataSync/common/settingsMerge.ts @@ -88,7 +88,7 @@ export function updateIgnoredSettings(targetContent: string, sourceContent: stri return targetContent; } -export function merge(originalLocalContent: string, originalRemoteContent: string, baseContent: string | null, ignoredSettings: string[], resolvedConflicts: { key: string, value: any | undefined }[], formattingOptions: FormattingOptions): IMergeResult { +export function merge(originalLocalContent: string, originalRemoteContent: string, baseContent: string | null, ignoredSettings: string[], resolvedConflicts: { key: string; value: any | undefined }[], formattingOptions: FormattingOptions): IMergeResult { const localContentWithoutIgnoredSettings = updateIgnoredSettings(originalLocalContent, originalRemoteContent, ignoredSettings, formattingOptions); const localForwarded = baseContent !== localContentWithoutIgnoredSettings; @@ -282,7 +282,7 @@ export function isEmpty(content: string): boolean { return true; } -function compare(from: IStringDictionary | null, to: IStringDictionary, ignored: Set): { added: Set, removed: Set, updated: Set } { +function compare(from: IStringDictionary | null, to: IStringDictionary, ignored: Set): { added: Set; removed: Set; updated: Set } { const fromKeys = from ? Object.keys(from).filter(key => !ignored.has(key)) : []; const toKeys = Object.keys(to).filter(key => !ignored.has(key)); const added = toKeys.filter(key => fromKeys.indexOf(key) === -1).reduce((r, key) => { r.add(key); return r; }, new Set()); @@ -314,7 +314,7 @@ export function addSetting(key: string, sourceContent: string, targetContent: st } interface InsertLocation { - index: number, + index: number; insertAfter: boolean; } diff --git a/src/vs/platform/userDataSync/common/settingsSync.ts b/src/vs/platform/userDataSync/common/settingsSync.ts index 1ec503c1420fc..a7c77e99f5a9f 100644 --- a/src/vs/platform/userDataSync/common/settingsSync.ts +++ b/src/vs/platform/userDataSync/common/settingsSync.ts @@ -267,7 +267,7 @@ export class SettingsSynchroniser extends AbstractJsonFileSynchroniser implement return false; } - async getAssociatedResources({ uri }: ISyncResourceHandle): Promise<{ resource: URI, comparableResource: URI }[]> { + async getAssociatedResources({ uri }: ISyncResourceHandle): Promise<{ resource: URI; comparableResource: URI }[]> { const comparableResource = (await this.fileService.exists(this.file)) ? this.file : this.localResource; return [{ resource: this.extUri.joinPath(uri, 'settings.json'), comparableResource }]; } diff --git a/src/vs/platform/userDataSync/common/snippetsMerge.ts b/src/vs/platform/userDataSync/common/snippetsMerge.ts index 7f8e3e486d257..43ed2f8c34bfd 100644 --- a/src/vs/platform/userDataSync/common/snippetsMerge.ts +++ b/src/vs/platform/userDataSync/common/snippetsMerge.ts @@ -150,7 +150,7 @@ export function merge(local: IStringDictionary, remote: IStringDictionar }; } -function compare(from: IStringDictionary | null, to: IStringDictionary | null): { added: Set, removed: Set, updated: Set } { +function compare(from: IStringDictionary | null, to: IStringDictionary | null): { added: Set; removed: Set; updated: Set } { const fromKeys = from ? Object.keys(from) : []; const toKeys = to ? Object.keys(to) : []; const added = toKeys.filter(key => fromKeys.indexOf(key) === -1).reduce((r, key) => { r.add(key); return r; }, new Set()); diff --git a/src/vs/platform/userDataSync/common/snippetsSync.ts b/src/vs/platform/userDataSync/common/snippetsSync.ts index 483ed74f4e95b..b0b2bb48d8b24 100644 --- a/src/vs/platform/userDataSync/common/snippetsSync.ts +++ b/src/vs/platform/userDataSync/common/snippetsSync.ts @@ -349,7 +349,7 @@ export class SnippetsSynchroniser extends AbstractSynchroniser implements IUserD return [...resourcePreviews.values()]; } - async getAssociatedResources({ uri }: ISyncResourceHandle): Promise<{ resource: URI, comparableResource: URI }[]> { + async getAssociatedResources({ uri }: ISyncResourceHandle): Promise<{ resource: URI; comparableResource: URI }[]> { let content = await super.resolveContent(uri); if (content) { const syncData = this.parseSyncData(content); diff --git a/src/vs/platform/userDataSync/common/tasksSync.ts b/src/vs/platform/userDataSync/common/tasksSync.ts index 517937792313d..b5680e31cce11 100644 --- a/src/vs/platform/userDataSync/common/tasksSync.ts +++ b/src/vs/platform/userDataSync/common/tasksSync.ts @@ -215,7 +215,7 @@ export class TasksSynchroniser extends AbstractFileSynchroniser implements IUser return this.fileService.exists(this.file); } - async getAssociatedResources({ uri }: ISyncResourceHandle): Promise<{ resource: URI, comparableResource: URI }[]> { + async getAssociatedResources({ uri }: ISyncResourceHandle): Promise<{ resource: URI; comparableResource: URI }[]> { const comparableResource = (await this.fileService.exists(this.file)) ? this.file : this.localResource; return [{ resource: this.extUri.joinPath(uri, 'tasks.json'), comparableResource }]; } diff --git a/src/vs/platform/userDataSync/common/userDataAutoSyncService.ts b/src/vs/platform/userDataSync/common/userDataAutoSyncService.ts index dece029ed786d..bea7313f0b37b 100644 --- a/src/vs/platform/userDataSync/common/userDataAutoSyncService.ts +++ b/src/vs/platform/userDataSync/common/userDataAutoSyncService.ts @@ -22,12 +22,12 @@ import { IUserDataSyncAccountService } from 'vs/platform/userDataSync/common/use import { IUserDataSyncMachinesService } from 'vs/platform/userDataSync/common/userDataSyncMachines'; type AutoSyncClassification = { - sources: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true; }; + sources: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; type AutoSyncErrorClassification = { - code: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true; }; - service: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true; }; + code: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + service: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; const disableMachineEventuallyKey = 'sync.disableMachineEventually'; @@ -156,7 +156,7 @@ export class UserDataAutoSyncService extends Disposable implements IUserDataAuto // For tests purpose only protected startAutoSync(): boolean { return true; } - private isAutoSyncEnabled(): { enabled: boolean, message?: string; } { + private isAutoSyncEnabled(): { enabled: boolean; message?: string } { if (!this.userDataSyncEnablementService.isEnabled()) { return { enabled: false, message: 'Auto Sync: Disabled.' }; } @@ -232,7 +232,7 @@ export class UserDataAutoSyncService extends Disposable implements IUserDataAuto // Log to telemetry if (userDataSyncError instanceof UserDataAutoSyncError) { - this.telemetryService.publicLog2<{ code: string, service: string; }, AutoSyncErrorClassification>(`autosync/error`, { code: userDataSyncError.code, service: this.userDataSyncStoreManagementService.userDataSyncStore!.url.toString() }); + this.telemetryService.publicLog2<{ code: string; service: string }, AutoSyncErrorClassification>(`autosync/error`, { code: userDataSyncError.code, service: this.userDataSyncStoreManagementService.userDataSyncStore!.url.toString() }); } // Session got expired @@ -350,7 +350,7 @@ export class UserDataAutoSyncService extends Disposable implements IUserDataAuto this.sources.push(...sources); return this.syncTriggerDelayer.trigger(async () => { this.logService.trace('activity sources', ...this.sources); - this.telemetryService.publicLog2<{ sources: string[]; }, AutoSyncClassification>('sync/triggered', { sources: this.sources }); + this.telemetryService.publicLog2<{ sources: string[] }, AutoSyncClassification>('sync/triggered', { sources: this.sources }); this.sources = []; if (this.autoSync.value) { await this.autoSync.value.sync('Activity', disableCache); diff --git a/src/vs/platform/userDataSync/common/userDataSync.ts b/src/vs/platform/userDataSync/common/userDataSync.ts index 47593641517a0..f7c41f6220170 100644 --- a/src/vs/platform/userDataSync/common/userDataSync.ts +++ b/src/vs/platform/userDataSync/common/userDataSync.ts @@ -112,7 +112,7 @@ export interface IUserData { content: string | null; } -export type IAuthenticationProvider = { id: string, scopes: string[] }; +export type IAuthenticationProvider = { id: string; scopes: string[] }; export interface IUserDataSyncStore { readonly url: URI; @@ -146,7 +146,7 @@ export function getLastSyncResourceUri(syncResource: SyncResource, environmentSe } export interface IUserDataManifest { - readonly latest?: Record + readonly latest?: Record; readonly session: string; readonly ref: string; } @@ -405,7 +405,7 @@ export interface IUserDataSynchroniser { resolveContent(resource: URI): Promise; getRemoteSyncResourceHandles(): Promise; getLocalSyncResourceHandles(): Promise; - getAssociatedResources(syncResourceHandle: ISyncResourceHandle): Promise<{ resource: URI, comparableResource: URI }[]>; + getAssociatedResources(syncResourceHandle: ISyncResourceHandle): Promise<{ resource: URI; comparableResource: URI }[]>; getMachineId(syncResourceHandle: ISyncResourceHandle): Promise; } @@ -491,7 +491,7 @@ export interface IUserDataSyncService { getLocalSyncResourceHandles(resource: SyncResource): Promise; getRemoteSyncResourceHandles(resource: SyncResource): Promise; - getAssociatedResources(resource: SyncResource, syncResourceHandle: ISyncResourceHandle): Promise<{ resource: URI, comparableResource: URI }[]>; + getAssociatedResources(resource: SyncResource, syncResourceHandle: ISyncResourceHandle): Promise<{ resource: URI; comparableResource: URI }[]>; getMachineId(resource: SyncResource, syncResourceHandle: ISyncResourceHandle): Promise; } diff --git a/src/vs/platform/userDataSync/common/userDataSyncEnablementService.ts b/src/vs/platform/userDataSync/common/userDataSyncEnablementService.ts index 0ff204208bcaf..adce0d48d63be 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncEnablementService.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncEnablementService.ts @@ -12,7 +12,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ALL_SYNC_RESOURCES, getEnablementKey, IUserDataSyncEnablementService, IUserDataSyncStoreManagementService, SyncResource } from 'vs/platform/userDataSync/common/userDataSync'; type SyncEnablementClassification = { - enabled?: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + enabled?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; const enablementKey = 'sync.enable'; diff --git a/src/vs/platform/userDataSync/common/userDataSyncService.ts b/src/vs/platform/userDataSync/common/userDataSyncService.ts index 41d2ba64b25e1..3d38184f41005 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncService.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncService.ts @@ -28,12 +28,12 @@ import { TasksSynchroniser } from 'vs/platform/userDataSync/common/tasksSync'; import { ALL_SYNC_RESOURCES, Change, createSyncHeaders, IManualSyncTask, IResourcePreview, ISyncResourceHandle, ISyncResourcePreview, ISyncTask, IUserDataManifest, IUserDataSyncConfiguration, IUserDataSyncEnablementService, IUserDataSynchroniser, IUserDataSyncLogService, IUserDataSyncService, IUserDataSyncStoreManagementService, IUserDataSyncStoreService, MergeState, SyncResource, SyncStatus, UserDataSyncError, UserDataSyncErrorCode, UserDataSyncStoreError, USER_DATA_SYNC_CONFIGURATION_SCOPE } from 'vs/platform/userDataSync/common/userDataSync'; type SyncErrorClassification = { - code: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - service: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - serverCode?: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - url?: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - resource?: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - executionId?: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + code: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + service: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + serverCode?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + url?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + resource?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + executionId?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; const LAST_SYNC_TIME_KEY = 'sync.lastSyncTime'; @@ -309,7 +309,7 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ return result || []; } - async getAssociatedResources(resource: SyncResource, syncResourceHandle: ISyncResourceHandle): Promise<{ resource: URI, comparableResource: URI }[]> { + async getAssociatedResources(resource: SyncResource, syncResourceHandle: ISyncResourceHandle): Promise<{ resource: URI; comparableResource: URI }[]> { const result = await this.performSynchronizerAction(async synchronizer => { if (synchronizer.resource === resource) { return synchronizer.getAssociatedResources(syncResourceHandle); @@ -455,7 +455,7 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ } private reportUserDataSyncError(userDataSyncError: UserDataSyncError, executionId: string) { - this.telemetryService.publicLog2<{ code: string, service: string, serverCode?: string, url?: string, resource?: string, executionId?: string }, SyncErrorClassification>('sync/error', + this.telemetryService.publicLog2<{ code: string; service: string; serverCode?: string; url?: string; resource?: string; executionId?: string }, SyncErrorClassification>('sync/error', { code: userDataSyncError.code, serverCode: userDataSyncError instanceof UserDataSyncStoreError ? String(userDataSyncError.serverCode) : undefined, diff --git a/src/vs/platform/userDataSync/common/userDataSyncServiceIpc.ts b/src/vs/platform/userDataSync/common/userDataSyncServiceIpc.ts index eea41e2175d8c..4a190dfd8e61c 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncServiceIpc.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncServiceIpc.ts @@ -12,11 +12,11 @@ import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc'; import { ILogService } from 'vs/platform/log/common/log'; import { IManualSyncTask, IResourcePreview, ISyncResourceHandle, ISyncResourcePreview, ISyncTask, IUserDataManifest, IUserDataSyncService, SyncResource, SyncStatus, UserDataSyncError } from 'vs/platform/userDataSync/common/userDataSync'; -type ManualSyncTaskEvent = { manualSyncTaskId: string, data: T }; +type ManualSyncTaskEvent = { manualSyncTaskId: string; data: T }; export class UserDataSyncChannel implements IServerChannel { - private readonly manualSyncTasks = new Map(); + private readonly manualSyncTasks = new Map(); private readonly onManualSynchronizeResources = new Emitter>(); constructor(private readonly service: IUserDataSyncService, private readonly logService: ILogService) { } @@ -103,7 +103,7 @@ export class UserDataSyncChannel implements IServerChannel { return value.manualSyncTask; } - private async createManualSyncTask(): Promise<{ id: string, manifest: IUserDataManifest | null, status: SyncStatus }> { + private async createManualSyncTask(): Promise<{ id: string; manifest: IUserDataManifest | null; status: SyncStatus }> { const disposables = new DisposableStore(); const manualSyncTask = disposables.add(await this.service.createManualSyncTask()); disposables.add(manualSyncTask.onSynchronizeResources(synchronizeResources => this.onManualSynchronizeResources.fire({ manualSyncTaskId: manualSyncTask.id, data: synchronizeResources }))); @@ -180,7 +180,7 @@ export class UserDataSyncChannelClient extends Disposable implements IUserDataSy } async createManualSyncTask(): Promise { - const { id, manifest, status } = await this.channel.call<{ id: string, manifest: IUserDataManifest | null, status: SyncStatus }>('createManualSyncTask'); + const { id, manifest, status } = await this.channel.call<{ id: string; manifest: IUserDataManifest | null; status: SyncStatus }>('createManualSyncTask'); const that = this; const manualSyncTaskChannelClient = new ManualSyncTaskChannelClient(id, manifest, status, { async call(command: string, arg?: any, cancellationToken?: CancellationToken): Promise { @@ -188,7 +188,7 @@ export class UserDataSyncChannelClient extends Disposable implements IUserDataSy }, listen(event: string, arg?: any): Event { return Event.map( - Event.filter(that.channel.listen<{ manualSyncTaskId: string, data: T }>(`manualSync/${event}`, arg), e => !manualSyncTaskChannelClient.isDiposed() && e.manualSyncTaskId === id), + Event.filter(that.channel.listen<{ manualSyncTaskId: string; data: T }>(`manualSync/${event}`, arg), e => !manualSyncTaskChannelClient.isDiposed() && e.manualSyncTaskId === id), e => e.data); } }); @@ -237,8 +237,8 @@ export class UserDataSyncChannelClient extends Disposable implements IUserDataSy return handles.map(({ created, uri }) => ({ created, uri: URI.revive(uri) })); } - async getAssociatedResources(resource: SyncResource, syncResourceHandle: ISyncResourceHandle): Promise<{ resource: URI, comparableResource: URI }[]> { - const result = await this.channel.call<{ resource: URI, comparableResource: URI }[]>('getAssociatedResources', [resource, syncResourceHandle]); + async getAssociatedResources(resource: SyncResource, syncResourceHandle: ISyncResourceHandle): Promise<{ resource: URI; comparableResource: URI }[]> { + const result = await this.channel.call<{ resource: URI; comparableResource: URI }[]>('getAssociatedResources', [resource, syncResourceHandle]); return result.map(({ resource, comparableResource }) => ({ resource: URI.revive(resource), comparableResource: URI.revive(comparableResource) })); } diff --git a/src/vs/platform/userDataSync/common/userDataSyncStoreService.ts b/src/vs/platform/userDataSync/common/userDataSyncStoreService.ts index 0803e1f30f805..f498de36c8944 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncStoreService.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncStoreService.ts @@ -32,7 +32,7 @@ const MACHINE_SESSION_ID_KEY = 'sync.machine-session-id'; const REQUEST_SESSION_LIMIT = 100; const REQUEST_SESSION_INTERVAL = 1000 * 60 * 5; /* 5 minutes */ -type UserDataSyncStore = IUserDataSyncStore & { defaultType: UserDataSyncStoreType; }; +type UserDataSyncStore = IUserDataSyncStore & { defaultType: UserDataSyncStoreType }; export abstract class AbstractUserDataSyncStoreManagementService extends Disposable implements IUserDataSyncStoreManagementService { @@ -65,7 +65,7 @@ export abstract class AbstractUserDataSyncStoreManagementService extends Disposa this._onDidChangeUserDataSyncStore.fire(); } - protected toUserDataSyncStore(productStore: ConfigurationSyncStore & { web?: ConfigurationSyncStore; } | undefined, configuredStore?: ConfigurationSyncStore): UserDataSyncStore | undefined { + protected toUserDataSyncStore(productStore: ConfigurationSyncStore & { web?: ConfigurationSyncStore } | undefined, configuredStore?: ConfigurationSyncStore): UserDataSyncStore | undefined { // Check for web overrides for backward compatibility while reading previous store productStore = isWeb && productStore?.web ? { ...productStore, ...productStore.web } : productStore; const value: Partial = { ...(productStore || {}), ...(configuredStore || {}) }; @@ -144,8 +144,8 @@ export class UserDataSyncStoreClient extends Disposable implements IUserDataSync private userDataSyncStoreUrl: URI | undefined; - private authToken: { token: string, type: string; } | undefined; - private readonly commonHeadersPromise: Promise<{ [key: string]: string; }>; + private authToken: { token: string; type: string } | undefined; + private readonly commonHeadersPromise: Promise<{ [key: string]: string }>; private readonly session: RequestsSession; private _onTokenFailed: Emitter = this._register(new Emitter()); @@ -240,7 +240,7 @@ export class UserDataSyncStoreClient extends Disposable implements IUserDataSync const context = await this.request(uri.toString(), { type: 'GET', headers }, [], CancellationToken.None); - const result = await asJson<{ url: string, created: number; }[]>(context) || []; + const result = await asJson<{ url: string; created: number }[]>(context) || []; return result.map(({ url, created }) => ({ ref: relativePath(uri, uri.with({ path: url }))!, created: created * 1000 /* Server returns in seconds */ })); } diff --git a/src/vs/platform/userDataSync/test/common/synchronizer.test.ts b/src/vs/platform/userDataSync/test/common/synchronizer.test.ts index 01b44d101f384..71724a85a0f2a 100644 --- a/src/vs/platform/userDataSync/test/common/synchronizer.test.ts +++ b/src/vs/platform/userDataSync/test/common/synchronizer.test.ts @@ -24,7 +24,7 @@ interface ITestResourcePreview extends IResourcePreview { class TestSynchroniser extends AbstractSynchroniser { syncBarrier: Barrier = new Barrier(); - syncResult: { hasConflicts: boolean, hasError: boolean } = { hasConflicts: false, hasError: false }; + syncResult: { hasConflicts: boolean; hasError: boolean } = { hasConflicts: false, hasError: false }; onDoSyncCall: Emitter = this._register(new Emitter()); failWhenGettingLatestRemoteUserData: boolean = false; @@ -166,7 +166,7 @@ class TestSynchroniser extends AbstractSynchroniser { } hasLocalData(): Promise { throw new Error('not implemented'); } - getAssociatedResources(): Promise<{ resource: URI, comparableResource: URI }[]> { throw new Error('not implemented'); } + getAssociatedResources(): Promise<{ resource: URI; comparableResource: URI }[]> { throw new Error('not implemented'); } } suite('TestSynchronizer - Auto Sync', () => { diff --git a/src/vs/platform/userDataSync/test/common/userDataSyncClient.ts b/src/vs/platform/userDataSync/test/common/userDataSyncClient.ts index 3ee074c06fbe5..293324b83c576 100644 --- a/src/vs/platform/userDataSync/test/common/userDataSyncClient.ts +++ b/src/vs/platform/userDataSync/test/common/userDataSyncClient.ts @@ -160,11 +160,11 @@ export class UserDataSyncTestServer implements IRequestService { private session: string | null = null; private readonly data: Map = new Map(); - private _requests: { url: string, type: string, headers?: IHeaders }[] = []; - get requests(): { url: string, type: string, headers?: IHeaders }[] { return this._requests; } + private _requests: { url: string; type: string; headers?: IHeaders }[] = []; + get requests(): { url: string; type: string; headers?: IHeaders }[] { return this._requests; } - private _requestsWithAllHeaders: { url: string, type: string, headers?: IHeaders }[] = []; - get requestsWithAllHeaders(): { url: string, type: string, headers?: IHeaders }[] { return this._requestsWithAllHeaders; } + private _requestsWithAllHeaders: { url: string; type: string; headers?: IHeaders }[] = []; + get requestsWithAllHeaders(): { url: string; type: string; headers?: IHeaders }[] { return this._requestsWithAllHeaders; } private _responses: { status: number }[] = []; get responses(): { status: number }[] { return this._responses; } diff --git a/src/vs/platform/webview/electron-main/webviewMainService.ts b/src/vs/platform/webview/electron-main/webviewMainService.ts index 45c92dd7d1205..350768d61a422 100644 --- a/src/vs/platform/webview/electron-main/webviewMainService.ts +++ b/src/vs/platform/webview/electron-main/webviewMainService.ts @@ -47,7 +47,7 @@ export class WebviewMainService extends Disposable implements IWebviewManagerSer } } - public async findInFrame(windowId: WebviewWindowId, frameName: string, text: string, options: { findNext?: boolean, forward?: boolean }): Promise { + public async findInFrame(windowId: WebviewWindowId, frameName: string, text: string, options: { findNext?: boolean; forward?: boolean }): Promise { const initialFrame = this.getFrameByName(windowId, frameName); type WebFrameMainWithFindSupport = typeof WebFrameMain & { diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index 6256c02727dd0..ac6047b8d358b 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -184,7 +184,7 @@ export interface IPathData { readonly startColumn: number; readonly endLineNumber?: number; readonly endColumn?: number; - } + }; // a hint that the file exists. if true, the // file exists, if false it does not. with @@ -266,7 +266,7 @@ export interface IPartsSplash { statusBarBackground: string | undefined; statusBarNoFolderBackground: string | undefined; windowBorder: string | undefined; - } + }; layoutInfo: { sideBarSide: string; editorPartMinWidth: number; @@ -276,7 +276,7 @@ export interface IPartsSplash { statusBarHeight: number; windowBorder: boolean; windowBorderRadius: string | undefined; - } | undefined + } | undefined; } export interface INativeWindowConfiguration extends IWindowConfiguration, NativeParsedArgs, ISandboxConfiguration { diff --git a/src/vs/platform/windows/electron-main/window.ts b/src/vs/platform/windows/electron-main/window.ts index 4457e07d14e41..e2d3cca221fb0 100644 --- a/src/vs/platform/windows/electron-main/window.ts +++ b/src/vs/platform/windows/electron-main/window.ts @@ -495,9 +495,9 @@ export class CodeWindow extends Disposable implements ICodeWindow { } private async onWindowError(error: WindowError.UNRESPONSIVE): Promise; - private async onWindowError(error: WindowError.CRASHED, details: { reason: string, exitCode: number }): Promise; - private async onWindowError(error: WindowError.LOAD, details: { reason: string, exitCode: number }): Promise; - private async onWindowError(type: WindowError, details?: { reason: string, exitCode: number }): Promise { + private async onWindowError(error: WindowError.CRASHED, details: { reason: string; exitCode: number }): Promise; + private async onWindowError(error: WindowError.LOAD, details: { reason: string; exitCode: number }): Promise; + private async onWindowError(type: WindowError, details?: { reason: string; exitCode: number }): Promise { switch (type) { case WindowError.CRASHED: @@ -513,9 +513,9 @@ export class CodeWindow extends Disposable implements ICodeWindow { // Telemetry type WindowErrorClassification = { - type: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - reason: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - code: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; + type: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + reason: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + code: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; }; type WindowErrorEvent = { type: WindowError; diff --git a/src/vs/platform/windows/electron-main/windowsMainService.ts b/src/vs/platform/windows/electron-main/windowsMainService.ts index 44f23baab47a1..c6e0495bb3b3b 100644 --- a/src/vs/platform/windows/electron-main/windowsMainService.ts +++ b/src/vs/platform/windows/electron-main/windowsMainService.ts @@ -412,7 +412,7 @@ export class WindowsMainService extends Disposable implements IWindowsMainServic emptyToOpen: number, filesToOpen: IFilesToOpen | undefined, foldersToAdd: ISingleFolderWorkspacePathToOpen[] - ): { windows: ICodeWindow[], filesOpenedInWindow: ICodeWindow | undefined } { + ): { windows: ICodeWindow[]; filesOpenedInWindow: ICodeWindow | undefined } { // Keep track of used windows and remember // if files have been opened in one of them @@ -1098,7 +1098,7 @@ export class WindowsMainService extends Disposable implements IWindowsMainServic return { workspace: getSingleFolderWorkspaceIdentifier(uri), remoteAuthority }; } - private shouldOpenNewWindow(openConfig: IOpenConfiguration): { openFolderInNewWindow: boolean; openFilesInNewWindow: boolean; } { + private shouldOpenNewWindow(openConfig: IOpenConfiguration): { openFolderInNewWindow: boolean; openFilesInNewWindow: boolean } { // let the user settings override how folders are open in a new window or same window unless we are forced const windowConfig = this.configurationService.getValue('window'); diff --git a/src/vs/platform/windows/node/windowTracker.ts b/src/vs/platform/windows/node/windowTracker.ts index 2c5ea6fb24b68..062722f7f6f38 100644 --- a/src/vs/platform/windows/node/windowTracker.ts +++ b/src/vs/platform/windows/node/windowTracker.ts @@ -15,9 +15,9 @@ export class ActiveWindowManager extends Disposable { private activeWindowId: number | undefined; constructor({ onDidOpenWindow, onDidFocusWindow, getActiveWindowId }: { - onDidOpenWindow: Event, - onDidFocusWindow: Event, - getActiveWindowId(): Promise + onDidOpenWindow: Event; + onDidFocusWindow: Event; + getActiveWindowId(): Promise; }) { super(); diff --git a/src/vs/platform/windows/test/electron-main/windowsFinder.test.ts b/src/vs/platform/windows/test/electron-main/windowsFinder.test.ts index dd786500cfd8d..fcf8089bdd70c 100644 --- a/src/vs/platform/windows/test/electron-main/windowsFinder.test.ts +++ b/src/vs/platform/windows/test/electron-main/windowsFinder.test.ts @@ -30,7 +30,7 @@ suite('WindowsFinder', () => { const testWorkspaceFolders = toWorkspaceFolders([{ path: join(fixturesFolder, 'vscode_workspace_1_folder') }, { path: join(fixturesFolder, 'vscode_workspace_2_folder') }], testWorkspace.configPath, extUriBiasedIgnorePathCase); const localWorkspaceResolver = (workspace: any) => { return workspace === testWorkspace ? { id: testWorkspace.id, configPath: workspace.configPath, folders: testWorkspaceFolders } : undefined; }; - function createTestCodeWindow(options: { lastFocusTime: number, openedFolderUri?: URI, openedWorkspace?: IWorkspaceIdentifier }): ICodeWindow { + function createTestCodeWindow(options: { lastFocusTime: number; openedFolderUri?: URI; openedWorkspace?: IWorkspaceIdentifier }): ICodeWindow { return new class implements ICodeWindow { onWillLoad: Event = Event.None; onDidSignalReady: Event = Event.None; @@ -55,7 +55,7 @@ suite('WindowsFinder', () => { addTabbedWindow(window: ICodeWindow): void { throw new Error('Method not implemented.'); } load(config: INativeWindowConfiguration, options: { isReload?: boolean }): void { throw new Error('Method not implemented.'); } reload(cli?: NativeParsedArgs): void { throw new Error('Method not implemented.'); } - focus(options?: { force: boolean; }): void { throw new Error('Method not implemented.'); } + focus(options?: { force: boolean }): void { throw new Error('Method not implemented.'); } close(): void { throw new Error('Method not implemented.'); } getBounds(): Electron.Rectangle { throw new Error('Method not implemented.'); } send(channel: string, ...args: any[]): void { throw new Error('Method not implemented.'); } diff --git a/src/vs/platform/workspace/common/virtualWorkspace.ts b/src/vs/platform/workspace/common/virtualWorkspace.ts index 0dc19dde88ebc..77ccb98eaf2b3 100644 --- a/src/vs/platform/workspace/common/virtualWorkspace.ts +++ b/src/vs/platform/workspace/common/virtualWorkspace.ts @@ -11,7 +11,7 @@ export function isVirtualResource(resource: URI) { return resource.scheme !== Schemas.file && resource.scheme !== Schemas.vscodeRemote; } -export function getVirtualWorkspaceLocation(workspace: IWorkspace): { scheme: string, authority: string } | undefined { +export function getVirtualWorkspaceLocation(workspace: IWorkspace): { scheme: string; authority: string } | undefined { if (workspace.folders.length) { return workspace.folders.every(f => isVirtualResource(f.uri)) ? workspace.folders[0].uri : undefined; } else if (workspace.configuration && isVirtualResource(workspace.configuration)) { diff --git a/src/vs/platform/workspace/common/workspaceTrust.ts b/src/vs/platform/workspace/common/workspaceTrust.ts index 0481b2b1a83bd..805e36a654fdb 100644 --- a/src/vs/platform/workspace/common/workspaceTrust.ts +++ b/src/vs/platform/workspace/common/workspaceTrust.ts @@ -24,7 +24,7 @@ export function workspaceTrustToString(trustState: boolean) { export interface WorkspaceTrustRequestButton { readonly label: string; - readonly type: 'ContinueWithTrust' | 'ContinueWithoutTrust' | 'Manage' | 'Cancel' + readonly type: 'ContinueWithTrust' | 'ContinueWithoutTrust' | 'Manage' | 'Cancel'; } export interface WorkspaceTrustRequestOptions { @@ -99,10 +99,10 @@ export interface IWorkspaceTrustTransitionParticipant { } export interface IWorkspaceTrustUriInfo { - uri: URI, - trusted: boolean + uri: URI; + trusted: boolean; } export interface IWorkspaceTrustInfo { - uriTrustInfo: IWorkspaceTrustUriInfo[] + uriTrustInfo: IWorkspaceTrustUriInfo[]; } diff --git a/src/vs/platform/workspaces/common/workspaces.ts b/src/vs/platform/workspaces/common/workspaces.ts index c1196f9b366fd..541905790388b 100644 --- a/src/vs/platform/workspaces/common/workspaces.ts +++ b/src/vs/platform/workspaces/common/workspaces.ts @@ -460,7 +460,7 @@ interface ISerializedRecentWorkspace { workspace: { id: string; configPath: string; - } + }; label?: string; remoteAuthority?: string; } @@ -478,7 +478,7 @@ interface ISerializedRecentFile { } interface ISerializedRecentlyOpenedLegacy { - workspaces3: Array<{ id: string; configURIPath: string; } | string>; // workspace or URI.toString() // added in 1.32 + workspaces3: Array<{ id: string; configURIPath: string } | string>; // workspace or URI.toString() // added in 1.32 workspaceLabels?: Array; // added in 1.33 files2: string[]; // files as URI.toString() // added in 1.32 fileLabels?: Array; // added in 1.33 diff --git a/src/vs/platform/workspaces/electron-main/workspacesManagementMainService.ts b/src/vs/platform/workspaces/electron-main/workspacesManagementMainService.ts index 232e3dbab8adf..dbe890db1f9cb 100644 --- a/src/vs/platform/workspaces/electron-main/workspacesManagementMainService.ts +++ b/src/vs/platform/workspaces/electron-main/workspacesManagementMainService.ts @@ -169,7 +169,7 @@ export class WorkspacesManagementMainService extends Disposable implements IWork return workspace; } - private newUntitledWorkspace(folders: IWorkspaceFolderCreationData[] = [], remoteAuthority?: string): { workspace: IWorkspaceIdentifier, storedWorkspace: IStoredWorkspace } { + private newUntitledWorkspace(folders: IWorkspaceFolderCreationData[] = [], remoteAuthority?: string): { workspace: IWorkspaceIdentifier; storedWorkspace: IStoredWorkspace } { const randomId = (Date.now() + Math.round(Math.random() * 1000)).toString(); const untitledWorkspaceConfigFolder = joinPath(this.untitledWorkspacesHome, randomId); const untitledWorkspaceConfigPath = joinPath(untitledWorkspaceConfigFolder, UNTITLED_WORKSPACE_NAME); diff --git a/src/vs/server/node/remoteAgentEnvironmentImpl.ts b/src/vs/server/node/remoteAgentEnvironmentImpl.ts index e59722bb1dc79..d970e52a56830 100644 --- a/src/vs/server/node/remoteAgentEnvironmentImpl.ts +++ b/src/vs/server/node/remoteAgentEnvironmentImpl.ts @@ -201,9 +201,9 @@ export class RemoteAgentEnvironmentChannel implements IServerChannel { private static _massageWhenConditions(extensions: IExtensionDescription[]): void { // Massage "when" conditions which mention `resourceScheme` - interface WhenUser { when?: string; } + interface WhenUser { when?: string } - interface LocWhenUser { [loc: string]: WhenUser[]; } + interface LocWhenUser { [loc: string]: WhenUser[] } const _mapResourceSchemeValue = (value: string, isRegex: boolean): string => { // console.log(`_mapResourceSchemeValue: ${value}, ${isRegex}`); diff --git a/src/vs/server/node/remoteExtensionHostAgentServer.ts b/src/vs/server/node/remoteExtensionHostAgentServer.ts index a6fe9218458e3..a47fc50d3305b 100644 --- a/src/vs/server/node/remoteExtensionHostAgentServer.ts +++ b/src/vs/server/node/remoteExtensionHostAgentServer.ts @@ -53,8 +53,8 @@ declare module vsda { export class RemoteExtensionHostAgentServer extends Disposable { - private readonly _extHostConnections: { [reconnectionToken: string]: ExtensionHostConnection; }; - private readonly _managementConnections: { [reconnectionToken: string]: ManagementConnection; }; + private readonly _extHostConnections: { [reconnectionToken: string]: ExtensionHostConnection }; + private readonly _managementConnections: { [reconnectionToken: string]: ManagementConnection }; private readonly _allReconnectionTokens: Set; private readonly _webClientServer: WebClientServer | null; @@ -704,10 +704,10 @@ export async function createServer(address: string | net.AddressInfo | null, arg const telemetryService = accessor.get(ITelemetryService); type ServerStartClassification = { - startTime: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - startedTime: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - codeLoadedTime: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - readyTime: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + startTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + startedTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + codeLoadedTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + readyTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type ServerStartEvent = { startTime: number; diff --git a/src/vs/server/node/remoteTelemetryService.ts b/src/vs/server/node/remoteTelemetryService.ts index b7c862b5e8290..251bd3ef78655 100644 --- a/src/vs/server/node/remoteTelemetryService.ts +++ b/src/vs/server/node/remoteTelemetryService.ts @@ -11,7 +11,7 @@ import { ITelemetryServiceConfig, TelemetryService } from 'vs/platform/telemetry import { NullTelemetryServiceShape } from 'vs/platform/telemetry/common/telemetryUtils'; export interface IRemoteTelemetryService extends ITelemetryService { - updateInjectedTelemetryLevel(telemetryLevel: TelemetryLevel): Promise + updateInjectedTelemetryLevel(telemetryLevel: TelemetryLevel): Promise; } interface CachedTelemetryEvent { diff --git a/src/vs/server/node/remoteTerminalChannel.ts b/src/vs/server/node/remoteTerminalChannel.ts index 14ab5bb26472c..57a414f31b294 100644 --- a/src/vs/server/node/remoteTerminalChannel.ts +++ b/src/vs/server/node/remoteTerminalChannel.ts @@ -35,7 +35,7 @@ class CustomVariableResolver extends AbstractVariableResolverService { env: platform.IProcessEnvironment, workspaceFolders: IWorkspaceFolder[], activeFileResource: URI | undefined, - resolvedVariables: { [name: string]: string; } + resolvedVariables: { [name: string]: string } ) { super({ getFolderUri: (folderName: string): URI | undefined => { @@ -82,7 +82,7 @@ export class RemoteTerminalChannel extends Disposable implements IServerChannel< uriTransformer: IURITransformer; }>(); - private readonly _onExecuteCommand = this._register(new Emitter<{ reqId: number, commandId: string, commandArgs: any[] }>()); + private readonly _onExecuteCommand = this._register(new Emitter<{ reqId: number; commandId: string; commandArgs: any[] }>()); readonly onExecuteCommand = this._onExecuteCommand.event; constructor( diff --git a/src/vs/server/node/server.cli.ts b/src/vs/server/node/server.cli.ts index 290287dee5903..31365a6d00aa8 100644 --- a/src/vs/server/node/server.cli.ts +++ b/src/vs/server/node/server.cli.ts @@ -32,7 +32,7 @@ interface ProductDescription { executableName: string; } -interface RemoteParsedArgs extends NativeParsedArgs { 'gitCredential'?: string; 'openExternal'?: boolean; } +interface RemoteParsedArgs extends NativeParsedArgs { 'gitCredential'?: string; 'openExternal'?: boolean } const isSupportedForCmd = (optionId: keyof RemoteParsedArgs) => { diff --git a/src/vs/server/node/serverEnvironmentService.ts b/src/vs/server/node/serverEnvironmentService.ts index c4ef20bc4ef72..efcec94e0300d 100644 --- a/src/vs/server/node/serverEnvironmentService.ts +++ b/src/vs/server/node/serverEnvironmentService.ts @@ -182,7 +182,7 @@ export interface ServerParsedArgs { help: boolean; version: boolean; - compatibility: string + compatibility: string; _: string[]; } diff --git a/src/vs/server/node/serverServices.ts b/src/vs/server/node/serverServices.ts index d831a7012f11d..42ae7048e38c2 100644 --- a/src/vs/server/node/serverServices.ts +++ b/src/vs/server/node/serverServices.ts @@ -70,7 +70,7 @@ import { REMOTE_FILE_SYSTEM_CHANNEL_NAME } from 'vs/workbench/services/remote/co const eventPrefix = 'monacoworkbench'; -const _uriTransformerCache: { [remoteAuthority: string]: IURITransformer; } = Object.create(null); +const _uriTransformerCache: { [remoteAuthority: string]: IURITransformer } = Object.create(null); function getUriTransformer(remoteAuthority: string): IURITransformer { if (!_uriTransformerCache[remoteAuthority]) { diff --git a/src/vs/workbench/api/browser/mainThreadAuthentication.ts b/src/vs/workbench/api/browser/mainThreadAuthentication.ts index 041479b616392..b0e16992d6bd1 100644 --- a/src/vs/workbench/api/browser/mainThreadAuthentication.ts +++ b/src/vs/workbench/api/browser/mainThreadAuthentication.ts @@ -273,10 +273,10 @@ export class MainThreadAuthentication extends Disposable implements MainThreadAu if (session) { type AuthProviderUsageClassification = { - extensionId: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - providerId: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + extensionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + providerId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; - this.telemetryService.publicLog2<{ extensionId: string, providerId: string }, AuthProviderUsageClassification>('authentication.providerUsage', { providerId, extensionId }); + this.telemetryService.publicLog2<{ extensionId: string; providerId: string }, AuthProviderUsageClassification>('authentication.providerUsage', { providerId, extensionId }); addAccountUsage(this.storageService, providerId, session.account.label, extensionId, extensionName); } diff --git a/src/vs/workbench/api/browser/mainThreadCLICommands.ts b/src/vs/workbench/api/browser/mainThreadCLICommands.ts index 863d73cb679e7..c8b3aef634025 100644 --- a/src/vs/workbench/api/browser/mainThreadCLICommands.ts +++ b/src/vs/workbench/api/browser/mainThreadCLICommands.ts @@ -45,7 +45,7 @@ CommandsRegistry.registerCommand('_remoteCLI.getSystemStatus', function (accesso }); interface ManageExtensionsArgs { - list?: { showVersions?: boolean, category?: string; }; + list?: { showVersions?: boolean; category?: string }; install?: (string | URI)[]; uninstall?: string[]; force?: boolean; diff --git a/src/vs/workbench/api/browser/mainThreadCustomEditors.ts b/src/vs/workbench/api/browser/mainThreadCustomEditors.ts index 64937947a22c7..27c48ff72c581 100644 --- a/src/vs/workbench/api/browser/mainThreadCustomEditors.ts +++ b/src/vs/workbench/api/browser/mainThreadCustomEditors.ts @@ -226,7 +226,7 @@ export class MainThreadCustomEditors extends Disposable implements extHostProtoc modelType: CustomEditorModelType, resource: URI, viewType: string, - options: { backupId?: string; }, + options: { backupId?: string }, cancellation: CancellationToken, ): Promise> { const existingModel = this._customEditorService.models.tryRetain(resource, viewType); @@ -348,7 +348,7 @@ class MainThreadCustomEditorModel extends ResourceWorkingCopy implements ICustom proxy: extHostProtocol.ExtHostCustomEditorsShape, viewType: string, resource: URI, - options: { backupId?: string; }, + options: { backupId?: string }, getEditors: () => CustomEditorInput[], cancellation: CancellationToken, ): Promise { diff --git a/src/vs/workbench/api/browser/mainThreadDocuments.ts b/src/vs/workbench/api/browser/mainThreadDocuments.ts index b8bdfc90f4dc3..77cdfebb8019a 100644 --- a/src/vs/workbench/api/browser/mainThreadDocuments.ts +++ b/src/vs/workbench/api/browser/mainThreadDocuments.ts @@ -25,7 +25,7 @@ import { IExtHostContext } from 'vs/workbench/services/extensions/common/extHost export class BoundModelReferenceCollection { - private _data = new Array<{ uri: URI, length: number, dispose(): void }>(); + private _data = new Array<{ uri: URI; length: number; dispose(): void }>(); private _length = 0; constructor( @@ -52,7 +52,7 @@ export class BoundModelReferenceCollection { add(uri: URI, ref: IReference, length: number = 0): void { // const length = ref.object.textEditorModel.getValueLength(); let handle: any; - let entry: { uri: URI, length: number, dispose(): void }; + let entry: { uri: URI; length: number; dispose(): void }; const dispose = () => { const idx = this._data.indexOf(entry); if (idx >= 0) { @@ -194,7 +194,7 @@ export class MainThreadDocuments extends Disposable implements MainThreadDocumen this._modelTrackers.set(model.uri, new ModelTracker(model, this._onIsCaughtUpWithContentChanges, this._proxy, this._textFileService)); } - private _onModelModeChanged(event: { model: ITextModel; oldLanguageId: string; }): void { + private _onModelModeChanged(event: { model: ITextModel; oldLanguageId: string }): void { let { model } = event; if (!this._modelIsSynced.has(model.uri)) { return; @@ -251,7 +251,7 @@ export class MainThreadDocuments extends Disposable implements MainThreadDocumen }); } - $tryCreateDocument(options?: { language?: string, content?: string }): Promise { + $tryCreateDocument(options?: { language?: string; content?: string }): Promise { return this._doCreateUntitled(undefined, options ? options.language : undefined, options ? options.content : undefined); } diff --git a/src/vs/workbench/api/browser/mainThreadEditorTabs.ts b/src/vs/workbench/api/browser/mainThreadEditorTabs.ts index bc995e579c07d..34f78bcba5e3f 100644 --- a/src/vs/workbench/api/browser/mainThreadEditorTabs.ts +++ b/src/vs/workbench/api/browser/mainThreadEditorTabs.ts @@ -23,7 +23,7 @@ export class MainThreadEditorTabs { private readonly _dispoables = new DisposableStore(); private readonly _proxy: IExtHostEditorTabsShape; private readonly _tabModel: Map = new Map(); - private _currentlyActiveTab: { groupId: number, tab: IEditorTabDto } | undefined = undefined; + private _currentlyActiveTab: { groupId: number; tab: IEditorTabDto } | undefined = undefined; constructor( extHostContext: IExtHostContext, diff --git a/src/vs/workbench/api/browser/mainThreadEditors.ts b/src/vs/workbench/api/browser/mainThreadEditors.ts index 31b08683d5ce1..feba5fdc8e2b1 100644 --- a/src/vs/workbench/api/browser/mainThreadEditors.ts +++ b/src/vs/workbench/api/browser/mainThreadEditors.ts @@ -57,9 +57,9 @@ export class MainThreadTextEditors implements MainThreadTextEditorsShape { private readonly _proxy: ExtHostEditorsShape; private readonly _documentsAndEditors: MainThreadDocumentsAndEditors; private readonly _toDispose = new DisposableStore(); - private _textEditorsListenersMap: { [editorId: string]: IDisposable[]; }; + private _textEditorsListenersMap: { [editorId: string]: IDisposable[] }; private _editorPositionData: ITextEditorPositionData | null; - private _registeredDecorationTypes: { [decorationType: string]: boolean; }; + private _registeredDecorationTypes: { [decorationType: string]: boolean }; constructor( documentsAndEditors: MainThreadDocumentsAndEditors, diff --git a/src/vs/workbench/api/browser/mainThreadExtensionService.ts b/src/vs/workbench/api/browser/mainThreadExtensionService.ts index a7d7d850745cd..6456ee59f1170 100644 --- a/src/vs/workbench/api/browser/mainThreadExtensionService.ts +++ b/src/vs/workbench/api/browser/mainThreadExtensionService.ts @@ -211,7 +211,7 @@ class ExtensionHostProxy implements IExtensionHostProxy { activate(extensionId: ExtensionIdentifier, reason: ExtensionActivationReason): Promise { return this._actual.$activate(extensionId, reason); } - setRemoteEnvironment(env: { [key: string]: string | null; }): Promise { + setRemoteEnvironment(env: { [key: string]: string | null }): Promise { return this._actual.$setRemoteEnvironment(env); } updateRemoteConnectionData(connectionData: IRemoteConnectionData): Promise { diff --git a/src/vs/workbench/api/browser/mainThreadKeytar.ts b/src/vs/workbench/api/browser/mainThreadKeytar.ts index 628a1e5b18f4d..8b7649ada1f4b 100644 --- a/src/vs/workbench/api/browser/mainThreadKeytar.ts +++ b/src/vs/workbench/api/browser/mainThreadKeytar.ts @@ -31,7 +31,7 @@ export class MainThreadKeytar implements MainThreadKeytarShape { return this._credentialsService.findPassword(service); } - async $findCredentials(service: string): Promise> { + async $findCredentials(service: string): Promise> { return this._credentialsService.findCredentials(service); } diff --git a/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts b/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts index 311781c11e9a2..61a9cd89fe1a2 100644 --- a/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts +++ b/src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts @@ -454,7 +454,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha // --- suggest - private static _inflateSuggestDto(defaultRange: IRange | { insert: IRange, replace: IRange; }, data: ISuggestDataDto): modes.CompletionItem { + private static _inflateSuggestDto(defaultRange: IRange | { insert: IRange; replace: IRange }, data: ISuggestDataDto): modes.CompletionItem { const label = data[ISuggestDataDtoField.label]; diff --git a/src/vs/workbench/api/browser/mainThreadLanguages.ts b/src/vs/workbench/api/browser/mainThreadLanguages.ts index 3e8326595b210..71c8c4ab1c2ca 100644 --- a/src/vs/workbench/api/browser/mainThreadLanguages.ts +++ b/src/vs/workbench/api/browser/mainThreadLanguages.ts @@ -62,7 +62,7 @@ export class MainThreadLanguages implements MainThreadLanguagesShape { } } - async $tokensAtPosition(resource: UriComponents, position: IPosition): Promise { + async $tokensAtPosition(resource: UriComponents, position: IPosition): Promise { const uri = URI.revive(resource); const model = this._modelService.getModel(uri); if (!model) { diff --git a/src/vs/workbench/api/browser/mainThreadMessageService.ts b/src/vs/workbench/api/browser/mainThreadMessageService.ts index 7b95dcc4e484a..5d7cc3c025af6 100644 --- a/src/vs/workbench/api/browser/mainThreadMessageService.ts +++ b/src/vs/workbench/api/browser/mainThreadMessageService.ts @@ -31,7 +31,7 @@ export class MainThreadMessageService implements MainThreadMessageServiceShape { // } - $showMessage(severity: Severity, message: string, options: MainThreadMessageOptions, commands: { title: string; isCloseAffordance: boolean; handle: number; }[]): Promise { + $showMessage(severity: Severity, message: string, options: MainThreadMessageOptions, commands: { title: string; isCloseAffordance: boolean; handle: number }[]): Promise { if (options.modal) { return this._showModalMessage(severity, message, options.detail, commands, options.useCustom); } else { @@ -39,7 +39,7 @@ export class MainThreadMessageService implements MainThreadMessageServiceShape { } } - private _showMessage(severity: Severity, message: string, commands: { title: string; isCloseAffordance: boolean; handle: number; }[], options: MainThreadMessageOptions): Promise { + private _showMessage(severity: Severity, message: string, commands: { title: string; isCloseAffordance: boolean; handle: number }[], options: MainThreadMessageOptions): Promise { return new Promise(resolve => { @@ -66,7 +66,7 @@ export class MainThreadMessageService implements MainThreadMessageServiceShape { primaryActions.push(new MessageItemAction('_extension_message_handle_' + command.handle, command.title, command.handle)); }); - let source: string | { label: string, id: string; } | undefined; + let source: string | { label: string; id: string } | undefined; if (options.source) { source = { label: nls.localize('extensionSource', "{0} (Extension)", options.source.label), @@ -100,7 +100,7 @@ export class MainThreadMessageService implements MainThreadMessageServiceShape { }); } - private async _showModalMessage(severity: Severity, message: string, detail: string | undefined, commands: { title: string; isCloseAffordance: boolean; handle: number; }[], useCustom?: boolean): Promise { + private async _showModalMessage(severity: Severity, message: string, detail: string | undefined, commands: { title: string; isCloseAffordance: boolean; handle: number }[], useCustom?: boolean): Promise { let cancelId: number | undefined = undefined; const buttons = commands.map((command, index) => { diff --git a/src/vs/workbench/api/browser/mainThreadNotebook.ts b/src/vs/workbench/api/browser/mainThreadNotebook.ts index ca7067d41d01d..0cb8fffbbda42 100644 --- a/src/vs/workbench/api/browser/mainThreadNotebook.ts +++ b/src/vs/workbench/api/browser/mainThreadNotebook.ts @@ -22,7 +22,7 @@ export class MainThreadNotebooks implements MainThreadNotebookShape { private readonly _disposables = new DisposableStore(); private readonly _proxy: ExtHostNotebookShape; - private readonly _notebookProviders = new Map(); + private readonly _notebookProviders = new Map(); private readonly _notebookSerializer = new Map(); private readonly _notebookCellStatusBarRegistrations = new Map(); @@ -81,7 +81,7 @@ export class MainThreadNotebooks implements MainThreadNotebookShape { this._notebookProviders.set(viewType, { controller, disposable }); } - async $updateNotebookProviderOptions(viewType: string, options?: { transientOutputs: boolean; transientCellMetadata: TransientCellMetadata; transientDocumentMetadata: TransientDocumentMetadata; }): Promise { + async $updateNotebookProviderOptions(viewType: string, options?: { transientOutputs: boolean; transientCellMetadata: TransientCellMetadata; transientDocumentMetadata: TransientDocumentMetadata }): Promise { const provider = this._notebookProviders.get(viewType); if (provider && options) { diff --git a/src/vs/workbench/api/browser/mainThreadNotebookDocuments.ts b/src/vs/workbench/api/browser/mainThreadNotebookDocuments.ts index eef4cefbb6456..ea7c35b6a3234 100644 --- a/src/vs/workbench/api/browser/mainThreadNotebookDocuments.ts +++ b/src/vs/workbench/api/browser/mainThreadNotebookDocuments.ts @@ -128,7 +128,7 @@ export class MainThreadNotebookDocuments implements MainThreadNotebookDocumentsS } - async $tryCreateNotebook(options: { viewType: string, content?: NotebookDataDto }): Promise { + async $tryCreateNotebook(options: { viewType: string; content?: NotebookDataDto }): Promise { const ref = await this._notebookEditorModelResolverService.resolve({ untitledResource: undefined }, options.viewType); // untitled notebooks are disposed when they get saved. we should not hold a reference diff --git a/src/vs/workbench/api/browser/mainThreadNotebookKernels.ts b/src/vs/workbench/api/browser/mainThreadNotebookKernels.ts index 00d42ead426ad..a18937742706b 100644 --- a/src/vs/workbench/api/browser/mainThreadNotebookKernels.ts +++ b/src/vs/workbench/api/browser/mainThreadNotebookKernels.ts @@ -22,7 +22,7 @@ import { ExtHostContext, ExtHostNotebookKernelsShape, ICellExecuteUpdateDto, ICe abstract class MainThreadKernel implements INotebookKernel { private readonly _onDidChange = new Emitter(); - private readonly preloads: { uri: URI, provides: string[]; }[]; + private readonly preloads: { uri: URI; provides: string[] }[]; readonly onDidChange: Event = this._onDidChange.event; readonly id: string; diff --git a/src/vs/workbench/api/browser/mainThreadProgress.ts b/src/vs/workbench/api/browser/mainThreadProgress.ts index 2668401f75050..7fa98113c3071 100644 --- a/src/vs/workbench/api/browser/mainThreadProgress.ts +++ b/src/vs/workbench/api/browser/mainThreadProgress.ts @@ -22,7 +22,7 @@ class ManageExtensionAction extends Action { export class MainThreadProgress implements MainThreadProgressShape { private readonly _progressService: IProgressService; - private _progress = new Map void, progress: IProgress }>(); + private _progress = new Map void; progress: IProgress }>(); private readonly _proxy: ExtHostProgressShape; constructor( diff --git a/src/vs/workbench/api/browser/mainThreadQuickOpen.ts b/src/vs/workbench/api/browser/mainThreadQuickOpen.ts index a104d7296ef7a..001745bf29a0e 100644 --- a/src/vs/workbench/api/browser/mainThreadQuickOpen.ts +++ b/src/vs/workbench/api/browser/mainThreadQuickOpen.ts @@ -14,7 +14,7 @@ interface QuickInputSession { handlesToItems: Map; } -function reviveIconPathUris(iconPath: { dark: URI; light?: URI | undefined; }) { +function reviveIconPathUris(iconPath: { dark: URI; light?: URI | undefined }) { iconPath.dark = URI.revive(iconPath.dark); if (iconPath.light) { iconPath.light = URI.revive(iconPath.light); diff --git a/src/vs/workbench/api/browser/mainThreadSCM.ts b/src/vs/workbench/api/browser/mainThreadSCM.ts index 609a898172ae9..9570c503bbae1 100644 --- a/src/vs/workbench/api/browser/mainThreadSCM.ts +++ b/src/vs/workbench/api/browser/mainThreadSCM.ts @@ -96,7 +96,7 @@ class MainThreadSCMProvider implements ISCMProvider { get id(): string { return this._id; } readonly groups = new Sequence(); - private readonly _groupsByHandle: { [handle: number]: MainThreadSCMResourceGroup; } = Object.create(null); + private readonly _groupsByHandle: { [handle: number]: MainThreadSCMResourceGroup } = Object.create(null); // get groups(): ISequence { // return { diff --git a/src/vs/workbench/api/browser/mainThreadSaveParticipant.ts b/src/vs/workbench/api/browser/mainThreadSaveParticipant.ts index b6bfe526420fb..fd39c8a6fbfec 100644 --- a/src/vs/workbench/api/browser/mainThreadSaveParticipant.ts +++ b/src/vs/workbench/api/browser/mainThreadSaveParticipant.ts @@ -23,7 +23,7 @@ class ExtHostSaveParticipant implements ITextFileSaveParticipant { this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostDocumentSaveParticipant); } - async participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason; }, _progress: IProgress, token: CancellationToken): Promise { + async participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }, _progress: IProgress, token: CancellationToken): Promise { if (!editorModel.textEditorModel || !shouldSynchronizeModel(editorModel.textEditorModel)) { // the model never made it to the extension diff --git a/src/vs/workbench/api/browser/mainThreadStatusBar.ts b/src/vs/workbench/api/browser/mainThreadStatusBar.ts index dbac179448d78..916f8f65f290c 100644 --- a/src/vs/workbench/api/browser/mainThreadStatusBar.ts +++ b/src/vs/workbench/api/browser/mainThreadStatusBar.ts @@ -16,7 +16,7 @@ import { IMarkdownString } from 'vs/base/common/htmlContent'; @extHostNamedCustomer(MainContext.MainThreadStatusBar) export class MainThreadStatusBar implements MainThreadStatusBarShape { - private readonly entries: Map = new Map(); + private readonly entries: Map = new Map(); constructor( _extHostContext: IExtHostContext, diff --git a/src/vs/workbench/api/browser/mainThreadTask.ts b/src/vs/workbench/api/browser/mainThreadTask.ts index c7c7c3579c26f..60575f37b1fb8 100644 --- a/src/vs/workbench/api/browser/mainThreadTask.ts +++ b/src/vs/workbench/api/browser/mainThreadTask.ts @@ -403,7 +403,7 @@ export class MainThreadTask implements MainThreadTaskShape { private readonly _extHostContext: IExtHostContext | undefined; private readonly _proxy: ExtHostTaskShape; - private readonly _providers: Map; + private readonly _providers: Map; constructor( extHostContext: IExtHostContext, diff --git a/src/vs/workbench/api/browser/mainThreadTerminalService.ts b/src/vs/workbench/api/browser/mainThreadTerminalService.ts index f846dc37c15b5..facfe7f0b3bcd 100644 --- a/src/vs/workbench/api/browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/browser/mainThreadTerminalService.ts @@ -154,7 +154,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape await terminal; } - private async _deserializeParentTerminal(location?: TerminalLocation | TerminalEditorLocationOptions | { parentTerminal: ExtHostTerminalIdentifier } | { splitActiveTerminal: boolean, location?: TerminalLocation }): Promise { + private async _deserializeParentTerminal(location?: TerminalLocation | TerminalEditorLocationOptions | { parentTerminal: ExtHostTerminalIdentifier } | { splitActiveTerminal: boolean; location?: TerminalLocation }): Promise { if (typeof location === 'object' && 'parentTerminal' in location) { const parentTerminal = await this._extHostTerminals.get(location.parentTerminal.toString()); return parentTerminal ? { parentTerminal } : undefined; diff --git a/src/vs/workbench/api/browser/mainThreadTesting.ts b/src/vs/workbench/api/browser/mainThreadTesting.ts index 743ea302a1a58..02147f101becd 100644 --- a/src/vs/workbench/api/browser/mainThreadTesting.ts +++ b/src/vs/workbench/api/browser/mainThreadTesting.ts @@ -42,7 +42,7 @@ export class MainThreadTesting extends Disposable implements MainThreadTestingSh instance: IMainThreadTestController; label: MutableObservableValue; canRefresh: MutableObservableValue; - disposable: IDisposable + disposable: IDisposable; }>(); constructor( diff --git a/src/vs/workbench/api/browser/mainThreadTreeViews.ts b/src/vs/workbench/api/browser/mainThreadTreeViews.ts index b1e83d5ee63ed..a8ea99b553f67 100644 --- a/src/vs/workbench/api/browser/mainThreadTreeViews.ts +++ b/src/vs/workbench/api/browser/mainThreadTreeViews.ts @@ -32,7 +32,7 @@ export class MainThreadTreeViews extends Disposable implements MainThreadTreeVie this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostTreeViews); } - async $registerTreeViewDataProvider(treeViewId: string, options: { showCollapseAll: boolean, canSelectMany: boolean, dragAndDropMimeTypes: string[] | undefined, hasHandleDrag: boolean }): Promise { + async $registerTreeViewDataProvider(treeViewId: string, options: { showCollapseAll: boolean; canSelectMany: boolean; dragAndDropMimeTypes: string[] | undefined; hasHandleDrag: boolean }): Promise { this.logService.trace('MainThreadTreeViews#$registerTreeViewDataProvider', treeViewId, options); this.extensionService.whenInstalledExtensionsRegistered().then(() => { @@ -56,7 +56,7 @@ export class MainThreadTreeViews extends Disposable implements MainThreadTreeVie }); } - $reveal(treeViewId: string, itemInfo: { item: ITreeItem, parentChain: ITreeItem[] } | undefined, options: IRevealOptions): Promise { + $reveal(treeViewId: string, itemInfo: { item: ITreeItem; parentChain: ITreeItem[] } | undefined, options: IRevealOptions): Promise { this.logService.trace('MainThreadTreeViews#$reveal', treeViewId, itemInfo?.item, itemInfo?.parentChain, options); return this.viewsService.openView(treeViewId, options.focus) diff --git a/src/vs/workbench/api/browser/mainThreadTunnelService.ts b/src/vs/workbench/api/browser/mainThreadTunnelService.ts index a451d51fe247b..4b4fcc38903a3 100644 --- a/src/vs/workbench/api/browser/mainThreadTunnelService.ts +++ b/src/vs/workbench/api/browser/mainThreadTunnelService.ts @@ -145,7 +145,7 @@ export class MainThreadTunnelService extends Disposable implements MainThreadTun }]); } - async $closeTunnel(remote: { host: string, port: number }): Promise { + async $closeTunnel(remote: { host: string; port: number }): Promise { return this.remoteExplorerService.close(remote); } diff --git a/src/vs/workbench/api/browser/mainThreadUrls.ts b/src/vs/workbench/api/browser/mainThreadUrls.ts index d589dea96618b..0485454906d18 100644 --- a/src/vs/workbench/api/browser/mainThreadUrls.ts +++ b/src/vs/workbench/api/browser/mainThreadUrls.ts @@ -32,7 +32,7 @@ class ExtensionUrlHandler implements IURLHandler { export class MainThreadUrls implements MainThreadUrlsShape { private readonly proxy: ExtHostUrlsShape; - private handlers = new Map(); + private handlers = new Map(); constructor( context: IExtHostContext, diff --git a/src/vs/workbench/api/browser/mainThreadWebviewViews.ts b/src/vs/workbench/api/browser/mainThreadWebviewViews.ts index ed8173e97405e..bc4cdd6781b53 100644 --- a/src/vs/workbench/api/browser/mainThreadWebviewViews.ts +++ b/src/vs/workbench/api/browser/mainThreadWebviewViews.ts @@ -56,7 +56,7 @@ export class MainThreadWebviewsViews extends Disposable implements extHostProtoc public $registerWebviewViewProvider( extensionData: extHostProtocol.WebviewExtensionDescription, viewType: string, - options: { retainContextWhenHidden?: boolean, serializeBuffersForPostMessage: boolean } + options: { retainContextWhenHidden?: boolean; serializeBuffersForPostMessage: boolean } ): void { if (this._webviewViewProviders.has(viewType)) { throw new Error(`View provider for ${viewType} already registered`); diff --git a/src/vs/workbench/api/browser/mainThreadWorkspace.ts b/src/vs/workbench/api/browser/mainThreadWorkspace.ts index 02b52e2859967..ab289ef5b5abf 100644 --- a/src/vs/workbench/api/browser/mainThreadWorkspace.ts +++ b/src/vs/workbench/api/browser/mainThreadWorkspace.ts @@ -31,7 +31,7 @@ import { ExtHostContext, ExtHostWorkspaceShape, ITextSearchComplete, IWorkspaceD export class MainThreadWorkspace implements MainThreadWorkspaceShape { private readonly _toDispose = new DisposableStore(); - private readonly _activeCancelTokens: { [id: number]: CancellationTokenSource; } = Object.create(null); + private readonly _activeCancelTokens: { [id: number]: CancellationTokenSource } = Object.create(null); private readonly _proxy: ExtHostWorkspaceShape; private readonly _queryBuilder = this._instantiationService.createInstance(QueryBuilder); @@ -75,7 +75,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape { // --- workspace --- - $updateWorkspaceFolders(extensionName: string, index: number, deleteCount: number, foldersToAdd: { uri: UriComponents, name?: string; }[]): Promise { + $updateWorkspaceFolders(extensionName: string, index: number, deleteCount: number, foldersToAdd: { uri: UriComponents; name?: string }[]): Promise { const workspaceFoldersToAdd = foldersToAdd.map(f => ({ uri: URI.revive(f.uri), name: f.name })); // Indicate in status message diff --git a/src/vs/workbench/api/browser/viewsExtensionPoint.ts b/src/vs/workbench/api/browser/viewsExtensionPoint.ts index ff95e5d8b0236..e8ab7ef610b1c 100644 --- a/src/vs/workbench/api/browser/viewsExtensionPoint.ts +++ b/src/vs/workbench/api/browser/viewsExtensionPoint.ts @@ -401,7 +401,7 @@ class ViewsExtensionHandler implements IWorkbenchContribution { private addViews(extensions: readonly IExtensionPointUser[]): void { const viewIds: Set = new Set(); - const allViewDescriptors: { views: IViewDescriptor[], viewContainer: ViewContainer }[] = []; + const allViewDescriptors: { views: IViewDescriptor[]; viewContainer: ViewContainer }[] = []; for (const extension of extensions) { const { value, collector } = extension; diff --git a/src/vs/workbench/api/common/exHostSecretState.ts b/src/vs/workbench/api/common/exHostSecretState.ts index b06f124509486..1e906df3f01c4 100644 --- a/src/vs/workbench/api/common/exHostSecretState.ts +++ b/src/vs/workbench/api/common/exHostSecretState.ts @@ -10,14 +10,14 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' export class ExtHostSecretState implements ExtHostSecretStateShape { private _proxy: MainThreadSecretStateShape; - private _onDidChangePassword = new Emitter<{ extensionId: string, key: string }>(); + private _onDidChangePassword = new Emitter<{ extensionId: string; key: string }>(); readonly onDidChangePassword = this._onDidChangePassword.event; constructor(mainContext: IExtHostRpcService) { this._proxy = mainContext.getProxy(MainContext.MainThreadSecretState); } - async $onDidChangePassword(e: { extensionId: string, key: string }): Promise { + async $onDidChangePassword(e: { extensionId: string; key: string }): Promise { this._onDidChangePassword.fire(e); } diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index ccb0b2fe6c881..5567a2b0a9c74 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -322,7 +322,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I const installAge = Date.now() - new Date(initData.telemetryInfo.firstSessionDate).getTime(); return isNaN(installAge) ? false : installAge < 1000 * 60 * 60 * 24; // install age is less than a day }, - openExternal(uri: URI, options?: { allowContributedOpeners?: boolean | string; }) { + openExternal(uri: URI, options?: { allowContributedOpeners?: boolean | string }) { return extHostWindow.openUri(uri, { allowTunneling: !!initData.remote.authority, allowContributedOpeners: options?.allowContributedOpeners, @@ -657,7 +657,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I createOutputChannel(name: string): vscode.OutputChannel { return extHostOutputService.createOutputChannel(name, extension); }, - createWebviewPanel(viewType: string, title: string, showOptions: vscode.ViewColumn | { viewColumn: vscode.ViewColumn, preserveFocus?: boolean }, options?: vscode.WebviewPanelOptions & vscode.WebviewOptions): vscode.WebviewPanel { + createWebviewPanel(viewType: string, title: string, showOptions: vscode.ViewColumn | { viewColumn: vscode.ViewColumn; preserveFocus?: boolean }, options?: vscode.WebviewPanelOptions & vscode.WebviewOptions): vscode.WebviewPanel { return extHostWebviewPanels.createWebviewPanel(extension, viewType, title, showOptions, options); }, createWebviewTextEditorInset(editor: vscode.TextEditor, line: number, height: number, options?: vscode.WebviewOptions): vscode.WebviewEditorInset { @@ -691,7 +691,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I registerWebviewPanelSerializer: (viewType: string, serializer: vscode.WebviewPanelSerializer) => { return extHostWebviewPanels.registerWebviewPanelSerializer(extension, viewType, serializer); }, - registerCustomEditorProvider: (viewType: string, provider: vscode.CustomTextEditorProvider | vscode.CustomReadonlyEditorProvider, options: { webviewOptions?: vscode.WebviewPanelOptions, supportsMultipleEditorsPerDocument?: boolean } = {}) => { + registerCustomEditorProvider: (viewType: string, provider: vscode.CustomTextEditorProvider | vscode.CustomReadonlyEditorProvider, options: { webviewOptions?: vscode.WebviewPanelOptions; supportsMultipleEditorsPerDocument?: boolean } = {}) => { return extHostCustomEditors.registerCustomEditorProvider(extension, viewType, provider, options); }, registerFileDecorationProvider(provider: vscode.FileDecorationProvider) { @@ -714,8 +714,8 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I }, registerWebviewViewProvider(viewId: string, provider: vscode.WebviewViewProvider, options?: { webviewOptions?: { - retainContextWhenHidden?: boolean - } + retainContextWhenHidden?: boolean; + }; }) { return extHostWebviewViews.registerWebviewViewProvider(extension, viewId, provider, options?.webviewOptions); }, @@ -847,10 +847,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I set textDocuments(value) { throw errors.readonly(); }, - openTextDocument(uriOrFileNameOrOptions?: vscode.Uri | string | { language?: string; content?: string; }) { + openTextDocument(uriOrFileNameOrOptions?: vscode.Uri | string | { language?: string; content?: string }) { let uriPromise: Thenable; - const options = uriOrFileNameOrOptions as { language?: string; content?: string; }; + const options = uriOrFileNameOrOptions as { language?: string; content?: string }; if (typeof uriOrFileNameOrOptions === 'string') { uriPromise = Promise.resolve(URI.file(uriOrFileNameOrOptions)); } else if (URI.isUri(uriOrFileNameOrOptions)) { @@ -986,7 +986,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I checkProposedApiEnabled(extension, 'resolvers'); return extHostTunnelService.onDidChangeTunnels(listener, thisArg, disposables); }, - registerPortAttributesProvider: (portSelector: { pid?: number, portRange?: [number, number], commandMatcher?: RegExp }, provider: vscode.PortAttributesProvider) => { + registerPortAttributesProvider: (portSelector: { pid?: number; portRange?: [number, number]; commandMatcher?: RegExp }, provider: vscode.PortAttributesProvider) => { checkProposedApiEnabled(extension, 'portsAttributes'); return extHostTunnelService.registerPortsAttributesProvider(portSelector, provider); }, diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index a6eb55122a0b5..82125db818cd0 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -72,7 +72,7 @@ import { IStaticWorkspaceData } from 'vs/workbench/services/extensions/common/ex import { IResolveAuthorityResult } from 'vs/workbench/services/extensions/common/extensionHostProxy'; export interface IWorkspaceData extends IStaticWorkspaceData { - folders: { uri: UriComponents, name: string, index: number; }[]; + folders: { uri: UriComponents; name: string; index: number }[]; } export interface IConfigurationInitData extends IConfigurationData { @@ -112,15 +112,15 @@ export interface CommentChanges { readonly label?: string; readonly mode?: modes.CommentMode; readonly timestamp?: { - $mid: MarshalledId.Date + $mid: MarshalledId.Date; }; } export type CommentThreadChanges = Partial<{ - range: IRange, - label: string, - contextValue: string | null, - comments: CommentChanges[], + range: IRange; + label: string; + contextValue: string | null; + comments: CommentChanges[]; collapseState: modes.CommentThreadCollapsibleState; canReply: boolean; }>; @@ -141,7 +141,7 @@ export interface MainThreadAuthenticationShape extends IDisposable { $unregisterAuthenticationProvider(id: string): void; $ensureProvider(id: string): Promise; $sendDidChangeSessions(providerId: string, event: modes.AuthenticationSessionsChangeEvent): void; - $getSession(providerId: string, scopes: readonly string[], extensionId: string, extensionName: string, options: { createIfNone?: boolean, forceNewSession?: boolean | { detail: string; }, clearSessionPreference?: boolean; }): Promise; + $getSession(providerId: string, scopes: readonly string[], extensionId: string, extensionName: string, options: { createIfNone?: boolean; forceNewSession?: boolean | { detail: string }; clearSessionPreference?: boolean }): Promise; $removeSession(providerId: string, sessionId: string): Promise; } @@ -167,14 +167,14 @@ export interface MainThreadDialogOpenOptions { canSelectFiles?: boolean; canSelectFolders?: boolean; canSelectMany?: boolean; - filters?: { [name: string]: string[]; }; + filters?: { [name: string]: string[] }; title?: string; } export interface MainThreadDialogSaveOptions { defaultUri?: UriComponents; saveLabel?: string; - filters?: { [name: string]: string[]; }; + filters?: { [name: string]: string[] }; title?: string; } @@ -196,7 +196,7 @@ export interface MainThreadDocumentContentProvidersShape extends IDisposable { } export interface MainThreadDocumentsShape extends IDisposable { - $tryCreateDocument(options?: { language?: string; content?: string; }): Promise; + $tryCreateDocument(options?: { language?: string; content?: string }): Promise; $tryOpenDocument(uri: UriComponents): Promise; $trySaveDocument(uri: UriComponents): Promise; } @@ -259,9 +259,9 @@ export interface MainThreadTextEditorsShape extends IDisposable { } export interface MainThreadTreeViewsShape extends IDisposable { - $registerTreeViewDataProvider(treeViewId: string, options: { showCollapseAll: boolean, canSelectMany: boolean, dragAndDropMimeTypes: string[] | undefined, hasHandleDrag: boolean; }): Promise; - $refresh(treeViewId: string, itemsToRefresh?: { [treeItemHandle: string]: ITreeItem; }): Promise; - $reveal(treeViewId: string, itemInfo: { item: ITreeItem, parentChain: ITreeItem[]; } | undefined, options: IRevealOptions): Promise; + $registerTreeViewDataProvider(treeViewId: string, options: { showCollapseAll: boolean; canSelectMany: boolean; dragAndDropMimeTypes: string[] | undefined; hasHandleDrag: boolean }): Promise; + $refresh(treeViewId: string, itemsToRefresh?: { [treeItemHandle: string]: ITreeItem }): Promise; + $reveal(treeViewId: string, itemInfo: { item: ITreeItem; parentChain: ITreeItem[] } | undefined, options: IRevealOptions): Promise; $setMessage(treeViewId: string, message: string): void; $setTitle(treeViewId: string, title: string, description: string | undefined): void; } @@ -283,7 +283,7 @@ export interface MainThreadKeytarShape extends IDisposable { $setPassword(service: string, account: string, password: string): Promise; $deletePassword(service: string, account: string): Promise; $findPassword(service: string): Promise; - $findCredentials(service: string): Promise>; + $findCredentials(service: string): Promise>; } export interface IRegExpDto { @@ -395,20 +395,20 @@ export interface MainThreadLanguageFeaturesShape extends IDisposable { export interface MainThreadLanguagesShape extends IDisposable { $changeLanguage(resource: UriComponents, languageId: string): Promise; - $tokensAtPosition(resource: UriComponents, position: IPosition): Promise; + $tokensAtPosition(resource: UriComponents, position: IPosition): Promise; $setLanguageStatus(handle: number, status: ILanguageStatus): void; $removeLanguageStatus(handle: number): void; } export interface MainThreadMessageOptions { - source?: { identifier: ExtensionIdentifier, label: string; }; + source?: { identifier: ExtensionIdentifier; label: string }; modal?: boolean; detail?: string; useCustom?: boolean; } export interface MainThreadMessageServiceShape extends IDisposable { - $showMessage(severity: Severity, message: string, options: MainThreadMessageOptions, commands: { title: string; isCloseAffordance: boolean; handle: number; }[]): Promise; + $showMessage(severity: Severity, message: string, options: MainThreadMessageOptions, commands: { title: string; isCloseAffordance: boolean; handle: number }[]): Promise; } export interface MainThreadOutputServiceShape extends IDisposable { @@ -442,7 +442,7 @@ export interface TerminalLaunchConfig { shellArgs?: string[] | string; cwd?: string | UriComponents; env?: ITerminalEnvironment; - icon?: URI | { light: URI; dark: URI; } | ThemeIcon; + icon?: URI | { light: URI; dark: URI } | ThemeIcon; color?: string; initialText?: string; waitOnExit?: boolean; @@ -452,7 +452,7 @@ export interface TerminalLaunchConfig { isFeatureTerminal?: boolean; isExtensionOwnedTerminal?: boolean; useShellEnvironment?: boolean; - location?: TerminalLocation | { viewColumn: number, preserveFocus?: boolean; } | { parentTerminal: ExtHostTerminalIdentifier; } | { splitActiveTerminal: boolean; }; + location?: TerminalLocation | { viewColumn: number; preserveFocus?: boolean } | { parentTerminal: ExtHostTerminalIdentifier } | { splitActiveTerminal: boolean }; disablePersistence?: boolean; } @@ -614,7 +614,7 @@ export interface IEditorTabDto { resource?: UriComponents; editorId?: string; isActive: boolean; - additionalResourcesAndViewIds: { resource?: UriComponents, viewId?: string; }[]; + additionalResourcesAndViewIds: { resource?: UriComponents; viewId?: string }[]; } export interface IExtHostEditorTabsShape { @@ -682,7 +682,7 @@ export const enum WebviewMessageArrayBufferViewType { } export interface WebviewMessageArrayBufferReference { - readonly $$vscode_array_buffer_reference$$: true, + readonly $$vscode_array_buffer_reference$$: true; readonly index: number; @@ -727,7 +727,7 @@ export interface MainThreadWebviewPanelsShape extends IDisposable { $setTitle(handle: WebviewHandle, value: string): void; $setIconPath(handle: WebviewHandle, value: IWebviewIconPath | undefined): void; - $registerSerializer(viewType: string, options: { serializeBuffersForPostMessage: boolean; }): void; + $registerSerializer(viewType: string, options: { serializeBuffersForPostMessage: boolean }): void; $unregisterSerializer(viewType: string): void; } @@ -741,7 +741,7 @@ export interface MainThreadCustomEditorsShape extends IDisposable { } export interface MainThreadWebviewViewsShape extends IDisposable { - $registerWebviewViewProvider(extension: WebviewExtensionDescription, viewType: string, options: { retainContextWhenHidden?: boolean, serializeBuffersForPostMessage: boolean; }): void; + $registerWebviewViewProvider(extension: WebviewExtensionDescription, viewType: string, options: { retainContextWhenHidden?: boolean; serializeBuffersForPostMessage: boolean }): void; $unregisterWebviewViewProvider(viewType: string): void; $setWebviewViewTitle(handle: WebviewHandle, value: string | undefined): void; @@ -792,7 +792,7 @@ export interface ExtHostCustomEditorsShape { position: EditorGroupColumn, cancellation: CancellationToken ): Promise; - $createCustomDocument(resource: UriComponents, viewType: string, backupId: string | undefined, untitledDocumentData: VSBuffer | undefined, cancellation: CancellationToken): Promise<{ editable: boolean; }>; + $createCustomDocument(resource: UriComponents, viewType: string, backupId: string | undefined, untitledDocumentData: VSBuffer | undefined, cancellation: CancellationToken): Promise<{ editable: boolean }>; $disposeCustomDocument(resource: UriComponents, viewType: string): Promise; $undo(resource: UriComponents, viewType: string, editId: number, isDirty: boolean): Promise; @@ -845,7 +845,7 @@ export interface INotebookCellStatusBarListDto { export interface MainThreadNotebookShape extends IDisposable { $registerNotebookProvider(extension: NotebookExtensionDescription, viewType: string, options: notebookCommon.TransientOptions, registration: notebookCommon.INotebookContributionData | undefined): Promise; - $updateNotebookProviderOptions(viewType: string, options?: { transientOutputs: boolean; transientCellMetadata: notebookCommon.TransientCellMetadata; transientDocumentMetadata: notebookCommon.TransientDocumentMetadata; }): Promise; + $updateNotebookProviderOptions(viewType: string, options?: { transientOutputs: boolean; transientCellMetadata: notebookCommon.TransientCellMetadata; transientDocumentMetadata: notebookCommon.TransientDocumentMetadata }): Promise; $unregisterNotebookProvider(viewType: string): Promise; $registerNotebookSerializer(handle: number, extension: NotebookExtensionDescription, viewType: string, options: notebookCommon.TransientOptions, registration: notebookCommon.INotebookContributionData | undefined): void; @@ -867,7 +867,7 @@ export interface MainThreadNotebookEditorsShape extends IDisposable { } export interface MainThreadNotebookDocumentsShape extends IDisposable { - $tryCreateNotebook(options: { viewType: string, content?: NotebookDataDto; }): Promise; + $tryCreateNotebook(options: { viewType: string; content?: NotebookDataDto }): Promise; $tryOpenNotebook(uriComponents: UriComponents): Promise; $trySaveNotebook(uri: UriComponents): Promise; } @@ -884,7 +884,7 @@ export interface INotebookKernelDto2 { supportedLanguages?: string[]; supportsInterrupt?: boolean; supportsExecutionOrder?: boolean; - preloads?: { uri: UriComponents; provides: string[]; }[]; + preloads?: { uri: UriComponents; provides: string[] }[]; } export interface ICellExecuteOutputEditDto { @@ -944,7 +944,7 @@ export interface MainThreadUriOpenersShape extends IDisposable { export interface ExtHostUriOpenersShape { $canOpenUri(id: string, uri: UriComponents, token: CancellationToken): Promise; - $openUri(id: string, context: { resolvedUri: UriComponents, sourceUri: UriComponents; }, token: CancellationToken): Promise; + $openUri(id: string, context: { resolvedUri: UriComponents; sourceUri: UriComponents }, token: CancellationToken): Promise; } export interface ITextSearchComplete { @@ -956,7 +956,7 @@ export interface MainThreadWorkspaceShape extends IDisposable { $startTextSearch(query: search.IPatternInfo, folder: UriComponents | null, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise; $checkExists(folders: readonly UriComponents[], includes: string[], token: CancellationToken): Promise; $saveAll(includeUntitled?: boolean): Promise; - $updateWorkspaceFolders(extensionName: string, index: number, deleteCount: number, workspaceFoldersToAdd: { uri: UriComponents, name?: string; }[]): Promise; + $updateWorkspaceFolders(extensionName: string, index: number, deleteCount: number, workspaceFoldersToAdd: { uri: UriComponents; name?: string }[]): Promise; $resolveProxy(url: string): Promise; $requestWorkspaceTrust(options?: WorkspaceTrustRequestOptions): Promise; } @@ -1148,7 +1148,7 @@ export interface PortAttributesProviderSelector { export interface MainThreadTunnelServiceShape extends IDisposable { $openTunnel(tunnelOptions: TunnelOptions, source: string | undefined): Promise; - $closeTunnel(remote: { host: string, port: number; }): Promise; + $closeTunnel(remote: { host: string; port: number }): Promise; $getTunnels(): Promise; $setTunnelProvider(features?: TunnelProviderFeatures): Promise; $setRemoteTunnelService(processId: number): Promise; @@ -1179,7 +1179,7 @@ export interface ICommandHandlerDescriptionDto { export interface ExtHostCommandsShape { $executeContributedCommand(id: string, ...args: any[]): Promise; - $getContributedCommandHandlerDescriptions(): Promise<{ [id: string]: string | ICommandHandlerDescriptionDto; }>; + $getContributedCommandHandlerDescriptions(): Promise<{ [id: string]: string | ICommandHandlerDescriptionDto }>; } export interface ExtHostConfigurationShape { @@ -1304,7 +1304,7 @@ export interface ExtHostAuthenticationShape { } export interface ExtHostSecretStateShape { - $onDidChangePassword(e: { extensionId: string, key: string; }): Promise; + $onDidChangePassword(e: { extensionId: string; key: string }): Promise; } export interface ExtHostSearchShape { @@ -1322,7 +1322,7 @@ export interface ExtHostExtensionServiceShape { $extensionTestsExit(code: number): Promise; $activateByEvent(activationEvent: string, activationKind: ActivationKind): Promise; $activate(extensionId: ExtensionIdentifier, reason: ExtensionActivationReason): Promise; - $setRemoteEnvironment(env: { [key: string]: string | null; }): Promise; + $setRemoteEnvironment(env: { [key: string]: string | null }): Promise; $updateRemoteConnectionData(connectionData: IRemoteConnectionData): Promise; $deltaExtensions(toAdd: IExtensionDescription[], toRemove: ExtensionIdentifier[]): Promise; @@ -1402,7 +1402,7 @@ export interface ISuggestDataDto { [ISuggestDataDtoField.preselect]?: true; [ISuggestDataDtoField.insertText]?: string; [ISuggestDataDtoField.insertTextRules]?: modes.CompletionItemInsertTextRule; - [ISuggestDataDtoField.range]?: IRange | { insert: IRange, replace: IRange; }; + [ISuggestDataDtoField.range]?: IRange | { insert: IRange; replace: IRange }; [ISuggestDataDtoField.commitCharacters]?: string[]; [ISuggestDataDtoField.additionalTextEdits]?: ISingleEditOperation[]; [ISuggestDataDtoField.command]?: modes.Command; @@ -1419,7 +1419,7 @@ export const enum ISuggestResultDtoField { } export interface ISuggestResultDto { - [ISuggestResultDtoField.defaultRanges]: { insert: IRange, replace: IRange; }; + [ISuggestResultDtoField.defaultRanges]: { insert: IRange; replace: IRange }; [ISuggestResultDtoField.completions]: ISuggestDataDto[]; [ISuggestResultDtoField.isIncomplete]: undefined | true; [ISuggestResultDtoField.duration]: number; @@ -1442,19 +1442,19 @@ export interface ISignatureHelpContextDto { export type IInlayHintDto = CachedSessionItem>; -export type IInlayHintsDto = CachedSession<{ hints: IInlayHintDto[]; }>; +export type IInlayHintsDto = CachedSession<{ hints: IInlayHintDto[] }>; export type ILocationDto = Dto; export type ILocationLinkDto = Dto; export type IWorkspaceSymbolDto = CachedSessionItem>; -export type IWorkspaceSymbolsDto = CachedSession<{ symbols: IWorkspaceSymbolDto[]; }>; +export type IWorkspaceSymbolsDto = CachedSession<{ symbols: IWorkspaceSymbolDto[] }>; export interface IWorkspaceEditEntryMetadataDto { needsConfirmation: boolean; label: string; description?: string; - iconPath?: { id: string; } | UriComponents | { light: UriComponents, dark: UriComponents; }; + iconPath?: { id: string } | UriComponents | { light: UriComponents; dark: UriComponents }; } export const enum WorkspaceEditType { @@ -1483,9 +1483,9 @@ export type ICellEditOperationDto = notebookCommon.ICellPartialMetadataEdit | notebookCommon.IDocumentMetadataEdit | { - editType: notebookCommon.CellEditType.Replace, - index: number, - count: number, + editType: notebookCommon.CellEditType.Replace; + index: number; + count: number; cells: NotebookCellDataDto[]; }; @@ -1518,7 +1518,7 @@ export function reviveWorkspaceEditDto(data: IWorkspaceEditDto | undefined): mod return data; } -export type ICommandDto = { $ident?: number; } & modes.Command; +export type ICommandDto = { $ident?: number } & modes.Command; export interface ICodeActionDto { cacheId?: ChainedCacheId; @@ -1538,7 +1538,7 @@ export interface ICodeActionListDto { export interface ICodeActionProviderMetadataDto { readonly providedKinds?: readonly string[]; - readonly documentation?: ReadonlyArray<{ readonly kind: string, readonly command: ICommandDto; }>; + readonly documentation?: ReadonlyArray<{ readonly kind: string; readonly command: ICommandDto }>; } export type CacheId = number; @@ -1547,10 +1547,10 @@ export type ChainedCacheId = [CacheId, CacheId]; type CachedSessionItem = T & { cacheId?: ChainedCacheId }; type CachedSession = T & { cacheId?: CacheId }; -export type ILinksListDto = CachedSession<{ links: ILinkDto[]; }>; +export type ILinksListDto = CachedSession<{ links: ILinkDto[] }>; export type ILinkDto = CachedSessionItem>; -export type ICodeLensListDto = CachedSession<{ lenses: ICodeLensDto[]; }>; +export type ICodeLensListDto = CachedSession<{ lenses: ICodeLensDto[] }>; export type ICodeLensDto = CachedSessionItem>; export type ICallHierarchyItemDto = Dto; @@ -1607,7 +1607,7 @@ export interface ExtHostLanguageFeaturesShape { $provideWorkspaceSymbols(handle: number, search: string, token: CancellationToken): Promise; $resolveWorkspaceSymbol(handle: number, symbol: IWorkspaceSymbolDto, token: CancellationToken): Promise; $releaseWorkspaceSymbols(handle: number, id: number): void; - $provideRenameEdits(handle: number, resource: UriComponents, position: IPosition, newName: string, token: CancellationToken): Promise; + $provideRenameEdits(handle: number, resource: UriComponents, position: IPosition, newName: string, token: CancellationToken): Promise; $resolveRenameLocation(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise; $provideDocumentSemanticTokens(handle: number, resource: UriComponents, previousResultId: number, token: CancellationToken): Promise; $releaseDocumentSemanticTokens(handle: number, semanticColoringResultId: number): void; @@ -1708,13 +1708,13 @@ export interface ExtHostSCMShape { } export interface ExtHostTaskShape { - $provideTasks(handle: number, validTypes: { [key: string]: boolean; }): Promise; + $provideTasks(handle: number, validTypes: { [key: string]: boolean }): Promise; $resolveTask(handle: number, taskDTO: tasks.TaskDTO): Promise; $onDidStartTask(execution: tasks.TaskExecutionDTO, terminalId: number, resolvedDefinition: tasks.TaskDefinitionDTO): void; $onDidStartTaskProcess(value: tasks.TaskProcessStartedDTO): void; $onDidEndTaskProcess(value: tasks.TaskProcessEndedDTO): void; $OnDidEndTask(execution: tasks.TaskExecutionDTO): void; - $resolveVariables(workspaceFolder: UriComponents, toResolve: { process?: { name: string; cwd?: string; }, variables: string[]; }): Promise<{ process?: string; variables: { [key: string]: string; }; }>; + $resolveVariables(workspaceFolder: UriComponents, toResolve: { process?: { name: string; cwd?: string }; variables: string[] }): Promise<{ process?: string; variables: { [key: string]: string } }>; $jsonTasksSupported(): Promise; $findExecutable(command: string, cwd?: string, paths?: string[]): Promise; } @@ -1805,7 +1805,7 @@ export interface DecorationRequest { } export type DecorationData = [boolean, string, string, ThemeColor]; -export type DecorationReply = { [id: number]: DecorationData; }; +export type DecorationReply = { [id: number]: DecorationData }; export interface ExtHostDecorationsShape { $provideDecorations(handle: number, requests: DecorationRequest[], token: CancellationToken): Promise; @@ -1860,7 +1860,7 @@ export interface INotebookDocumentPropertiesChangeData { export interface INotebookModelAddedData { uri: UriComponents; versionId: number; - cells: NotebookCellDto[], + cells: NotebookCellDto[]; viewType: string; metadata?: notebookCommon.NotebookDocumentMetadata; } @@ -2021,7 +2021,7 @@ export interface MainThreadThemingShape extends IDisposable { export interface ExtHostTunnelServiceShape { $forwardPort(tunnelOptions: TunnelOptions, tunnelCreationOptions: TunnelCreationOptions): Promise; - $closeTunnel(remote: { host: string, port: number; }, silent?: boolean): Promise; + $closeTunnel(remote: { host: string; port: number }, silent?: boolean): Promise; $onDidTunnelsChange(): Promise; $registerCandidateFinder(enable: boolean): Promise; $applyCandidateFilter(candidates: CandidatePort[]): Promise; diff --git a/src/vs/workbench/api/common/extHostApiCommands.ts b/src/vs/workbench/api/common/extHostApiCommands.ts index 92ff750977c34..b1ff7d8dc0c37 100644 --- a/src/vs/workbench/api/common/extHostApiCommands.ts +++ b/src/vs/workbench/api/common/extHostApiCommands.ts @@ -155,7 +155,7 @@ const newCommands: ApiCommand[] = [ new ApiCommand( 'vscode.prepareRename', '_executePrepareRename', 'Execute the prepareRename of rename provider.', [ApiCommandArgument.Uri, ApiCommandArgument.Position], - new ApiCommandResult('A promise that resolves to a range and placeholder text.', value => { + new ApiCommandResult('A promise that resolves to a range and placeholder text.', value => { if (!value) { return undefined; } @@ -321,7 +321,7 @@ const newCommands: ApiCommand[] = [ 'vscode.executeColorPresentationProvider', '_executeColorPresentationProvider', 'Execute color presentation provider.', [ new ApiCommandArgument('color', 'The color to show and insert', v => v instanceof types.Color, typeConverters.Color.from), - new ApiCommandArgument<{ uri: URI, range: types.Range; }, { uri: URI, range: IRange; }>('context', 'Context object with uri and range', _v => true, v => ({ uri: v.uri, range: typeConverters.Range.from(v.range) })), + new ApiCommandArgument<{ uri: URI; range: types.Range }, { uri: URI; range: IRange }>('context', 'Context object with uri and range', _v => true, v => ({ uri: v.uri, range: typeConverters.Range.from(v.range) })), ], new ApiCommandResult('A promise that resolves to an array of ColorPresentation objects.', result => { if (result) { @@ -349,12 +349,12 @@ const newCommands: ApiCommand[] = [ new ApiCommandResult<{ viewType: string; displayName: string; - options: { transientOutputs: boolean; transientCellMetadata: TransientCellMetadata; transientDocumentMetadata: TransientDocumentMetadata; }; - filenamePattern: (vscode.GlobPattern | { include: vscode.GlobPattern, exclude: vscode.GlobPattern })[] + options: { transientOutputs: boolean; transientCellMetadata: TransientCellMetadata; transientDocumentMetadata: TransientDocumentMetadata }; + filenamePattern: (vscode.GlobPattern | { include: vscode.GlobPattern; exclude: vscode.GlobPattern })[]; }[], { viewType: string; displayName: string; - filenamePattern: (vscode.GlobPattern | { include: vscode.GlobPattern; exclude: vscode.GlobPattern; })[]; + filenamePattern: (vscode.GlobPattern | { include: vscode.GlobPattern; exclude: vscode.GlobPattern })[]; options: vscode.NotebookDocumentContentOptions; }[] | undefined>('A promise that resolves to an array of NotebookContentProvider static info objects.', tryMapWith(item => { return { diff --git a/src/vs/workbench/api/common/extHostApiDeprecationService.ts b/src/vs/workbench/api/common/extHostApiDeprecationService.ts index 44cce5ba2ef0e..b39792a54bf78 100644 --- a/src/vs/workbench/api/common/extHostApiDeprecationService.ts +++ b/src/vs/workbench/api/common/extHostApiDeprecationService.ts @@ -47,8 +47,8 @@ export class ExtHostApiDeprecationService implements IExtHostApiDeprecationServi apiId: string; }; type DeprecationTelemetryMeta = { - extensionId: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - apiId: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + extensionId: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + apiId: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; this._telemetryShape.$publicLog2('extHostDeprecatedApiUsage', { extensionId: extension.identifier.value, diff --git a/src/vs/workbench/api/common/extHostCodeInsets.ts b/src/vs/workbench/api/common/extHostCodeInsets.ts index dfd3ddfa1251b..9dbd644d15c52 100644 --- a/src/vs/workbench/api/common/extHostCodeInsets.ts +++ b/src/vs/workbench/api/common/extHostCodeInsets.ts @@ -16,7 +16,7 @@ export class ExtHostEditorInsets implements ExtHostEditorInsetsShape { private _handlePool = 0; private _disposables = new DisposableStore(); - private _insets = new Map }>(); + private _insets = new Map }>(); constructor( private readonly _proxy: MainThreadEditorInsetsShape, diff --git a/src/vs/workbench/api/common/extHostComments.ts b/src/vs/workbench/api/common/extHostComments.ts index 58416741e82f2..eb66331fa0961 100644 --- a/src/vs/workbench/api/common/extHostComments.ts +++ b/src/vs/workbench/api/common/extHostComments.ts @@ -217,11 +217,11 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo } } type CommentThreadModification = Partial<{ - range: vscode.Range, - label: string | undefined, - contextValue: string | undefined, - comments: vscode.Comment[], - collapsibleState: vscode.CommentThreadCollapsibleState + range: vscode.Range; + label: string | undefined; + contextValue: string | undefined; + comments: vscode.Comment[]; + collapsibleState: vscode.CommentThreadCollapsibleState; canReply: boolean; }>; @@ -622,7 +622,7 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo checkProposedApiEnabled(thread.extensionDescription, 'commentTimestamp'); } - let timestamp: { $mid: MarshalledId.Date, source: any } | undefined; + let timestamp: { $mid: MarshalledId.Date; source: any } | undefined; if (vscodeComment.timestamp) { timestamp = { source: vscodeComment.timestamp, diff --git a/src/vs/workbench/api/common/extHostConfiguration.ts b/src/vs/workbench/api/common/extHostConfiguration.ts index e8033334ac62c..eca1651b33b3d 100644 --- a/src/vs/workbench/api/common/extHostConfiguration.ts +++ b/src/vs/workbench/api/common/extHostConfiguration.ts @@ -37,8 +37,8 @@ type ConfigurationInspect = { defaultValue?: T; globalValue?: T; - workspaceValue?: T, - workspaceFolderValue?: T, + workspaceValue?: T; + workspaceFolderValue?: T; defaultLanguageValue?: T; globalLanguageValue?: T; @@ -52,7 +52,7 @@ function isUri(thing: any): thing is vscode.Uri { return thing instanceof URI; } -function isResourceLanguage(thing: any): thing is { uri: URI, languageId: string } { +function isResourceLanguage(thing: any): thing is { uri: URI; languageId: string } { return thing && thing.uri instanceof URI && (thing.languageId && typeof thing.languageId === 'string'); @@ -313,7 +313,7 @@ export class ExtHostConfigProvider { } } - private _toConfigurationChangeEvent(change: IConfigurationChange, previous: { data: IConfigurationData, workspace: Workspace | undefined }): vscode.ConfigurationChangeEvent { + private _toConfigurationChangeEvent(change: IConfigurationChange, previous: { data: IConfigurationData; workspace: Workspace | undefined }): vscode.ConfigurationChangeEvent { const event = new ConfigurationChangeEvent(change, previous, this._configuration, this._extHostWorkspace.workspace); return Object.freeze({ affectsConfiguration: (section: string, scope?: vscode.ConfigurationScope) => event.affectsConfiguration(section, scopeToOverrides(scope)) diff --git a/src/vs/workbench/api/common/extHostCustomEditors.ts b/src/vs/workbench/api/common/extHostCustomEditors.ts index 5f9a06d01dea8..7c9e25f6126b5 100644 --- a/src/vs/workbench/api/common/extHostCustomEditors.ts +++ b/src/vs/workbench/api/common/extHostCustomEditors.ts @@ -176,7 +176,7 @@ export class ExtHostCustomEditors implements extHostProtocol.ExtHostCustomEditor extension: IExtensionDescription, viewType: string, provider: vscode.CustomReadonlyEditorProvider | vscode.CustomTextEditorProvider, - options: { webviewOptions?: vscode.WebviewPanelOptions, supportsMultipleEditorsPerDocument?: boolean }, + options: { webviewOptions?: vscode.WebviewPanelOptions; supportsMultipleEditorsPerDocument?: boolean }, ): vscode.Disposable { const disposables = new DisposableStore(); if (isCustomTextEditorProvider(provider)) { diff --git a/src/vs/workbench/api/common/extHostDebugService.ts b/src/vs/workbench/api/common/extHostDebugService.ts index 2f284cadb503b..ac4d2f1542ff5 100644 --- a/src/vs/workbench/api/common/extHostDebugService.ts +++ b/src/vs/workbench/api/common/extHostDebugService.ts @@ -951,7 +951,7 @@ export class ExtHostVariableResolverService extends AbstractVariableResolverServ const tabs = editorTabs.tabs.filter(tab => tab.isActive); if (tabs.length > 0) { // Resolve a resource from the tab - const asSideBySideResource = tabs[0].resource as { primary?: URI, secondary?: URI } | undefined; + const asSideBySideResource = tabs[0].resource as { primary?: URI; secondary?: URI } | undefined; if (asSideBySideResource && (asSideBySideResource.primary || asSideBySideResource.secondary)) { return asSideBySideResource.primary ?? asSideBySideResource.secondary; } else { diff --git a/src/vs/workbench/api/common/extHostDocumentSaveParticipant.ts b/src/vs/workbench/api/common/extHostDocumentSaveParticipant.ts index fe6fd33037850..4b43d2f917aaa 100644 --- a/src/vs/workbench/api/common/extHostDocumentSaveParticipant.ts +++ b/src/vs/workbench/api/common/extHostDocumentSaveParticipant.ts @@ -27,7 +27,7 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic private readonly _logService: ILogService, private readonly _documents: ExtHostDocuments, private readonly _mainThreadBulkEdits: MainThreadBulkEditsShape, - private readonly _thresholds: { timeout: number; errors: number; } = { timeout: 1500, errors: 3 } + private readonly _thresholds: { timeout: number; errors: number } = { timeout: 1500, errors: 3 } ) { // } diff --git a/src/vs/workbench/api/common/extHostEditorTabs.ts b/src/vs/workbench/api/common/extHostEditorTabs.ts index 414d90f4580f9..409e257f697f8 100644 --- a/src/vs/workbench/api/common/extHostEditorTabs.ts +++ b/src/vs/workbench/api/common/extHostEditorTabs.ts @@ -20,7 +20,7 @@ export interface IEditorTab { resource: vscode.Uri | undefined; viewId: string | undefined; isActive: boolean; - additionalResourcesAndViewIds: { resource: vscode.Uri | undefined, viewId: string | undefined }[]; + additionalResourcesAndViewIds: { resource: vscode.Uri | undefined; viewId: string | undefined }[]; move(index: number, viewColumn: ViewColumn): Promise; close(): Promise; } diff --git a/src/vs/workbench/api/common/extHostExtensionActivator.ts b/src/vs/workbench/api/common/extHostExtensionActivator.ts index 71e8cd7c1fed4..59ff5889c3f47 100644 --- a/src/vs/workbench/api/common/extHostExtensionActivator.ts +++ b/src/vs/workbench/api/common/extHostExtensionActivator.ts @@ -29,10 +29,10 @@ export interface IExtensionAPI { } export type ExtensionActivationTimesFragment = { - startup?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true; }; - codeLoadingTime?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true; }; - activateCallTime?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true; }; - activateResolvedTime?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true; }; + startup?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + codeLoadingTime?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + activateCallTime?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + activateResolvedTime?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; }; export class ExtensionActivationTimes { @@ -162,7 +162,7 @@ export interface IExtensionsActivatorHost { actualActivateExtension(extensionId: ExtensionIdentifier, reason: ExtensionActivationReason): Promise; } -type ActivationIdAndReason = { id: ExtensionIdentifier, reason: ExtensionActivationReason; }; +type ActivationIdAndReason = { id: ExtensionIdentifier; reason: ExtensionActivationReason }; export class ExtensionsActivator implements IDisposable { @@ -177,7 +177,7 @@ export class ExtensionsActivator implements IDisposable { /** * A map of already activated events to speed things up if the same activation event is triggered multiple times. */ - private readonly _alreadyActivatedEvents: { [activationEvent: string]: boolean; }; + private readonly _alreadyActivatedEvents: { [activationEvent: string]: boolean }; constructor( registry: ExtensionDescriptionRegistry, @@ -247,7 +247,7 @@ export class ExtensionsActivator implements IDisposable { * Handle semantics related to dependencies for `currentExtension`. * semantics: `redExtensions` must wait for `greenExtensions`. */ - private _handleActivateRequest(currentActivation: ActivationIdAndReason, greenExtensions: { [id: string]: ActivationIdAndReason; }, redExtensions: ActivationIdAndReason[]): void { + private _handleActivateRequest(currentActivation: ActivationIdAndReason, greenExtensions: { [id: string]: ActivationIdAndReason }, redExtensions: ActivationIdAndReason[]): void { if (this._hostExtensionsMap.has(ExtensionIdentifier.toKey(currentActivation.id))) { greenExtensions[ExtensionIdentifier.toKey(currentActivation.id)] = currentActivation; return; @@ -354,7 +354,7 @@ export class ExtensionsActivator implements IDisposable { return Promise.resolve(undefined); } - const greenMap: { [id: string]: ActivationIdAndReason; } = Object.create(null), + const greenMap: { [id: string]: ActivationIdAndReason } = Object.create(null), red: ActivationIdAndReason[] = []; for (let i = 0, len = extensions.length; i < len; i++) { diff --git a/src/vs/workbench/api/common/extHostExtensionService.ts b/src/vs/workbench/api/common/extHostExtensionService.ts index 28b4f7759bafa..7d9e044afcc7f 100644 --- a/src/vs/workbench/api/common/extHostExtensionService.ts +++ b/src/vs/workbench/api/common/extHostExtensionService.ts @@ -62,14 +62,14 @@ export interface IHostUtils { } type TelemetryActivationEventFragment = { - id: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; - name: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; - extensionVersion: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; - publisherDisplayName: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - activationEvents: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - isBuiltin: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - reason: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - reasonId: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; + id: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; + name: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; + extensionVersion: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; + publisherDisplayName: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + activationEvents: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + isBuiltin: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + reason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + reasonId: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; }; export abstract class AbstractExtHostExtensionService extends Disposable implements ExtHostExtensionServiceShape { @@ -107,7 +107,7 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme private readonly _activator: ExtensionsActivator; private _extensionPathIndex: Promise> | null; - private readonly _resolvers: { [authorityPrefix: string]: vscode.RemoteAuthorityResolver; }; + private readonly _resolvers: { [authorityPrefix: string]: vscode.RemoteAuthorityResolver }; private _started: boolean; private _remoteConnectionData: IRemoteConnectionData | null; @@ -359,11 +359,11 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme private _logExtensionActivationTimes(extensionDescription: IExtensionDescription, reason: ExtensionActivationReason, outcome: string, activationTimes?: ExtensionActivationTimes) { const event = getTelemetryActivationEvent(extensionDescription, reason); type ExtensionActivationTimesClassification = { - outcome: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + outcome: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; } & TelemetryActivationEventFragment & ExtensionActivationTimesFragment; type ExtensionActivationTimesEvent = { - outcome: string + outcome: string; } & ActivationTimesEvent & TelemetryActivationEvent; type ActivationTimesEvent = { @@ -679,7 +679,7 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme // -- called by main thread - private async _activateAndGetResolver(remoteAuthority: string): Promise<{ authorityPrefix: string; resolver: vscode.RemoteAuthorityResolver | undefined; }> { + private async _activateAndGetResolver(remoteAuthority: string): Promise<{ authorityPrefix: string; resolver: vscode.RemoteAuthorityResolver | undefined }> { const authorityPlusIndex = remoteAuthority.indexOf('+'); if (authorityPlusIndex === -1) { throw new Error(`Not an authority that can be resolved!`); diff --git a/src/vs/workbench/api/common/extHostFileSystem.ts b/src/vs/workbench/api/common/extHostFileSystem.ts index ceb0d0a549e94..482fc33dbc5e7 100644 --- a/src/vs/workbench/api/common/extHostFileSystem.ts +++ b/src/vs/workbench/api/common/extHostFileSystem.ts @@ -129,7 +129,7 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape { } - registerFileSystemProvider(extension: IExtensionDescription, scheme: string, provider: vscode.FileSystemProvider, options: { isCaseSensitive?: boolean, isReadonly?: boolean; } = {}) { + registerFileSystemProvider(extension: IExtensionDescription, scheme: string, provider: vscode.FileSystemProvider, options: { isCaseSensitive?: boolean; isReadonly?: boolean } = {}) { if (this._registeredSchemes.has(scheme)) { throw new Error(`a provider for the scheme '${scheme}' is already registered`); diff --git a/src/vs/workbench/api/common/extHostFileSystemConsumer.ts b/src/vs/workbench/api/common/extHostFileSystemConsumer.ts index 6d750ef77a568..1ea7b1862da72 100644 --- a/src/vs/workbench/api/common/extHostFileSystemConsumer.ts +++ b/src/vs/workbench/api/common/extHostFileSystemConsumer.ts @@ -95,7 +95,7 @@ export class ExtHostConsumerFileSystem { return ExtHostConsumerFileSystem._handleError(err); } }, - async delete(uri: vscode.Uri, options?: { recursive?: boolean; useTrash?: boolean; }): Promise { + async delete(uri: vscode.Uri, options?: { recursive?: boolean; useTrash?: boolean }): Promise { try { const provider = that._fileSystemProvider.get(uri.scheme); if (provider) { @@ -109,7 +109,7 @@ export class ExtHostConsumerFileSystem { return ExtHostConsumerFileSystem._handleError(err); } }, - async rename(oldUri: vscode.Uri, newUri: vscode.Uri, options?: { overwrite?: boolean; }): Promise { + async rename(oldUri: vscode.Uri, newUri: vscode.Uri, options?: { overwrite?: boolean }): Promise { try { // no shortcut: potentially involves different schemes, does mkdirp return await that._proxy.$rename(oldUri, newUri, { ...{ overwrite: false }, ...options }); @@ -117,7 +117,7 @@ export class ExtHostConsumerFileSystem { return ExtHostConsumerFileSystem._handleError(err); } }, - async copy(source: vscode.Uri, destination: vscode.Uri, options?: { overwrite?: boolean; }): Promise { + async copy(source: vscode.Uri, destination: vscode.Uri, options?: { overwrite?: boolean }): Promise { try { // no shortcut: potentially involves different schemes, does mkdirp return await that._proxy.$copy(source, destination, { ...{ overwrite: false }, ...options }); diff --git a/src/vs/workbench/api/common/extHostInteractive.ts b/src/vs/workbench/api/common/extHostInteractive.ts index 4d6628ac39b0a..b492b0c9ed410 100644 --- a/src/vs/workbench/api/common/extHostInteractive.ts +++ b/src/vs/workbench/api/common/extHostInteractive.ts @@ -27,7 +27,7 @@ export class ExtHostInteractive implements ExtHostInteractiveShape { new ApiCommandArgument('controllerId', 'Notebook controller Id', v => true, v => v), new ApiCommandArgument('title', 'Interactive editor title', v => true, v => v) ], - new ApiCommandResult<{ notebookUri: UriComponents, inputUri: UriComponents, notebookEditorId?: string }, { notebookUri: URI, inputUri: URI, notebookEditor?: NotebookEditor }>('Notebook and input URI', (v: { notebookUri: UriComponents, inputUri: UriComponents, notebookEditorId?: string }) => { + new ApiCommandResult<{ notebookUri: UriComponents; inputUri: UriComponents; notebookEditorId?: string }, { notebookUri: URI; inputUri: URI; notebookEditor?: NotebookEditor }>('Notebook and input URI', (v: { notebookUri: UriComponents; inputUri: UriComponents; notebookEditorId?: string }) => { if (v.notebookEditorId !== undefined) { const editor = this._extHostNotebooks.getEditorById(v.notebookEditorId); return { notebookUri: URI.revive(v.notebookUri), inputUri: URI.revive(v.inputUri), notebookEditor: editor.apiEditor }; diff --git a/src/vs/workbench/api/common/extHostLanguageFeatures.ts b/src/vs/workbench/api/common/extHostLanguageFeatures.ts index 5725608494134..38dc6a23d2072 100644 --- a/src/vs/workbench/api/common/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/common/extHostLanguageFeatures.ts @@ -699,9 +699,9 @@ class SemanticTokensPreviousResult { ) { } } -type RelaxedSemanticTokens = { readonly resultId?: string; readonly data: number[]; }; -type RelaxedSemanticTokensEdit = { readonly start: number; readonly deleteCount: number; readonly data?: number[]; }; -type RelaxedSemanticTokensEdits = { readonly resultId?: string; readonly edits: RelaxedSemanticTokensEdit[]; }; +type RelaxedSemanticTokens = { readonly resultId?: string; readonly data: number[] }; +type RelaxedSemanticTokensEdit = { readonly start: number; readonly deleteCount: number; readonly data?: number[] }; +type RelaxedSemanticTokensEdits = { readonly resultId?: string; readonly edits: RelaxedSemanticTokensEdit[] }; type ProvidedSemanticTokens = vscode.SemanticTokens | RelaxedSemanticTokens; type ProvidedSemanticTokensEdits = vscode.SemanticTokensEdits | RelaxedSemanticTokensEdits; @@ -1000,7 +1000,7 @@ class SuggestAdapter { } // 'overwrite[Before|After]'-logic - let range: vscode.Range | { inserting: vscode.Range, replacing: vscode.Range; } | undefined; + let range: vscode.Range | { inserting: vscode.Range; replacing: vscode.Range } | undefined; if (item.textEdit) { range = item.textEdit.range; } else if (item.range) { @@ -1668,7 +1668,7 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF private async _withAdapter( handle: number, - ctor: { new(...args: any[]): A; }, + ctor: { new(...args: any[]): A }, callback: (adapter: A, extension: IExtensionDescription) => Promise, fallbackValue: R, tokenToRaceAgainst: CancellationToken | undefined diff --git a/src/vs/workbench/api/common/extHostMemento.ts b/src/vs/workbench/api/common/extHostMemento.ts index 303e1ca90bc44..b18c4fce9acfd 100644 --- a/src/vs/workbench/api/common/extHostMemento.ts +++ b/src/vs/workbench/api/common/extHostMemento.ts @@ -16,7 +16,7 @@ export class ExtensionMemento implements vscode.Memento { protected readonly _storage: ExtHostStorage; private readonly _init: Promise; - private _value?: { [n: string]: any; }; + private _value?: { [n: string]: any }; private readonly _storageListener: IDisposable; private _deferredPromises: Map> = new Map(); diff --git a/src/vs/workbench/api/common/extHostMessageService.ts b/src/vs/workbench/api/common/extHostMessageService.ts index a9a9c5b6e17cc..93f71893ee740 100644 --- a/src/vs/workbench/api/common/extHostMessageService.ts +++ b/src/vs/workbench/api/common/extHostMessageService.ts @@ -49,7 +49,7 @@ export class ExtHostMessageService { checkProposedApiEnabled(extension, 'resolvers'); } - const commands: { title: string; isCloseAffordance: boolean; handle: number; }[] = []; + const commands: { title: string; isCloseAffordance: boolean; handle: number }[] = []; for (let handle = 0; handle < items.length; handle++) { const command = items[handle]; diff --git a/src/vs/workbench/api/common/extHostNotebook.ts b/src/vs/workbench/api/common/extHostNotebook.ts index 62a9af86b00e1..8bd8f2fe05082 100644 --- a/src/vs/workbench/api/common/extHostNotebook.ts +++ b/src/vs/workbench/api/common/extHostNotebook.ts @@ -225,7 +225,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape { }); } - async createNotebookDocument(options: { viewType: string, content?: vscode.NotebookData }): Promise { + async createNotebookDocument(options: { viewType: string; content?: vscode.NotebookData }): Promise { const canonicalUri = await this._notebookDocumentsProxy.$tryCreateNotebook({ viewType: options.viewType, content: options.content && typeConverters.NotebookData.from(options.content) diff --git a/src/vs/workbench/api/common/extHostNotebookKernels.ts b/src/vs/workbench/api/common/extHostNotebookKernels.ts index b267204b4fd61..493f691ec34d8 100644 --- a/src/vs/workbench/api/common/extHostNotebookKernels.ts +++ b/src/vs/workbench/api/common/extHostNotebookKernels.ts @@ -27,16 +27,16 @@ import { SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/ import * as vscode from 'vscode'; interface IKernelData { - extensionId: ExtensionIdentifier, + extensionId: ExtensionIdentifier; controller: vscode.NotebookController; - onDidChangeSelection: Emitter<{ selected: boolean; notebook: vscode.NotebookDocument; }>; - onDidReceiveMessage: Emitter<{ editor: vscode.NotebookEditor, message: any; }>; + onDidChangeSelection: Emitter<{ selected: boolean; notebook: vscode.NotebookDocument }>; + onDidReceiveMessage: Emitter<{ editor: vscode.NotebookEditor; message: any }>; associatedNotebooks: ResourceMap; } type ExtHostSelectKernelArgs = ControllerInfo | { notebookEditor: vscode.NotebookEditor } | ControllerInfo & { notebookEditor: vscode.NotebookEditor } | undefined; export type SelectKernelReturnArgs = ControllerInfo | { notebookEditorId: string } | ControllerInfo & { notebookEditorId: string } | undefined; -type ControllerInfo = { id: string, extension: string }; +type ControllerInfo = { id: string; extension: string }; export class ExtHostNotebookKernels implements ExtHostNotebookKernelsShape { @@ -104,8 +104,8 @@ export class ExtHostNotebookKernels implements ExtHostNotebookKernelsShape { let isDisposed = false; const commandDisposables = new DisposableStore(); - const onDidChangeSelection = new Emitter<{ selected: boolean, notebook: vscode.NotebookDocument; }>(); - const onDidReceiveMessage = new Emitter<{ editor: vscode.NotebookEditor, message: any; }>(); + const onDidChangeSelection = new Emitter<{ selected: boolean; notebook: vscode.NotebookDocument }>(); + const onDidReceiveMessage = new Emitter<{ editor: vscode.NotebookEditor; message: any }>(); const data: INotebookKernelDto2 = { id: createKernelId(extension, id), diff --git a/src/vs/workbench/api/common/extHostNotebookRenderers.ts b/src/vs/workbench/api/common/extHostNotebookRenderers.ts index 3cc008e101080..1b8925f8757cd 100644 --- a/src/vs/workbench/api/common/extHostNotebookRenderers.ts +++ b/src/vs/workbench/api/common/extHostNotebookRenderers.ts @@ -13,7 +13,7 @@ import * as vscode from 'vscode'; export class ExtHostNotebookRenderers implements ExtHostNotebookRenderersShape { - private readonly _rendererMessageEmitters = new Map>(); + private readonly _rendererMessageEmitters = new Map>(); private readonly proxy: MainThreadNotebookRenderersShape; constructor(mainContext: IMainContext, private readonly _extHostNotebook: ExtHostNotebookController) { @@ -37,7 +37,7 @@ export class ExtHostNotebookRenderers implements ExtHostNotebookRenderersShape { const messaging: vscode.NotebookRendererMessaging = { onDidReceiveMessage: (listener, thisArg, disposables) => { - const wrappedListener = notebookEditorVisible ? listener : (evt: { editor: vscode.NotebookEditor, message: any }) => { + const wrappedListener = notebookEditorVisible ? listener : (evt: { editor: vscode.NotebookEditor; message: any }) => { const obj = {}; notebookEditorAliases.set(obj, evt.editor); listener({ editor: obj as vscode.NotebookEditor, message: evt.message }); diff --git a/src/vs/workbench/api/common/extHostQuickOpen.ts b/src/vs/workbench/api/common/extHostQuickOpen.ts index 2ffbea93e83a1..a2f6efd3cbc1f 100644 --- a/src/vs/workbench/api/common/extHostQuickOpen.ts +++ b/src/vs/workbench/api/common/extHostQuickOpen.ts @@ -22,7 +22,7 @@ import { ThemeIcon as ThemeIconUtils } from 'vs/platform/theme/common/themeServi export type Item = string | QuickPickItem; export interface ExtHostQuickOpen { - showQuickPick(itemsOrItemsPromise: QuickPickItem[] | Promise, options: QuickPickOptions & { canPickMany: true; }, token?: CancellationToken): Promise; + showQuickPick(itemsOrItemsPromise: QuickPickItem[] | Promise, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): Promise; showQuickPick(itemsOrItemsPromise: string[] | Promise, options?: QuickPickOptions, token?: CancellationToken): Promise; showQuickPick(itemsOrItemsPromise: QuickPickItem[] | Promise, options?: QuickPickOptions, token?: CancellationToken): Promise; showQuickPick(itemsOrItemsPromise: Item[] | Promise, options?: QuickPickOptions, token?: CancellationToken): Promise; @@ -56,7 +56,7 @@ export function createExtHostQuickOpen(mainContext: IMainContext, workspace: IEx this._commands = commands; } - showQuickPick(itemsOrItemsPromise: QuickPickItem[] | Promise, options: QuickPickOptions & { canPickMany: true; }, token?: CancellationToken): Promise; + showQuickPick(itemsOrItemsPromise: QuickPickItem[] | Promise, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): Promise; showQuickPick(itemsOrItemsPromise: string[] | Promise, options?: QuickPickOptions, token?: CancellationToken): Promise; showQuickPick(itemsOrItemsPromise: QuickPickItem[] | Promise, options?: QuickPickOptions, token?: CancellationToken): Promise; showQuickPick(itemsOrItemsPromise: Item[] | Promise, options?: QuickPickOptions, token: CancellationToken = CancellationToken.None): Promise { @@ -468,12 +468,12 @@ export function createExtHostQuickOpen(mainContext: IMainContext, workspace: IEx } } - function getIconUris(iconPath: QuickInputButton['iconPath']): { dark: URI, light?: URI; } | { id: string; } { + function getIconUris(iconPath: QuickInputButton['iconPath']): { dark: URI; light?: URI } | { id: string } { if (iconPath instanceof ThemeIcon) { return { id: iconPath.id }; } - const dark = getDarkIconUri(iconPath as URI | { light: URI; dark: URI; }); - const light = getLightIconUri(iconPath as URI | { light: URI; dark: URI; }); + const dark = getDarkIconUri(iconPath as URI | { light: URI; dark: URI }); + const light = getLightIconUri(iconPath as URI | { light: URI; dark: URI }); // Tolerate strings: https://github.com/microsoft/vscode/issues/110432#issuecomment-726144556 return { dark: typeof dark === 'string' ? URI.file(dark) : dark, @@ -481,17 +481,17 @@ export function createExtHostQuickOpen(mainContext: IMainContext, workspace: IEx }; } - function getLightIconUri(iconPath: URI | { light: URI; dark: URI; }) { + function getLightIconUri(iconPath: URI | { light: URI; dark: URI }) { return typeof iconPath === 'object' && 'light' in iconPath ? iconPath.light : iconPath; } - function getDarkIconUri(iconPath: URI | { light: URI; dark: URI; }) { + function getDarkIconUri(iconPath: URI | { light: URI; dark: URI }) { return typeof iconPath === 'object' && 'dark' in iconPath ? iconPath.dark : iconPath; } function getIconPathOrClass(button: QuickInputButton) { const iconPathOrIconClass = getIconUris(button.iconPath); - let iconPath: { dark: URI; light?: URI | undefined; } | undefined; + let iconPath: { dark: URI; light?: URI | undefined } | undefined; let iconClass: string | undefined; if ('id' in iconPathOrIconClass) { iconClass = ThemeIconUtils.asClassName(iconPathOrIconClass); diff --git a/src/vs/workbench/api/common/extHostRequireInterceptor.ts b/src/vs/workbench/api/common/extHostRequireInterceptor.ts index 83b6375d92889..9ce9a8f402f5b 100644 --- a/src/vs/workbench/api/common/extHostRequireInterceptor.ts +++ b/src/vs/workbench/api/common/extHostRequireInterceptor.ts @@ -197,7 +197,7 @@ interface IKeytarModule { setPassword(service: string, account: string, password: string): Promise; deletePassword(service: string, account: string): Promise; findPassword(service: string): Promise; - findCredentials(service: string): Promise>; + findCredentials(service: string): Promise>; } class KeytarNodeModuleFactory implements INodeModuleFactory { @@ -242,7 +242,7 @@ class KeytarNodeModuleFactory implements INodeModuleFactory { findPassword: (service: string): Promise => { return mainThreadKeytar.$findPassword(service); }, - findCredentials(service: string): Promise> { + findCredentials(service: string): Promise> { return mainThreadKeytar.$findCredentials(service); } }; @@ -251,7 +251,7 @@ class KeytarNodeModuleFactory implements INodeModuleFactory { public load(_request: string, parent: URI): any { const ext = this._extensionPaths.findSubstr(parent); type ShimmingKeytarClassification = { - extension: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + extension: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; this._mainThreadTelemetry.$publicLog2<{ extension: string }, ShimmingKeytarClassification>('shimming.keytar', { extension: ext?.identifier.value ?? 'unknown_extension' }); return this._impl; @@ -348,7 +348,7 @@ class OpenNodeModuleFactory implements INodeModuleFactory { return; } type ShimmingOpenClassification = { - extension: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + extension: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; this._mainThreadTelemetry.$publicLog2<{ extension: string }, ShimmingOpenClassification>('shimming.open', { extension: this._extensionId }); } @@ -358,7 +358,7 @@ class OpenNodeModuleFactory implements INodeModuleFactory { return; } type ShimmingOpenCallNoForwardClassification = { - extension: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + extension: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; this._mainThreadTelemetry.$publicLog2<{ extension: string }, ShimmingOpenCallNoForwardClassification>('shimming.open.call.noForward', { extension: this._extensionId }); } diff --git a/src/vs/workbench/api/common/extHostSCM.ts b/src/vs/workbench/api/common/extHostSCM.ts index 34c5bbf517682..7be4469168dde 100644 --- a/src/vs/workbench/api/common/extHostSCM.ts +++ b/src/vs/workbench/api/common/extHostSCM.ts @@ -362,7 +362,7 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG const snapshot = [...this._resourceStates].sort(compareResourceStates); const diffs = sortedDiff(this._resourceSnapshot, snapshot, compareResourceStates); - const splices = diffs.map>(diff => { + const splices = diffs.map>(diff => { const toInsert = diff.toInsert.map(r => { const handle = this._resourceHandlePool++; this._resourceStatesMap.set(handle, r); @@ -721,8 +721,8 @@ export class ExtHostSCM implements ExtHostSCMShape { createSourceControl(extension: IExtensionDescription, id: string, label: string, rootUri: vscode.Uri | undefined): vscode.SourceControl { this.logService.trace('ExtHostSCM#createSourceControl', extension.identifier.value, id, label, rootUri); - type TEvent = { extensionId: string; }; - type TMeta = { extensionId: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; }; + type TEvent = { extensionId: string }; + type TMeta = { extensionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' } }; this._telemetry.$publicLog2('api/scm/createSourceControl', { extensionId: extension.identifier.value, }); diff --git a/src/vs/workbench/api/common/extHostStatusBar.ts b/src/vs/workbench/api/common/extHostStatusBar.ts index 03e90708205e2..75ba899e35cd8 100644 --- a/src/vs/workbench/api/common/extHostStatusBar.ts +++ b/src/vs/workbench/api/common/extHostStatusBar.ts @@ -45,8 +45,8 @@ export class ExtHostStatusBarEntry implements vscode.StatusBarItem { private _backgroundColor?: ThemeColor; private readonly _internalCommandRegistration = new DisposableStore(); private _command?: { - readonly fromApi: string | vscode.Command, - readonly internal: ICommandDto, + readonly fromApi: string | vscode.Command; + readonly internal: ICommandDto; }; private _timeoutHandle: any; diff --git a/src/vs/workbench/api/common/extHostTask.ts b/src/vs/workbench/api/common/extHostTask.ts index 10119fdbed3d2..37758d0d220d5 100644 --- a/src/vs/workbench/api/common/extHostTask.ts +++ b/src/vs/workbench/api/common/extHostTask.ts @@ -541,9 +541,9 @@ export abstract class ExtHostTaskBase implements ExtHostTaskShape, IExtHostTask }); } - protected abstract provideTasksInternal(validTypes: { [key: string]: boolean; }, taskIdPromises: Promise[], handler: HandlerData, value: vscode.Task[] | null | undefined): { tasks: tasks.TaskDTO[], extension: IExtensionDescription }; + protected abstract provideTasksInternal(validTypes: { [key: string]: boolean }, taskIdPromises: Promise[], handler: HandlerData, value: vscode.Task[] | null | undefined): { tasks: tasks.TaskDTO[]; extension: IExtensionDescription }; - public $provideTasks(handle: number, validTypes: { [key: string]: boolean; }): Promise { + public $provideTasks(handle: number, validTypes: { [key: string]: boolean }): Promise { const handler = this._handlers.get(handle); if (!handler) { return Promise.reject(new Error('no handler found')); @@ -611,7 +611,7 @@ export abstract class ExtHostTaskBase implements ExtHostTaskShape, IExtHostTask return await this.resolveTaskInternal(resolvedTaskDTO); } - public abstract $resolveVariables(uriComponents: UriComponents, toResolve: { process?: { name: string; cwd?: string; path?: string }, variables: string[] }): Promise<{ process?: string, variables: { [key: string]: string; } }>; + public abstract $resolveVariables(uriComponents: UriComponents, toResolve: { process?: { name: string; cwd?: string; path?: string }; variables: string[] }): Promise<{ process?: string; variables: { [key: string]: string } }>; private nextHandle(): number { return this._handleCounter++; @@ -747,7 +747,7 @@ export class WorkerExtHostTask extends ExtHostTaskBase { return execution; } - protected provideTasksInternal(validTypes: { [key: string]: boolean; }, taskIdPromises: Promise[], handler: HandlerData, value: vscode.Task[] | null | undefined): { tasks: tasks.TaskDTO[], extension: IExtensionDescription } { + protected provideTasksInternal(validTypes: { [key: string]: boolean }, taskIdPromises: Promise[], handler: HandlerData, value: vscode.Task[] | null | undefined): { tasks: tasks.TaskDTO[]; extension: IExtensionDescription } { const taskDTOs: tasks.TaskDTO[] = []; if (value) { for (let task of value) { @@ -783,7 +783,7 @@ export class WorkerExtHostTask extends ExtHostTaskBase { return undefined; } - public async $resolveVariables(uriComponents: UriComponents, toResolve: { process?: { name: string; cwd?: string; path?: string }, variables: string[] }): Promise<{ process?: string, variables: { [key: string]: string; } }> { + public async $resolveVariables(uriComponents: UriComponents, toResolve: { process?: { name: string; cwd?: string; path?: string }; variables: string[] }): Promise<{ process?: string; variables: { [key: string]: string } }> { const result = { process: undefined as string, variables: Object.create(null) diff --git a/src/vs/workbench/api/common/extHostTerminalService.ts b/src/vs/workbench/api/common/extHostTerminalService.ts index 9122229e56023..e13a8efa80560 100644 --- a/src/vs/workbench/api/common/extHostTerminalService.ts +++ b/src/vs/workbench/api/common/extHostTerminalService.ts @@ -57,7 +57,7 @@ export interface ITerminalInternalOptions { * This location is different from the API location because it can include splitActiveTerminal, * a property we resolve internally */ - location?: TerminalLocation | { viewColumn: number, preserveState?: boolean } | { splitActiveTerminal: boolean }; + location?: TerminalLocation | { viewColumn: number; preserveState?: boolean } | { splitActiveTerminal: boolean }; } export const IExtHostTerminalService = createDecorator('IExtHostTerminalService'); @@ -701,7 +701,7 @@ export abstract class BaseExtHostTerminalService extends Disposable implements I const result: ITerminalLinkDto[] = []; const context: vscode.TerminalLinkContext = { terminal: terminal.value, line }; - const promises: vscode.ProviderResult<{ provider: vscode.TerminalLinkProvider, links: vscode.TerminalLink[] }>[] = []; + const promises: vscode.ProviderResult<{ provider: vscode.TerminalLinkProvider; links: vscode.TerminalLink[] }>[] = []; for (const provider of this._linkProviders) { promises.push(Promises.withAsyncBody(async r => { diff --git a/src/vs/workbench/api/common/extHostTesting.ts b/src/vs/workbench/api/common/extHostTesting.ts index 37991014b7b27..19e3f3295f695 100644 --- a/src/vs/workbench/api/common/extHostTesting.ts +++ b/src/vs/workbench/api/common/extHostTesting.ts @@ -26,9 +26,9 @@ import { TestId, TestIdPathParts, TestPosition } from 'vs/workbench/contrib/test import type * as vscode from 'vscode'; interface ControllerInfo { - controller: vscode.TestController, - profiles: Map, - collection: SingleUseTestCollection, + controller: vscode.TestController; + profiles: Map; + collection: SingleUseTestCollection; } export class ExtHostTesting implements ExtHostTestingShape { @@ -292,7 +292,7 @@ export class ExtHostTesting implements ExtHostTestingShape { } class TestRunTracker extends Disposable { - private readonly tasks = new Map(); + private readonly tasks = new Map(); private readonly sharedTestIds = new Set(); private readonly cts: CancellationTokenSource; private readonly endEmitter = this._register(new Emitter()); diff --git a/src/vs/workbench/api/common/extHostTextEditor.ts b/src/vs/workbench/api/common/extHostTextEditor.ts index 4e753295ce3f7..75e3a846b2545 100644 --- a/src/vs/workbench/api/common/extHostTextEditor.ts +++ b/src/vs/workbench/api/common/extHostTextEditor.ts @@ -60,7 +60,7 @@ export class TextEditorEdit { private _setEndOfLine: EndOfLine | undefined = undefined; private _finalized: boolean = false; - constructor(document: vscode.TextDocument, options: { undoStopBefore: boolean; undoStopAfter: boolean; }) { + constructor(document: vscode.TextDocument, options: { undoStopBefore: boolean; undoStopAfter: boolean }) { this._document = document; this._documentVersionId = document.version; this._undoStopBefore = options.undoStopBefore; @@ -431,7 +431,7 @@ export class ExtHostTextEditor { throw readonly('viewColumn'); }, // --- edit - edit(callback: (edit: TextEditorEdit) => void, options: { undoStopBefore: boolean; undoStopAfter: boolean; } = { undoStopBefore: true, undoStopAfter: true }): Promise { + edit(callback: (edit: TextEditorEdit) => void, options: { undoStopBefore: boolean; undoStopAfter: boolean } = { undoStopBefore: true, undoStopAfter: true }): Promise { if (that._disposed) { return Promise.reject(new Error('TextEditor#edit not possible on closed editors')); } @@ -440,7 +440,7 @@ export class ExtHostTextEditor { return that._applyEdit(edit); }, // --- snippet edit - insertSnippet(snippet: SnippetString, where?: Position | readonly Position[] | Range | readonly Range[], options: { undoStopBefore: boolean; undoStopAfter: boolean; } = { undoStopBefore: true, undoStopAfter: true }): Promise { + insertSnippet(snippet: SnippetString, where?: Position | readonly Position[] | Range | readonly Range[], options: { undoStopBefore: boolean; undoStopAfter: boolean } = { undoStopBefore: true, undoStopAfter: true }): Promise { if (that._disposed) { return Promise.reject(new Error('TextEditor#insertSnippet not possible on closed editors')); } diff --git a/src/vs/workbench/api/common/extHostTextEditors.ts b/src/vs/workbench/api/common/extHostTextEditors.ts index 555b638a11589..fac8326994ba4 100644 --- a/src/vs/workbench/api/common/extHostTextEditors.ts +++ b/src/vs/workbench/api/common/extHostTextEditors.ts @@ -56,7 +56,7 @@ export class ExtHostEditors implements ExtHostEditorsShape { } showTextDocument(document: vscode.TextDocument, column: vscode.ViewColumn, preserveFocus: boolean): Promise; - showTextDocument(document: vscode.TextDocument, options: { column: vscode.ViewColumn, preserveFocus: boolean, pinned: boolean }): Promise; + showTextDocument(document: vscode.TextDocument, options: { column: vscode.ViewColumn; preserveFocus: boolean; pinned: boolean }): Promise; showTextDocument(document: vscode.TextDocument, columnOrOptions: vscode.ViewColumn | vscode.TextDocumentShowOptions | undefined, preserveFocus?: boolean): Promise; async showTextDocument(document: vscode.TextDocument, columnOrOptions: vscode.ViewColumn | vscode.TextDocumentShowOptions | undefined, preserveFocus?: boolean): Promise { let options: ITextDocumentShowOptions; diff --git a/src/vs/workbench/api/common/extHostTreeViews.ts b/src/vs/workbench/api/common/extHostTreeViews.ts index 6d0250d44360b..9ed10c3aa8a6b 100644 --- a/src/vs/workbench/api/common/extHostTreeViews.ts +++ b/src/vs/workbench/api/common/extHostTreeViews.ts @@ -230,7 +230,7 @@ export class ExtHostTreeViews implements ExtHostTreeViewsShape { } type Root = null | undefined | void; -type TreeData = { message: boolean, element: T | T[] | Root | false }; +type TreeData = { message: boolean; element: T | T[] | Root | false }; interface TreeNode extends IDisposable { item: ITreeItem; @@ -302,7 +302,7 @@ class ExtHostTreeView extends Disposable { let refreshingPromise: Promise | null; let promiseCallback: () => void; - this._register(Event.debounce, { message: boolean, elements: (T | Root)[] }>(this._onDidChangeData.event, (result, current) => { + this._register(Event.debounce, { message: boolean; elements: (T | Root)[] }>(this._onDidChangeData.event, (result, current) => { if (!result) { result = { message: false, elements: [] }; } diff --git a/src/vs/workbench/api/common/extHostTunnelService.ts b/src/vs/workbench/api/common/extHostTunnelService.ts index 461db2f4499d1..0b06bfa708de3 100644 --- a/src/vs/workbench/api/common/extHostTunnelService.ts +++ b/src/vs/workbench/api/common/extHostTunnelService.ts @@ -14,8 +14,8 @@ import { IExtensionDescription } from 'vs/platform/extensions/common/extensions' import { CandidatePort } from 'vs/workbench/services/remote/common/remoteExplorerService'; export interface TunnelDto { - remoteAddress: { port: number, host: string }; - localAddress: { port: number, host: string } | string; + remoteAddress: { port: number; host: string }; + localAddress: { port: number; host: string } | string; public: boolean; privacy: TunnelPrivacyId | string; protocol: string | undefined; @@ -46,7 +46,7 @@ export namespace TunnelDto { } export interface Tunnel extends vscode.Disposable { - remote: { port: number, host: string }; + remote: { port: number; host: string }; localAddress: string; } @@ -56,7 +56,7 @@ export interface IExtHostTunnelService extends ExtHostTunnelServiceShape { getTunnels(): Promise; onDidChangeTunnels: vscode.Event; setTunnelFactory(provider: vscode.RemoteAuthorityResolver | undefined): Promise; - registerPortsAttributesProvider(portSelector: { pid?: number, portRange?: [number, number], commandMatcher?: RegExp }, provider: vscode.PortAttributesProvider): IDisposable; + registerPortsAttributesProvider(portSelector: { pid?: number; portRange?: [number, number]; commandMatcher?: RegExp }, provider: vscode.PortAttributesProvider): IDisposable; } export const IExtHostTunnelService = createDecorator('IExtHostTunnelService'); @@ -82,7 +82,7 @@ export class ExtHostTunnelService implements IExtHostTunnelService { async setTunnelFactory(provider: vscode.RemoteAuthorityResolver | undefined): Promise { return { dispose: () => { } }; } - registerPortsAttributesProvider(portSelector: { pid?: number, portRange?: [number, number] }, provider: vscode.PortAttributesProvider) { + registerPortsAttributesProvider(portSelector: { pid?: number; portRange?: [number, number] }, provider: vscode.PortAttributesProvider) { return { dispose: () => { } }; } @@ -91,7 +91,7 @@ export class ExtHostTunnelService implements IExtHostTunnelService { } async $forwardPort(tunnelOptions: TunnelOptions, tunnelCreationOptions: TunnelCreationOptions): Promise { return undefined; } - async $closeTunnel(remote: { host: string, port: number }): Promise { } + async $closeTunnel(remote: { host: string; port: number }): Promise { } async $onDidTunnelsChange(): Promise { } async $registerCandidateFinder(): Promise { } } diff --git a/src/vs/workbench/api/common/extHostTypeConverters.ts b/src/vs/workbench/api/common/extHostTypeConverters.ts index 2c2ada35b2779..7fe25149a3403 100644 --- a/src/vs/workbench/api/common/extHostTypeConverters.ts +++ b/src/vs/workbench/api/common/extHostTypeConverters.ts @@ -329,7 +329,7 @@ export namespace MarkdownString { } // extract uris into a separate object - const resUris: { [href: string]: UriComponents; } = Object.create(null); + const resUris: { [href: string]: UriComponents } = Object.create(null); res.uris = resUris; const collectUri = (href: string): string => { @@ -351,7 +351,7 @@ export namespace MarkdownString { return res; } - function _uriMassage(part: string, bucket: { [n: string]: UriComponents; }): string { + function _uriMassage(part: string, bucket: { [n: string]: UriComponents }): string { if (!part) { return part; } @@ -558,8 +558,8 @@ export namespace TextEdit { export namespace WorkspaceEdit { export interface IVersionInformationProvider { - getTextDocumentVersion(uri: URI): number | undefined - getNotebookDocumentVersion(uri: URI): number | undefined + getTextDocumentVersion(uri: URI): number | undefined; + getNotebookDocumentVersion(uri: URI): number | undefined; } export function from(value: vscode.WorkspaceEdit, versionInfo?: IVersionInformationProvider): extHostProtocol.IWorkspaceEditDto { @@ -642,7 +642,7 @@ export namespace WorkspaceEdit { export namespace SymbolKind { - const _fromMapping: { [kind: number]: modes.SymbolKind; } = Object.create(null); + const _fromMapping: { [kind: number]: modes.SymbolKind } = Object.create(null); _fromMapping[types.SymbolKind.File] = modes.SymbolKind.File; _fromMapping[types.SymbolKind.Module] = modes.SymbolKind.Module; _fromMapping[types.SymbolKind.Namespace] = modes.SymbolKind.Namespace; @@ -1417,8 +1417,8 @@ export namespace GlobPattern { return pattern; // preserve `undefined` and `null` } - function isRelativePatternShape(obj: unknown): obj is { base: string, baseUri: URI, pattern: string } { - const rp = obj as { base: string, baseUri: URI, pattern: string } | undefined | null; + function isRelativePatternShape(obj: unknown): obj is { base: string; baseUri: URI; pattern: string } { + const rp = obj as { base: string; baseUri: URI; pattern: string } | undefined | null; if (!rp) { return false; } @@ -1426,13 +1426,13 @@ export namespace GlobPattern { return URI.isUri(rp.baseUri) && typeof rp.pattern === 'string'; } - function isLegacyRelativePatternShape(obj: unknown): obj is { base: string, pattern: string } { + function isLegacyRelativePatternShape(obj: unknown): obj is { base: string; pattern: string } { // Before 1.64.x, `RelativePattern` did not have any `baseUri: Uri` // property. To preserve backwards compatibility with older extensions // we allow this old format when creating the `vscode.RelativePattern`. - const rp = obj as { base: string, pattern: string } | undefined | null; + const rp = obj as { base: string; pattern: string } | undefined | null; if (!rp) { return false; } @@ -1607,11 +1607,11 @@ export namespace NotebookCellOutput { export namespace NotebookExclusiveDocumentPattern { - export function from(pattern: { include: vscode.GlobPattern | undefined, exclude: vscode.GlobPattern | undefined }): { include: string | extHostProtocol.IRelativePatternDto | undefined, exclude: string | extHostProtocol.IRelativePatternDto | undefined }; + export function from(pattern: { include: vscode.GlobPattern | undefined; exclude: vscode.GlobPattern | undefined }): { include: string | extHostProtocol.IRelativePatternDto | undefined; exclude: string | extHostProtocol.IRelativePatternDto | undefined }; export function from(pattern: vscode.GlobPattern): string | extHostProtocol.IRelativePatternDto; export function from(pattern: undefined): undefined; - export function from(pattern: { include: vscode.GlobPattern | undefined | null, exclude: vscode.GlobPattern | undefined } | vscode.GlobPattern | undefined): string | extHostProtocol.IRelativePatternDto | { include: string | extHostProtocol.IRelativePatternDto | undefined, exclude: string | extHostProtocol.IRelativePatternDto | undefined } | undefined; - export function from(pattern: { include: vscode.GlobPattern | undefined | null, exclude: vscode.GlobPattern | undefined } | vscode.GlobPattern | undefined): string | extHostProtocol.IRelativePatternDto | { include: string | extHostProtocol.IRelativePatternDto | undefined, exclude: string | extHostProtocol.IRelativePatternDto | undefined } | undefined { + export function from(pattern: { include: vscode.GlobPattern | undefined | null; exclude: vscode.GlobPattern | undefined } | vscode.GlobPattern | undefined): string | extHostProtocol.IRelativePatternDto | { include: string | extHostProtocol.IRelativePatternDto | undefined; exclude: string | extHostProtocol.IRelativePatternDto | undefined } | undefined; + export function from(pattern: { include: vscode.GlobPattern | undefined | null; exclude: vscode.GlobPattern | undefined } | vscode.GlobPattern | undefined): string | extHostProtocol.IRelativePatternDto | { include: string | extHostProtocol.IRelativePatternDto | undefined; exclude: string | extHostProtocol.IRelativePatternDto | undefined } | undefined { if (isExclusivePattern(pattern)) { return { include: withNullAsUndefined(GlobPattern.from(pattern.include)), @@ -1622,7 +1622,7 @@ export namespace NotebookExclusiveDocumentPattern { return withNullAsUndefined(GlobPattern.from(pattern)); } - export function to(pattern: string | extHostProtocol.IRelativePatternDto | { include: string | extHostProtocol.IRelativePatternDto, exclude: string | extHostProtocol.IRelativePatternDto }): { include: vscode.GlobPattern, exclude: vscode.GlobPattern } | vscode.GlobPattern { + export function to(pattern: string | extHostProtocol.IRelativePatternDto | { include: string | extHostProtocol.IRelativePatternDto; exclude: string | extHostProtocol.IRelativePatternDto }): { include: vscode.GlobPattern; exclude: vscode.GlobPattern } | vscode.GlobPattern { if (isExclusivePattern(pattern)) { return { include: GlobPattern.to(pattern.include), @@ -1633,8 +1633,8 @@ export namespace NotebookExclusiveDocumentPattern { return GlobPattern.to(pattern); } - function isExclusivePattern(obj: any): obj is { include?: T, exclude?: T } { - const ep = obj as { include?: T, exclude?: T } | undefined | null; + function isExclusivePattern(obj: any): obj is { include?: T; exclude?: T } { + const ep = obj as { include?: T; exclude?: T } | undefined | null; if (!ep) { return false; } diff --git a/src/vs/workbench/api/common/extHostTypes.ts b/src/vs/workbench/api/common/extHostTypes.ts index c77334f2ac57a..175814660be3b 100644 --- a/src/vs/workbench/api/common/extHostTypes.ts +++ b/src/vs/workbench/api/common/extHostTypes.ts @@ -31,8 +31,8 @@ function es5ClassCompat(target: Function): any { @es5ClassCompat export class Disposable { - static from(...inDisposables: { dispose(): any; }[]): Disposable { - let disposables: ReadonlyArray<{ dispose(): any; }> | undefined = inDisposables; + static from(...inDisposables: { dispose(): any }[]): Disposable { + let disposables: ReadonlyArray<{ dispose(): any }> | undefined = inDisposables; return new Disposable(function () { if (disposables) { for (const disposable of disposables) { @@ -176,9 +176,9 @@ export class Position { } } - translate(change: { lineDelta?: number; characterDelta?: number; }): Position; + translate(change: { lineDelta?: number; characterDelta?: number }): Position; translate(lineDelta?: number, characterDelta?: number): Position; - translate(lineDeltaOrChange: number | undefined | { lineDelta?: number; characterDelta?: number; }, characterDelta: number = 0): Position { + translate(lineDeltaOrChange: number | undefined | { lineDelta?: number; characterDelta?: number }, characterDelta: number = 0): Position { if (lineDeltaOrChange === null || characterDelta === null) { throw illegalArgument(); @@ -200,9 +200,9 @@ export class Position { return new Position(this.line + lineDelta, this.character + characterDelta); } - with(change: { line?: number; character?: number; }): Position; + with(change: { line?: number; character?: number }): Position; with(line?: number, character?: number): Position; - with(lineOrChange: number | undefined | { line?: number; character?: number; }, character: number = this.character): Position { + with(lineOrChange: number | undefined | { line?: number; character?: number }, character: number = this.character): Position { if (lineOrChange === null || character === null) { throw illegalArgument(); @@ -335,9 +335,9 @@ export class Range { return this._start.line === this._end.line; } - with(change: { start?: Position, end?: Position; }): Range; + with(change: { start?: Position; end?: Position }): Range; with(start?: Position, end?: Position): Range; - with(startOrChange: Position | undefined | { start?: Position, end?: Position; }, end: Position = this.end): Range { + with(startOrChange: Position | undefined | { start?: Position; end?: Position }, end: Position = this.end): Range { if (startOrChange === null || end === null) { throw illegalArgument(); @@ -639,15 +639,15 @@ export class WorkspaceEdit implements vscode.WorkspaceEdit { // --- file - renameFile(from: vscode.Uri, to: vscode.Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean; }, metadata?: vscode.WorkspaceEditEntryMetadata): void { + renameFile(from: vscode.Uri, to: vscode.Uri, options?: { overwrite?: boolean; ignoreIfExists?: boolean }, metadata?: vscode.WorkspaceEditEntryMetadata): void { this._edits.push({ _type: FileEditType.File, from, to, options, metadata }); } - createFile(uri: vscode.Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean; }, metadata?: vscode.WorkspaceEditEntryMetadata): void { + createFile(uri: vscode.Uri, options?: { overwrite?: boolean; ignoreIfExists?: boolean }, metadata?: vscode.WorkspaceEditEntryMetadata): void { this._edits.push({ _type: FileEditType.File, from: undefined, to: uri, options, metadata }); } - deleteFile(uri: vscode.Uri, options?: { recursive?: boolean, ignoreIfNotExists?: boolean; }, metadata?: vscode.WorkspaceEditEntryMetadata): void { + deleteFile(uri: vscode.Uri, options?: { recursive?: boolean; ignoreIfNotExists?: boolean }, metadata?: vscode.WorkspaceEditEntryMetadata): void { this._edits.push({ _type: FileEditType.File, from: uri, to: undefined, options, metadata }); } @@ -1515,7 +1515,7 @@ export class CompletionItem implements vscode.CompletionItem { preselect?: boolean; insertText?: string | SnippetString; keepWhitespace?: boolean; - range?: Range | { inserting: Range; replacing: Range; }; + range?: Range | { inserting: Range; replacing: Range }; commitCharacters?: string[]; textEdit?: TextEdit; additionalTextEdits?: TextEdit[]; @@ -1694,7 +1694,7 @@ export class Color { } } -export type IColorFormat = string | { opaque: string, transparent: string; }; +export type IColorFormat = string | { opaque: string; transparent: string }; @es5ClassCompat export class ColorInformation { @@ -2289,7 +2289,7 @@ export class TreeItem { label?: string | vscode.TreeItemLabel; resourceUri?: URI; - iconPath?: string | URI | { light: string | URI; dark: string | URI; }; + iconPath?: string | URI | { light: string | URI; dark: string | URI }; command?: vscode.Command; contextValue?: string; tooltip?: string | vscode.MarkdownString; @@ -3050,7 +3050,7 @@ export class NotebookRange { } } - with(change: { start?: number, end?: number }): NotebookRange { + with(change: { start?: number; end?: number }): NotebookRange { let start = this._start; let end = this._end; @@ -3135,7 +3135,7 @@ export class NotebookCellOutputItem { && (obj).data instanceof Uint8Array; } - static error(err: Error | { name: string, message?: string, stack?: string }): NotebookCellOutputItem { + static error(err: Error | { name: string; message?: string; stack?: string }): NotebookCellOutputItem { const obj = { name: err.name, message: err.message, diff --git a/src/vs/workbench/api/common/extHostUriOpener.ts b/src/vs/workbench/api/common/extHostUriOpener.ts index 2125cb9839f4c..a60cd42d142d3 100644 --- a/src/vs/workbench/api/common/extHostUriOpener.ts +++ b/src/vs/workbench/api/common/extHostUriOpener.ts @@ -61,7 +61,7 @@ export class ExtHostUriOpeners implements ExtHostUriOpenersShape { return opener.canOpenExternalUri(uri, token); } - async $openUri(id: string, context: { resolvedUri: UriComponents, sourceUri: UriComponents }, token: CancellationToken): Promise { + async $openUri(id: string, context: { resolvedUri: UriComponents; sourceUri: UriComponents }, token: CancellationToken): Promise { const opener = this._openers.get(id); if (!opener) { throw new Error(`Unknown opener id: '${id}'`); diff --git a/src/vs/workbench/api/common/extHostWebviewMessaging.ts b/src/vs/workbench/api/common/extHostWebviewMessaging.ts index bba4171c6f1b1..b67625e2f24a5 100644 --- a/src/vs/workbench/api/common/extHostWebviewMessaging.ts +++ b/src/vs/workbench/api/common/extHostWebviewMessaging.ts @@ -22,7 +22,7 @@ class ArrayBufferSet { export function serializeWebviewMessage( message: any, options: { serializeBuffersForPostMessage?: boolean } -): { message: string, buffers: VSBuffer[] } { +): { message: string; buffers: VSBuffer[] } { if (options.serializeBuffersForPostMessage) { // Extract all ArrayBuffers from the message and replace them with references. const arrayBuffers = new ArrayBufferSet(); @@ -83,7 +83,7 @@ function getTypedArrayType(value: ArrayBufferView): extHostProtocol.WebviewMessa return undefined; } -export function deserializeWebviewMessage(jsonMessage: string, buffers: VSBuffer[]): { message: any, arrayBuffers: ArrayBuffer[] } { +export function deserializeWebviewMessage(jsonMessage: string, buffers: VSBuffer[]): { message: any; arrayBuffers: ArrayBuffer[] } { const arrayBuffers: ArrayBuffer[] = buffers.map(buffer => { const arrayBuffer = new ArrayBuffer(buffer.byteLength); const uint8Array = new Uint8Array(arrayBuffer); diff --git a/src/vs/workbench/api/common/extHostWebviewPanels.ts b/src/vs/workbench/api/common/extHostWebviewPanels.ts index ed1dfe475924e..2f2e575ed762c 100644 --- a/src/vs/workbench/api/common/extHostWebviewPanels.ts +++ b/src/vs/workbench/api/common/extHostWebviewPanels.ts @@ -17,7 +17,7 @@ import * as extHostProtocol from './extHost.protocol'; import * as extHostTypes from './extHostTypes'; -type IconPath = URI | { readonly light: URI, readonly dark: URI }; +type IconPath = URI | { readonly light: URI; readonly dark: URI }; class ExtHostWebviewPanel extends Disposable implements vscode.WebviewPanel { @@ -135,7 +135,7 @@ class ExtHostWebviewPanel extends Disposable implements vscode.WebviewPanel { return this.#visible; } - _updateViewState(newState: { active: boolean; visible: boolean; viewColumn: vscode.ViewColumn; }) { + _updateViewState(newState: { active: boolean; visible: boolean; viewColumn: vscode.ViewColumn }) { if (this.#isDisposed) { return; } @@ -190,7 +190,7 @@ export class ExtHostWebviewPanels implements extHostProtocol.ExtHostWebviewPanel extension: IExtensionDescription, viewType: string, title: string, - showOptions: vscode.ViewColumn | { viewColumn: vscode.ViewColumn, preserveFocus?: boolean }, + showOptions: vscode.ViewColumn | { viewColumn: vscode.ViewColumn; preserveFocus?: boolean }, options: (vscode.WebviewPanelOptions & vscode.WebviewOptions) = {}, ): vscode.WebviewPanel { const viewColumn = typeof showOptions === 'object' ? showOptions.viewColumn : showOptions; diff --git a/src/vs/workbench/api/common/extHostWebviewView.ts b/src/vs/workbench/api/common/extHostWebviewView.ts index d91a5d30d2c22..ed711d56d9aee 100644 --- a/src/vs/workbench/api/common/extHostWebviewView.ts +++ b/src/vs/workbench/api/common/extHostWebviewView.ts @@ -138,7 +138,7 @@ export class ExtHostWebviewViews implements extHostProtocol.ExtHostWebviewViewsS viewType: string, provider: vscode.WebviewViewProvider, webviewOptions?: { - retainContextWhenHidden?: boolean + retainContextWhenHidden?: boolean; }, ): vscode.Disposable { if (this._viewProviders.has(viewType)) { diff --git a/src/vs/workbench/api/common/extHostWorkspace.ts b/src/vs/workbench/api/common/extHostWorkspace.ts index 138f5053ced24..dda77ef065eea 100644 --- a/src/vs/workbench/api/common/extHostWorkspace.ts +++ b/src/vs/workbench/api/common/extHostWorkspace.ts @@ -54,7 +54,7 @@ function compareWorkspaceFolderByUriAndNameAndIndex(a: vscode.WorkspaceFolder, b return isFolderEqual(a.uri, b.uri, extHostFileSystemInfo) ? compare(a.name, b.name) : compare(a.uri.toString(), b.uri.toString()); } -function delta(oldFolders: vscode.WorkspaceFolder[], newFolders: vscode.WorkspaceFolder[], compare: (a: vscode.WorkspaceFolder, b: vscode.WorkspaceFolder, extHostFileSystemInfo: IExtHostFileSystemInfo) => number, extHostFileSystemInfo: IExtHostFileSystemInfo): { removed: vscode.WorkspaceFolder[], added: vscode.WorkspaceFolder[]; } { +function delta(oldFolders: vscode.WorkspaceFolder[], newFolders: vscode.WorkspaceFolder[], compare: (a: vscode.WorkspaceFolder, b: vscode.WorkspaceFolder, extHostFileSystemInfo: IExtHostFileSystemInfo) => number, extHostFileSystemInfo: IExtHostFileSystemInfo): { removed: vscode.WorkspaceFolder[]; added: vscode.WorkspaceFolder[] } { const oldSortedFolders = oldFolders.slice(0).sort((a, b) => compare(a, b, extHostFileSystemInfo)); const newSortedFolders = newFolders.slice(0).sort((a, b) => compare(a, b, extHostFileSystemInfo)); @@ -73,7 +73,7 @@ interface MutableWorkspaceFolder extends vscode.WorkspaceFolder { class ExtHostWorkspaceImpl extends Workspace { - static toExtHostWorkspace(data: IWorkspaceData | null, previousConfirmedWorkspace: ExtHostWorkspaceImpl | undefined, previousUnconfirmedWorkspace: ExtHostWorkspaceImpl | undefined, extHostFileSystemInfo: IExtHostFileSystemInfo): { workspace: ExtHostWorkspaceImpl | null, added: vscode.WorkspaceFolder[], removed: vscode.WorkspaceFolder[]; } { + static toExtHostWorkspace(data: IWorkspaceData | null, previousConfirmedWorkspace: ExtHostWorkspaceImpl | undefined, previousUnconfirmedWorkspace: ExtHostWorkspaceImpl | undefined, extHostFileSystemInfo: IExtHostFileSystemInfo): { workspace: ExtHostWorkspaceImpl | null; added: vscode.WorkspaceFolder[]; removed: vscode.WorkspaceFolder[] } { if (!data) { return { workspace: null, added: [], removed: [] }; } @@ -257,8 +257,8 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac return this._actualWorkspace.workspaceFolders.slice(0); } - updateWorkspaceFolders(extension: IExtensionDescription, index: number, deleteCount: number, ...workspaceFoldersToAdd: { uri: vscode.Uri, name?: string; }[]): boolean { - const validatedDistinctWorkspaceFoldersToAdd: { uri: vscode.Uri, name?: string; }[] = []; + updateWorkspaceFolders(extension: IExtensionDescription, index: number, deleteCount: number, ...workspaceFoldersToAdd: { uri: vscode.Uri; name?: string }[]): boolean { + const validatedDistinctWorkspaceFoldersToAdd: { uri: vscode.Uri; name?: string }[] = []; if (Array.isArray(workspaceFoldersToAdd)) { workspaceFoldersToAdd.forEach(folderToAdd => { if (URI.isUri(folderToAdd.uri) && !validatedDistinctWorkspaceFoldersToAdd.some(f => isFolderEqual(f.uri, folderToAdd.uri, this._extHostFileSystemInfo))) { @@ -580,7 +580,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac export const IExtHostWorkspace = createDecorator('IExtHostWorkspace'); export interface IExtHostWorkspace extends ExtHostWorkspace, ExtHostWorkspaceShape, IExtHostWorkspaceProvider { } -function parseSearchInclude(include: string | IRelativePatternDto | undefined | null): { includePattern?: string, folder?: URI; } { +function parseSearchInclude(include: string | IRelativePatternDto | undefined | null): { includePattern?: string; folder?: URI } { let includePattern: string | undefined; let includeFolder: URI | undefined; if (include) { diff --git a/src/vs/workbench/api/node/extHostCLIServer.ts b/src/vs/workbench/api/node/extHostCLIServer.ts index 715d56fe61633..f7a9bbde9abab 100644 --- a/src/vs/workbench/api/node/extHostCLIServer.ts +++ b/src/vs/workbench/api/node/extHostCLIServer.ts @@ -36,7 +36,7 @@ export interface StatusPipeArgs { export interface ExtensionManagementPipeArgs { type: 'extensionManagement'; - list?: { showVersions?: boolean, category?: string; }; + list?: { showVersions?: boolean; category?: string }; install?: string[]; uninstall?: string[]; force?: boolean; diff --git a/src/vs/workbench/api/node/extHostDebugService.ts b/src/vs/workbench/api/node/extHostDebugService.ts index 91b8cb4c3040d..a0bb782897835 100644 --- a/src/vs/workbench/api/node/extHostDebugService.ts +++ b/src/vs/workbench/api/node/extHostDebugService.ts @@ -183,7 +183,7 @@ class DebugTerminalCollection { */ private static minUseDelay = 1000; - private _terminalInstances = new Map(); + private _terminalInstances = new Map(); public async checkout(config: string, name: string) { const entries = [...this._terminalInstances.entries()]; diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index bd1fe3aba4717..481409b79d559 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -24,7 +24,7 @@ class NodeModuleRequireInterceptor extends RequireInterceptor { const that = this; const node_module = require.__$__nodeRequire('module'); const originalLoad = node_module._load; - node_module._load = function load(request: string, parent: { filename: string; }, isMain: boolean) { + node_module._load = function load(request: string, parent: { filename: string }, isMain: boolean) { request = applyAlternatives(request); if (!that._factories.has(request)) { return originalLoad.apply(this, arguments); diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index b13dd1ddfbfa0..094e54aa85184 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -95,7 +95,7 @@ export class ExtHostTask extends ExtHostTaskBase { } } - protected provideTasksInternal(validTypes: { [key: string]: boolean; }, taskIdPromises: Promise[], handler: HandlerData, value: vscode.Task[] | null | undefined): { tasks: tasks.TaskDTO[], extension: IExtensionDescription } { + protected provideTasksInternal(validTypes: { [key: string]: boolean }, taskIdPromises: Promise[], handler: HandlerData, value: vscode.Task[] | null | undefined): { tasks: tasks.TaskDTO[]; extension: IExtensionDescription } { const taskDTOs: tasks.TaskDTO[] = []; if (value) { for (let task of value) { @@ -152,7 +152,7 @@ export class ExtHostTask extends ExtHostTaskBase { }; } - public async $resolveVariables(uriComponents: UriComponents, toResolve: { process?: { name: string; cwd?: string; path?: string }, variables: string[] }): Promise<{ process?: string, variables: { [key: string]: string; } }> { + public async $resolveVariables(uriComponents: UriComponents, toResolve: { process?: { name: string; cwd?: string; path?: string }; variables: string[] }): Promise<{ process?: string; variables: { [key: string]: string } }> { const uri: URI = URI.revive(uriComponents); const result = { process: undefined as string, diff --git a/src/vs/workbench/api/node/extHostTunnelService.ts b/src/vs/workbench/api/node/extHostTunnelService.ts index f480c0fa3e7f0..cb5775b5f0c24 100644 --- a/src/vs/workbench/api/node/extHostTunnelService.ts +++ b/src/vs/workbench/api/node/extHostTunnelService.ts @@ -28,8 +28,8 @@ class ExtensionTunnel implements vscode.Tunnel { onDidDispose: Event = this._onDispose.event; constructor( - public readonly remoteAddress: { port: number, host: string }, - public readonly localAddress: { port: number, host: string } | string, + public readonly remoteAddress: { port: number; host: string }, + public readonly localAddress: { port: number; host: string } | string, private readonly _dispose: () => Promise) { } dispose(): Promise { @@ -38,9 +38,9 @@ class ExtensionTunnel implements vscode.Tunnel { } } -export function getSockets(stdout: string): Record { +export function getSockets(stdout: string): Record { const lines = stdout.trim().split('\n'); - const mapped: { pid: number, socket: number }[] = []; + const mapped: { pid: number; socket: number }[] = []; lines.forEach(line => { const match = /\/proc\/(\d+)\/fd\/\d+ -> socket:\[(\d+)\]/.exec(line)!; if (match && match.length >= 3) { @@ -57,7 +57,7 @@ export function getSockets(stdout: string): Record[]).concat(...stdouts.map(loadConnectionTable)); return [ ...new Map( @@ -113,7 +113,7 @@ function knownExcludeCmdline(command: string): boolean { export function getRootProcesses(stdout: string) { const lines = stdout.trim().split('\n'); - const mapped: { pid: number, cmd: string, ppid: number }[] = []; + const mapped: { pid: number; cmd: string; ppid: number }[] = []; lines.forEach(line => { const match = /^\d+\s+\D+\s+root\s+(\d+)\s+(\d+).+\d+\:\d+\:\d+\s+(.+)$/.exec(line)!; if (match && match.length >= 4) { @@ -127,7 +127,7 @@ export function getRootProcesses(stdout: string) { return mapped; } -export async function findPorts(connections: { socket: number, ip: string, port: number }[], socketMap: Record, processes: { pid: number, cwd: string, cmd: string }[]): Promise { +export async function findPorts(connections: { socket: number; ip: string; port: number }[], socketMap: Record, processes: { pid: number; cwd: string; cmd: string }[]): Promise { const processMap = processes.reduce((m, process) => { m[process.pid] = process; return m; @@ -144,7 +144,7 @@ export async function findPorts(connections: { socket: number, ip: string, port: return ports; } -export function tryFindRootPorts(connections: { socket: number, ip: string, port: number }[], rootProcessesStdout: string, previousPorts: Map): Map { +export function tryFindRootPorts(connections: { socket: number; ip: string; port: number }[], rootProcessesStdout: string, previousPorts: Map): Map { const ports: Map = new Map(); const rootProcesses = getRootProcesses(rootProcessesStdout); @@ -159,7 +159,7 @@ export function tryFindRootPorts(connections: { socket: number, ip: string, port let bestMatch = rootProcessMatch; // There are often several processes that "look" like they could match the port. // The one we want is usually the child of the other. Find the most child process. - let mostChild: { pid: number, cmd: string, ppid: number } | undefined; + let mostChild: { pid: number; cmd: string; ppid: number } | undefined; do { mostChild = rootProcesses.find(value => value.ppid === bestMatch.pid); if (mostChild) { @@ -180,14 +180,14 @@ export class ExtHostTunnelService extends Disposable implements IExtHostTunnelSe private readonly _proxy: MainThreadTunnelServiceShape; private _forwardPortProvider: ((tunnelOptions: TunnelOptions, tunnelCreationOptions: TunnelCreationOptions) => Thenable | undefined) | undefined; private _showCandidatePort: (host: string, port: number, detail: string) => Thenable = () => { return Promise.resolve(true); }; - private _extensionTunnels: Map> = new Map(); + private _extensionTunnels: Map> = new Map(); private _onDidChangeTunnels: Emitter = new Emitter(); onDidChangeTunnels: vscode.Event = this._onDidChangeTunnels.event; private _candidateFindingEnabled: boolean = false; private _foundRootPorts: Map = new Map(); private _providerHandleCounter: number = 0; - private _portAttributesProviders: Map = new Map(); + private _portAttributesProviders: Map = new Map(); constructor( @IExtHostRpcService extHostRpc: IExtHostRpcService, @@ -268,7 +268,7 @@ export class ExtHostTunnelService extends Disposable implements IExtHostTunnelSe this._candidateFindingEnabled = enable; // Regularly scan to see if the candidate ports have changed. let movingAverage = new MovingAverage(); - let oldPorts: { host: string, port: number, detail?: string }[] | undefined = undefined; + let oldPorts: { host: string; port: number; detail?: string }[] | undefined = undefined; while (this._candidateFindingEnabled) { const startTime = new Date().getTime(); const newPorts = (await this.findCandidatePorts()).filter(candidate => (isLocalhost(candidate.host) || isAllInterfaces(candidate.host))); @@ -328,7 +328,7 @@ export class ExtHostTunnelService extends Disposable implements IExtHostTunnelSe }); } - async $closeTunnel(remote: { host: string, port: number }, silent?: boolean): Promise { + async $closeTunnel(remote: { host: string; port: number }, silent?: boolean): Promise { if (this._extensionTunnels.has(remote.host)) { const hostMap = this._extensionTunnels.get(remote.host)!; if (hostMap.has(remote.port)) { @@ -389,7 +389,7 @@ export class ExtHostTunnelService extends Disposable implements IExtHostTunnelSe } catch (e) { // File reading error. No additional handling needed. } - const connections: { socket: number, ip: string, port: number }[] = loadListeningPorts(tcp, tcp6); + const connections: { socket: number; ip: string; port: number }[] = loadListeningPorts(tcp, tcp6); const procSockets: string = await (new Promise(resolve => { exec('ls -l /proc/[0-9]*/fd/[0-9]* | grep socket:', (error, stdout, stderr) => { @@ -400,7 +400,7 @@ export class ExtHostTunnelService extends Disposable implements IExtHostTunnelSe const procChildren = await pfs.Promises.readdir('/proc'); const processes: { - pid: number, cwd: string, cmd: string + pid: number; cwd: string; cmd: string; }[] = []; for (let childName of procChildren) { try { @@ -417,7 +417,7 @@ export class ExtHostTunnelService extends Disposable implements IExtHostTunnelSe } } - const unFoundConnections: { socket: number, ip: string, port: number }[] = []; + const unFoundConnections: { socket: number; ip: string; port: number }[] = []; const filteredConnections = connections.filter((connection => { const foundConnection = socketMap[connection.socket]; if (!foundConnection) { diff --git a/src/vs/workbench/api/node/proxyResolver.ts b/src/vs/workbench/api/node/proxyResolver.ts index 17495361d5a48..599cbee497ce5 100644 --- a/src/vs/workbench/api/node/proxyResolver.ts +++ b/src/vs/workbench/api/node/proxyResolver.ts @@ -49,17 +49,17 @@ export function connectProxyResolver( getLogLevel: () => extHostLogService.getLevel(), proxyResolveTelemetry: event => { type ResolveProxyClassification = { - count: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - duration: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - errorCount: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - cacheCount: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - cacheSize: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - cacheRolls: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - envCount: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - settingsCount: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - localhostCount: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - envNoProxyCount: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - results: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + count: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + duration: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + errorCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + cacheCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + cacheSize: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + cacheRolls: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + envCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + settingsCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + localhostCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + envNoProxyCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + results: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; mainThreadTelemetry.$publicLog2('resolveProxy', event); }, @@ -107,13 +107,13 @@ function createPatchedModules(configProvider: ExtHostConfigProvider, resolveProx }; } -const modulesCache = new Map(); +const modulesCache = new Map(); function configureModuleLoading(extensionService: ExtHostExtensionService, lookup: ReturnType): Promise { return extensionService.getExtensionPathIndex() .then(extensionPaths => { const node_module = require.__$__nodeRequire('module'); const original = node_module._load; - node_module._load = function load(request: string, parent: { filename: string; }, isMain: boolean) { + node_module._load = function load(request: string, parent: { filename: string }, isMain: boolean) { if (request === 'tls') { return lookup.tls; } diff --git a/src/vs/workbench/api/test/browser/extHostApiCommands.test.ts b/src/vs/workbench/api/test/browser/extHostApiCommands.test.ts index d1e7caa887901..f9ec90035b279 100644 --- a/src/vs/workbench/api/test/browser/extHostApiCommands.test.ts +++ b/src/vs/workbench/api/test/browser/extHostApiCommands.test.ts @@ -275,7 +275,7 @@ suite('ExtHostLanguageFeatureCommands', function () { await rpcProtocol.sync(); - const data = await commands.executeCommand<{ range: vscode.Range, placeholder: string }>('vscode.prepareRename', model.uri, new types.Position(0, 12)); + const data = await commands.executeCommand<{ range: vscode.Range; placeholder: string }>('vscode.prepareRename', model.uri, new types.Position(0, 12)); assert.ok(data); assert.strictEqual(data.placeholder, 'foooPlaceholder'); diff --git a/src/vs/workbench/api/test/browser/extHostDocumentData.test.ts b/src/vs/workbench/api/test/browser/extHostDocumentData.test.ts index 228f929ca15fb..a3cada12b004a 100644 --- a/src/vs/workbench/api/test/browser/extHostDocumentData.test.ts +++ b/src/vs/workbench/api/test/browser/extHostDocumentData.test.ts @@ -365,7 +365,7 @@ enum AssertDocumentLineMappingDirection { suite('ExtHostDocumentData updates line mapping', () => { - function positionToStr(position: { line: number; character: number; }): string { + function positionToStr(position: { line: number; character: number }): string { return '(' + position.line + ',' + position.character + ')'; } diff --git a/src/vs/workbench/api/test/browser/extHostLanguageFeatures.test.ts b/src/vs/workbench/api/test/browser/extHostLanguageFeatures.test.ts index e42d7833b2fde..1dd474d5a2e5c 100644 --- a/src/vs/workbench/api/test/browser/extHostLanguageFeatures.test.ts +++ b/src/vs/workbench/api/test/browser/extHostLanguageFeatures.test.ts @@ -1213,7 +1213,7 @@ suite('ExtHostLanguageFeatures', function () { provideDocumentColors(): vscode.ColorInformation[] { return [new types.ColorInformation(new types.Range(0, 0, 0, 20), new types.Color(0.1, 0.2, 0.3, 0.4))]; } - provideColorPresentations(color: vscode.Color, context: { range: vscode.Range, document: vscode.TextDocument; }): vscode.ColorPresentation[] { + provideColorPresentations(color: vscode.Color, context: { range: vscode.Range; document: vscode.TextDocument }): vscode.ColorPresentation[] { return []; } })); diff --git a/src/vs/workbench/api/test/browser/extHostNotebookConcatDocument.test.ts b/src/vs/workbench/api/test/browser/extHostNotebookConcatDocument.test.ts index 58cb2c03b7e11..b2bddc7f2790c 100644 --- a/src/vs/workbench/api/test/browser/extHostNotebookConcatDocument.test.ts +++ b/src/vs/workbench/api/test/browser/extHostNotebookConcatDocument.test.ts @@ -405,7 +405,7 @@ suite('NotebookConcatDocument', function () { assertLines(barLangDoc, 'barLang-document', 'barLang-document2'); }); - function assertOffsetAtPosition(doc: vscode.NotebookConcatTextDocument, offset: number, expected: { line: number, character: number }, reverse = true) { + function assertOffsetAtPosition(doc: vscode.NotebookConcatTextDocument, offset: number, expected: { line: number; character: number }, reverse = true) { const actual = doc.positionAt(offset); assert.strictEqual(actual.line, expected.line); @@ -459,7 +459,7 @@ suite('NotebookConcatDocument', function () { }); - function assertLocationAtPosition(doc: vscode.NotebookConcatTextDocument, pos: { line: number, character: number }, expected: { uri: URI, line: number, character: number }, reverse = true) { + function assertLocationAtPosition(doc: vscode.NotebookConcatTextDocument, pos: { line: number; character: number }, expected: { uri: URI; line: number; character: number }, reverse = true) { const actual = doc.locationAt(new Position(pos.line, pos.character)); assert.strictEqual(actual.uri.toString(), expected.uri.toString()); diff --git a/src/vs/workbench/api/test/browser/extHostNotebookKernel.test.ts b/src/vs/workbench/api/test/browser/extHostNotebookKernel.test.ts index 44114ba972dc3..4c4bd0a21ce5f 100644 --- a/src/vs/workbench/api/test/browser/extHostNotebookKernel.test.ts +++ b/src/vs/workbench/api/test/browser/extHostNotebookKernel.test.ts @@ -43,7 +43,7 @@ suite('NotebookKernel', function () { const kernelData = new Map(); const disposables = new DisposableStore(); - const cellExecuteCreate: { notebook: UriComponents, cell: number }[] = []; + const cellExecuteCreate: { notebook: UriComponents; cell: number }[] = []; const cellExecuteUpdates: ICellExecuteUpdateDto[] = []; const cellExecuteComplete: ICellExecutionCompleteDto[] = []; diff --git a/src/vs/workbench/api/test/browser/extHostTreeViews.test.ts b/src/vs/workbench/api/test/browser/extHostTreeViews.test.ts index 4b1b2544afc12..058a03faa0231 100644 --- a/src/vs/workbench/api/test/browser/extHostTreeViews.test.ts +++ b/src/vs/workbench/api/test/browser/extHostTreeViews.test.ts @@ -35,7 +35,7 @@ suite('ExtHostTreeView', function () { }); } - override $reveal(treeViewId: string, itemInfo: { item: ITreeItem, parentChain: ITreeItem[] } | undefined, options: IRevealOptions): Promise { + override $reveal(treeViewId: string, itemInfo: { item: ITreeItem; parentChain: ITreeItem[] } | undefined, options: IRevealOptions): Promise { return Promise.resolve(); } diff --git a/src/vs/workbench/api/test/browser/extHostWorkspace.test.ts b/src/vs/workbench/api/test/browser/extHostWorkspace.test.ts index 93a804d5ddd1b..5c05a247db3b4 100644 --- a/src/vs/workbench/api/test/browser/extHostWorkspace.test.ts +++ b/src/vs/workbench/api/test/browser/extHostWorkspace.test.ts @@ -567,7 +567,7 @@ suite('ExtHostWorkspace', function () { }; } - function asUpdateWorkspaceFolderData(uri: URI, name?: string): { uri: URI, name?: string } { + function asUpdateWorkspaceFolderData(uri: URI, name?: string): { uri: URI; name?: string } { return { uri, name }; } diff --git a/src/vs/workbench/api/test/common/testRPCProtocol.ts b/src/vs/workbench/api/test/common/testRPCProtocol.ts index f5d69de5bee11..52a307debc9b9 100644 --- a/src/vs/workbench/api/test/common/testRPCProtocol.ts +++ b/src/vs/workbench/api/test/common/testRPCProtocol.ts @@ -37,8 +37,8 @@ export class TestRPCProtocol implements IExtHostContext, IExtHostRpcService { private _idle?: Promise; private _completeIdle?: Function; - private readonly _locals: { [id: string]: any; }; - private readonly _proxies: { [id: string]: any; }; + private readonly _locals: { [id: string]: any }; + private readonly _proxies: { [id: string]: any }; constructor() { this._locals = Object.create(null); diff --git a/src/vs/workbench/api/test/node/extHostSearch.test.ts b/src/vs/workbench/api/test/node/extHostSearch.test.ts index 6cd2a2fec6473..02bfbb101eeb5 100644 --- a/src/vs/workbench/api/test/node/extHostSearch.test.ts +++ b/src/vs/workbench/api/test/node/extHostSearch.test.ts @@ -78,7 +78,7 @@ suite('ExtHostSearch', () => { await rpcProtocol.sync(); } - async function runFileSearch(query: IFileQuery, cancel = false): Promise<{ results: URI[]; stats: ISearchCompleteStats; }> { + async function runFileSearch(query: IFileQuery, cancel = false): Promise<{ results: URI[]; stats: ISearchCompleteStats }> { let stats: ISearchCompleteStats; try { const cancellation = new CancellationTokenSource(); @@ -103,7 +103,7 @@ suite('ExtHostSearch', () => { }; } - async function runTextSearch(query: ITextQuery): Promise<{ results: IFileMatch[], stats: ISearchCompleteStats; }> { + async function runTextSearch(query: ITextQuery): Promise<{ results: IFileMatch[]; stats: ISearchCompleteStats }> { let stats: ISearchCompleteStats; try { const cancellation = new CancellationTokenSource(); diff --git a/src/vs/workbench/api/test/node/extHostTunnelService.test.ts b/src/vs/workbench/api/test/node/extHostTunnelService.test.ts index 697b03d7bcae3..2811fd9ee7a11 100644 --- a/src/vs/workbench/api/test/node/extHostTunnelService.test.ts +++ b/src/vs/workbench/api/test/node/extHostTunnelService.test.ts @@ -112,7 +112,7 @@ const procSockets = lrwx------ 1 alex alex 64 Dec 8 15:22 /proc/4496/fd/3 -> socket:[2331511] lrwx------ 1 alex alex 64 Dec 8 15:22 /proc/4496/fd/31 -> socket:[2338285]`; -const processes: { pid: number, cwd: string, cmd: string }[] = [ +const processes: { pid: number; cwd: string; cmd: string }[] = [ { pid: 230, cwd: '/mnt/c/WINDOWS/system32', diff --git a/src/vs/workbench/api/worker/extensionHostWorker.ts b/src/vs/workbench/api/worker/extensionHostWorker.ts index 799f039556c88..0e12938c3e209 100644 --- a/src/vs/workbench/api/worker/extensionHostWorker.ts +++ b/src/vs/workbench/api/worker/extensionHostWorker.ts @@ -30,8 +30,8 @@ declare namespace self { let addEventListener: any; let removeEventListener: any; let dispatchEvent: any; - let indexedDB: { open: any, [k: string]: any }; - let caches: { open: any, [k: string]: any }; + let indexedDB: { open: any; [k: string]: any }; + let caches: { open: any; [k: string]: any }; let importScripts: any; let fetch: _Fetch; let XMLHttpRequest: any; diff --git a/src/vs/workbench/browser/actions/layoutActions.ts b/src/vs/workbench/browser/actions/layoutActions.ts index 71afb01acf927..589c167053d89 100644 --- a/src/vs/workbench/browser/actions/layoutActions.ts +++ b/src/vs/workbench/browser/actions/layoutActions.ts @@ -1035,7 +1035,7 @@ const fullscreenIcon = registerIcon('fullscreen', Codicon.screenFull, localize(' const centerLayoutIcon = registerIcon('centerLayoutIcon', Codicon.layoutCentered, localize('centerLayoutIcon', "Represents centered layout mode")); const zenModeIcon = registerIcon('zenMode', Codicon.target, localize('zenModeIcon', "Represents zen mode")); -type ContextualLayoutVisualIcon = { iconA: ThemeIcon, iconB: ThemeIcon, whenA: ContextKeyExpression }; +type ContextualLayoutVisualIcon = { iconA: ThemeIcon; iconB: ThemeIcon; whenA: ContextKeyExpression }; type LayoutVisualIcon = ThemeIcon | ContextualLayoutVisualIcon; function isContextualLayoutVisualIcon(icon: LayoutVisualIcon): icon is ContextualLayoutVisualIcon { diff --git a/src/vs/workbench/browser/actions/windowActions.ts b/src/vs/workbench/browser/actions/windowActions.ts index 8d94a73d1e8bf..7f1de07492a1c 100644 --- a/src/vs/workbench/browser/actions/windowActions.ts +++ b/src/vs/workbench/browser/actions/windowActions.ts @@ -37,7 +37,7 @@ import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation export const inRecentFilesPickerContextKey = 'inRecentFilesPicker'; interface IRecentlyOpenedPick extends IQuickPickItem { - resource: URI, + resource: URI; openable: IWindowOpenable; remoteAuthority: string | undefined; } diff --git a/src/vs/workbench/browser/composite.ts b/src/vs/workbench/browser/composite.ts index 58ee0760c6466..464d533dbd3fb 100644 --- a/src/vs/workbench/browser/composite.ts +++ b/src/vs/workbench/browser/composite.ts @@ -62,7 +62,7 @@ export abstract class Composite extends Component implements IComposite { return this._hasFocus; } - private registerFocusTrackEvents(): { onDidFocus: Emitter, onDidBlur: Emitter } { + private registerFocusTrackEvents(): { onDidFocus: Emitter; onDidBlur: Emitter } { const container = assertIsDefined(this.getContainer()); const focusTracker = this._register(trackFocus(container)); diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts index 0953de6627c2f..38f403003145b 100644 --- a/src/vs/workbench/browser/dnd.ts +++ b/src/vs/workbench/browser/dnd.ts @@ -769,7 +769,7 @@ export class CompositeDragAndDropObserver extends Disposable { return this._register(disposableStore); } - registerDraggable(element: HTMLElement, draggedItemProvider: () => { type: ViewType, id: string }, callbacks: ICompositeDragAndDropObserverCallbacks): IDisposable { + registerDraggable(element: HTMLElement, draggedItemProvider: () => { type: ViewType; id: string }, callbacks: ICompositeDragAndDropObserverCallbacks): IDisposable { element.draggable = true; const disposableStore = new DisposableStore(); diff --git a/src/vs/workbench/browser/labels.ts b/src/vs/workbench/browser/labels.ts index df584439e0277..d7b8f4769d9b9 100644 --- a/src/vs/workbench/browser/labels.ts +++ b/src/vs/workbench/browser/labels.ts @@ -24,7 +24,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { normalizeDriveLetter } from 'vs/base/common/labels'; export interface IResourceLabelProps { - resource?: URI | { primary?: URI, secondary?: URI }; + resource?: URI | { primary?: URI; secondary?: URI }; name?: string | string[]; description?: string; } @@ -51,7 +51,7 @@ export interface IResourceLabelOptions extends IIconLabelValueOptions { /** * File decorations to use for the label. */ - readonly fileDecorations?: { colors: boolean, badges: boolean }; + readonly fileDecorations?: { colors: boolean; badges: boolean }; /** * Will take the provided label as is and e.g. not override it for untitled files. @@ -492,7 +492,7 @@ class ResourceLabelWidget extends IconLabel { this.setLabel(''); } - private render(options: { updateIcon: boolean, updateDecoration: boolean }): boolean { + private render(options: { updateIcon: boolean; updateDecoration: boolean }): boolean { if (this.isHidden) { if (this.needsRedraw !== Redraw.Full) { this.needsRedraw = (options.updateIcon || options.updateDecoration) ? Redraw.Full : Redraw.Basic; diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 55e517319dfe1..3e305e7222090 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -54,36 +54,36 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { LayoutStateKeys, LayoutStateModel, WorkbenchLayoutSettings } from 'vs/workbench/browser/layoutState'; interface IWorkbenchLayoutWindowRuntimeState { - fullscreen: boolean, - maximized: boolean, - hasFocus: boolean, - windowBorder: boolean, + fullscreen: boolean; + maximized: boolean; + hasFocus: boolean; + windowBorder: boolean; menuBar: { - toggled: boolean - }, + toggled: boolean; + }; zenMode: { - transitionDisposables: DisposableStore - } + transitionDisposables: DisposableStore; + }; } interface IWorkbenchLayoutWindowInitializationState { views: { - defaults: string[] | undefined + defaults: string[] | undefined; containerToRestore: { - sideBar?: string, - panel?: string, - auxiliaryBar?: string, - } - }, + sideBar?: string; + panel?: string; + auxiliaryBar?: string; + }; + }; editor: { - restoreEditors: boolean, - editorsToOpen: Promise | IUntypedEditorInput[] - } + restoreEditors: boolean; + editorsToOpen: Promise | IUntypedEditorInput[]; + }; } interface IWorkbenchLayoutWindowState { - runtime: IWorkbenchLayoutWindowRuntimeState, - initialization: IWorkbenchLayoutWindowInitializationState, + runtime: IWorkbenchLayoutWindowRuntimeState; + initialization: IWorkbenchLayoutWindowInitializationState; } enum WorkbenchLayoutClasses { @@ -97,7 +97,7 @@ enum WorkbenchLayoutClasses { WINDOW_BORDER = 'border' } -interface IInitialFilesToOpen { filesToOpenOrCreate?: IPath[], filesToDiff?: IPath[]; } +interface IInitialFilesToOpen { filesToOpenOrCreate?: IPath[]; filesToDiff?: IPath[] } export abstract class Layout extends Disposable implements IWorkbenchLayoutService { @@ -687,9 +687,9 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi if (this.windowState.initialization.views.defaults?.length) { mark('code/willOpenDefaultViews'); - const locationsRestored: { id: string; order: number; }[] = []; + const locationsRestored: { id: string; order: number }[] = []; - const tryOpenView = (view: { id: string; order: number; }): boolean => { + const tryOpenView = (view: { id: string; order: number }): boolean => { const location = this.viewDescriptorService.getViewLocationById(view.id); if (location !== null) { const container = this.viewDescriptorService.getViewContainerByViewId(view.id); @@ -1180,7 +1180,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi [Parts.AUXILIARYBAR_PART]: this.auxiliaryBarPartView }; - const fromJSON = ({ type }: { type: Parts; }) => viewMap[type]; + const fromJSON = ({ type }: { type: Parts }) => viewMap[type]; const workbenchGrid = SerializableGrid.deserialize( this.createGridDescriptor(), { fromJSON }, @@ -1769,7 +1769,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi return undefined; } - private arrangeEditorNodes(nodes: { editor: ISerializedNode, sideBar?: ISerializedNode, auxiliaryBar?: ISerializedNode }, availableHeight: number, availableWidth: number): ISerializedNode { + private arrangeEditorNodes(nodes: { editor: ISerializedNode; sideBar?: ISerializedNode; auxiliaryBar?: ISerializedNode }, availableHeight: number, availableWidth: number): ISerializedNode { if (!nodes.sideBar && !nodes.auxiliaryBar) { nodes.editor.size = availableHeight; return nodes.editor; @@ -1804,7 +1804,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi }; } - private arrangeMiddleSectionNodes(nodes: { editor: ISerializedNode, panel: ISerializedNode, activityBar: ISerializedNode, sideBar: ISerializedNode, auxiliaryBar: ISerializedNode }, availableWidth: number, availableHeight: number): ISerializedNode[] { + private arrangeMiddleSectionNodes(nodes: { editor: ISerializedNode; panel: ISerializedNode; activityBar: ISerializedNode; sideBar: ISerializedNode; auxiliaryBar: ISerializedNode }, availableWidth: number, availableHeight: number): ISerializedNode[] { const activityBarSize = this.stateModel.getRuntimeValue(LayoutStateKeys.ACTIVITYBAR_HIDDEN) ? 0 : nodes.activityBar.size; const sideBarSize = this.stateModel.getRuntimeValue(LayoutStateKeys.SIDEBAR_HIDDEN) ? 0 : nodes.sideBar.size; const auxiliaryBarSize = this.stateModel.getRuntimeValue(LayoutStateKeys.AUXILIARYBAR_HIDDEN) ? 0 : nodes.auxiliaryBar.size; @@ -1953,12 +1953,12 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi }; type StartupLayoutEventClassification = { - activityBarVisible: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - sideBarVisible: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - auxiliaryBarVisible: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - panelVisible: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - statusbarVisible: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - sideBarPosition: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; + activityBarVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + sideBarVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + auxiliaryBarVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + panelVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + statusbarVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + sideBarPosition: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; const layoutDescriptor: StartupLayoutEvent = { diff --git a/src/vs/workbench/browser/layoutState.ts b/src/vs/workbench/browser/layoutState.ts index edbf01b9ef4c1..f2e17b367ea2e 100644 --- a/src/vs/workbench/browser/layoutState.ts +++ b/src/vs/workbench/browser/layoutState.ts @@ -12,12 +12,12 @@ import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/ import { PanelAlignment, Position, positionFromString, positionToString } from 'vs/workbench/services/layout/browser/layoutService'; interface IWorkbenchLayoutStateKey { - name: string, - runtime: boolean, - defaultValue: any, - scope: StorageScope, - target: StorageTarget - zenModeIgnore?: boolean, + name: string; + runtime: boolean; + defaultValue: any; + scope: StorageScope; + target: StorageTarget; + zenModeIgnore?: boolean; } type StorageKeyType = string | boolean | number | object; diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index cf9c3325160e7..51b15159903f8 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -102,10 +102,10 @@ export class ViewContainerActivityAction extends ActivityAction { private logAction(action: string) { type ActivityBarActionClassification = { - viewletId: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - action: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; + viewletId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + action: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; - this.telemetryService.publicLog2<{ viewletId: String, action: String; }, ActivityBarActionClassification>('activityBarAction', { viewletId: this.activity.id, action }); + this.telemetryService.publicLog2<{ viewletId: String; action: String }, ActivityBarActionClassification>('activityBarAction', { viewletId: this.activity.id, action }); } } @@ -224,7 +224,7 @@ export class AccountsActivityActionViewItem extends MenuActivityActionViewItem { try { const sessions = await this.authenticationService.getSessions(providerId); - const groupedSessions: { [label: string]: AuthenticationSession[]; } = {}; + const groupedSessions: { [label: string]: AuthenticationSession[] } = {}; sessions.forEach(session => { if (groupedSessions[session.account.label]) { groupedSessions[session.account.label].push(session); diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index e375baa47b616..2694ca8a42773 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -49,7 +49,7 @@ interface IPlaceholderViewContainer { readonly iconUrl?: UriComponents; readonly themeIcon?: ThemeIcon; readonly isBuiltin?: boolean; - readonly views?: { when?: string; }[]; + readonly views?: { when?: string }[]; } interface IPinnedViewContainer { @@ -67,7 +67,7 @@ interface ICachedViewContainer { readonly order?: number; visible: boolean; isBuiltin?: boolean; - views?: { when?: string; }[]; + views?: { when?: string }[]; } export class ActivitybarPart extends Part implements IPaneCompositeSelectorPart { @@ -108,7 +108,7 @@ export class ActivitybarPart extends Part implements IPaneCompositeSelectorPart private readonly accountsActivity: ICompositeActivity[] = []; - private readonly compositeActions = new Map(); + private readonly compositeActions = new Map(); private readonly viewContainerDisposables = new Map(); private readonly keyboardNavigationDisposables = this._register(new DisposableStore()); @@ -259,7 +259,7 @@ export class ActivitybarPart extends Part implements IPaneCompositeSelectorPart })); } - private onDidChangeViewContainers(added: readonly { container: ViewContainer, location: ViewContainerLocation; }[], removed: readonly { container: ViewContainer, location: ViewContainerLocation; }[]) { + private onDidChangeViewContainers(added: readonly { container: ViewContainer; location: ViewContainerLocation }[], removed: readonly { container: ViewContainer; location: ViewContainerLocation }[]) { removed.filter(({ location }) => location === ViewContainerLocation.Sidebar).forEach(({ container }) => this.onDidDeregisterViewContainer(container)); this.onDidRegisterViewContainers(added.filter(({ location }) => location === ViewContainerLocation.Sidebar).map(({ container }) => container)); } @@ -564,7 +564,7 @@ export class ActivitybarPart extends Part implements IPaneCompositeSelectorPart this.updateGlobalActivity(ACCOUNTS_ACTIVITY_ID); } - private getCompositeActions(compositeId: string): { activityAction: ViewContainerActivityAction, pinnedAction: ToggleCompositePinnedAction; } { + private getCompositeActions(compositeId: string): { activityAction: ViewContainerActivityAction; pinnedAction: ToggleCompositePinnedAction } { let compositeActions = this.compositeActions.get(compositeId); if (!compositeActions) { const viewContainer = this.getViewContainer(compositeId); @@ -850,7 +850,7 @@ export class ActivitybarPart extends Part implements IPaneCompositeSelectorPart const viewContainer = this.getViewContainer(compositeItem.id); if (viewContainer) { const viewContainerModel = this.viewDescriptorService.getViewContainerModel(viewContainer); - const views: { when: string | undefined; }[] = []; + const views: { when: string | undefined }[] = []; for (const { when } of viewContainerModel.allViewDescriptors) { views.push({ when: when ? when.serialize() : undefined }); } diff --git a/src/vs/workbench/browser/parts/banner/bannerPart.ts b/src/vs/workbench/browser/parts/banner/bannerPart.ts index 0f4f99bab1994..b28390d26805c 100644 --- a/src/vs/workbench/browser/parts/banner/bannerPart.ts +++ b/src/vs/workbench/browser/parts/banner/bannerPart.ts @@ -75,7 +75,7 @@ export class BannerPart extends Part implements IBannerService { return this.visible ? this.height : 0; } - private _onDidChangeSize = this._register(new Emitter<{ width: number; height: number; } | undefined>()); + private _onDidChangeSize = this._register(new Emitter<{ width: number; height: number } | undefined>()); override get onDidChange() { return this._onDidChangeSize.event; } //#endregion diff --git a/src/vs/workbench/browser/parts/compositeBar.ts b/src/vs/workbench/browser/parts/compositeBar.ts index 4cd79b5b3e0fd..68f6ebacaa8f2 100644 --- a/src/vs/workbench/browser/parts/compositeBar.ts +++ b/src/vs/workbench/browser/parts/compositeBar.ts @@ -325,7 +325,7 @@ export class CompositeBar extends Widget implements ICompositeBar { this.updateCompositeSwitcher(); } - addComposite({ id, name, order, requestedIndex }: { id: string; name: string, order?: number, requestedIndex?: number; }): void { + addComposite({ id, name, order, requestedIndex }: { id: string; name: string; order?: number; requestedIndex?: number }): void { // Add to the model if (this.model.add(id, name, order, requestedIndex)) { this.computeSizes([this.model.findItem(id)]); @@ -629,7 +629,7 @@ export class CompositeBar extends Widget implements ICompositeBar { this._onDidChange.fire(); } - private getOverflowingComposites(): { id: string, name?: string; }[] { + private getOverflowingComposites(): { id: string; name?: string }[] { let overflowingIds = this.model.visibleItems.filter(item => item.pinned).map(item => item.id); // Show the active composite even if it is not pinned diff --git a/src/vs/workbench/browser/parts/compositeBarActions.ts b/src/vs/workbench/browser/parts/compositeBarActions.ts index 597a0173dfdcc..3e853a32ef144 100644 --- a/src/vs/workbench/browser/parts/compositeBarActions.ts +++ b/src/vs/workbench/browser/parts/compositeBarActions.ts @@ -454,7 +454,7 @@ export class CompositeOverflowActivityActionViewItem extends ActivityActionViewI constructor( action: ActivityAction, - private getOverflowingComposites: () => { id: string, name?: string }[], + private getOverflowingComposites: () => { id: string; name?: string }[], private getActiveCompositeId: () => string | undefined, private getBadge: (compositeId: string) => IBadge, private getCompositeOpenAction: (compositeId: string) => IAction, diff --git a/src/vs/workbench/browser/parts/compositePart.ts b/src/vs/workbench/browser/parts/compositePart.ts index 7dc85be27ec54..b6fddb4625f1d 100644 --- a/src/vs/workbench/browser/parts/compositePart.ts +++ b/src/vs/workbench/browser/parts/compositePart.ts @@ -54,7 +54,7 @@ interface CompositeItem { export abstract class CompositePart extends Part { - protected readonly onDidCompositeOpen = this._register(new Emitter<{ composite: IComposite, focus: boolean; }>()); + protected readonly onDidCompositeOpen = this._register(new Emitter<{ composite: IComposite; focus: boolean }>()); protected readonly onDidCompositeClose = this._register(new Emitter()); protected toolBar: ToolBar | undefined; diff --git a/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts b/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts index 930e4c331e6e0..39e022669b3b7 100644 --- a/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts +++ b/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts @@ -362,7 +362,7 @@ export class BreadcrumbsControl { this._editorGroup.focus(); type BreadcrumbSelect = { type: string }; - type BreadcrumbSelectClassification = { type: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; }; + type BreadcrumbSelectClassification = { type: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' } }; this._telemetryService.publicLog2('breadcrumbs/select', { type: event.item instanceof OutlineItem ? 'symbol' : 'file' }); const group = this._getEditorGroup(event.payload); @@ -386,7 +386,7 @@ export class BreadcrumbsControl { let picker: BreadcrumbsPicker; let pickerAnchor: { x: number; y: number }; - interface IHideData { didPick?: boolean, source?: BreadcrumbsControl } + interface IHideData { didPick?: boolean; source?: BreadcrumbsControl } this._contextViewService.showContextView({ render: (parent: HTMLElement) => { diff --git a/src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts b/src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts index e1dc382fddabd..d0b6534c349e4 100644 --- a/src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts +++ b/src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts @@ -25,7 +25,7 @@ export class FileElement { ) { } } -type FileInfo = { path: FileElement[], folder?: IWorkspaceFolder }; +type FileInfo = { path: FileElement[]; folder?: IWorkspaceFolder }; export class OutlineElement2 { constructor( diff --git a/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts b/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts index 20305cf15cbf9..8785168b2d00b 100644 --- a/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts +++ b/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts @@ -111,7 +111,7 @@ export abstract class BreadcrumbsPicker { } // send telemetry interface OpenEvent { type: string } - interface OpenEventGDPR { type: { classification: 'SystemMetaData', purpose: 'FeatureInsight' } } + interface OpenEventGDPR { type: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' } } this._telemetryService.publicLog2('breadcrumbs/open', { type: element instanceof OutlineElement2 ? 'symbol' : 'file' }); })); this._disposables.add(this._tree.onDidChangeFocus(e => { @@ -167,7 +167,7 @@ class FileVirtualDelegate implements IListVirtualDelegate { - getId(element: IWorkspace | IWorkspaceFolder | IFileStat | URI): { toString(): string; } { + getId(element: IWorkspace | IWorkspaceFolder | IFileStat | URI): { toString(): string } { if (URI.isUri(element)) { return element.toString(); } else if (isWorkspace(element)) { @@ -226,7 +226,7 @@ class FileRenderer implements ITreeRenderer, index: number, templateData: IResourceLabel): void { - const fileDecorations = this._configService.getValue<{ colors: boolean, badges: boolean; }>('explorer.decorations'); + const fileDecorations = this._configService.getValue<{ colors: boolean; badges: boolean }>('explorer.decorations'); const { element } = node; let resource: URI; let fileKind: FileKind; @@ -253,7 +253,7 @@ class FileRenderer implements ITreeRenderer { - getKeyboardNavigationLabel(element: IWorkspaceFolder | IFileStat): { toString(): string; } { + getKeyboardNavigationLabel(element: IWorkspaceFolder | IFileStat): { toString(): string } { return element.name; } } diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index 256a1b5928bce..0e5d52146d8af 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -341,7 +341,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: CLOSE_SAVED_EDI MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_KEEP_EDITORS_COMMAND_ID, title: localize('toggleKeepEditors', "Keep Editors Open"), toggled: ContextKeyExpr.not('config.workbench.editor.enablePreview') }, group: '7_settings', order: 10 }); MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_LOCK_GROUP_COMMAND_ID, title: localize('lockGroup', "Lock Group"), toggled: ActiveEditorGroupLockedContext }, group: '8_lock', order: 10, when: MultipleEditorGroupsContext }); -interface IEditorToolItem { id: string; title: string; icon?: { dark?: URI; light?: URI; } | ThemeIcon; } +interface IEditorToolItem { id: string; title: string; icon?: { dark?: URI; light?: URI } | ThemeIcon } function appendEditorToolItem(primary: IEditorToolItem, when: ContextKeyExpression | undefined, order: number, alternative?: IEditorToolItem, precondition?: ContextKeyExpression | undefined): void { const item: IMenuItem = { diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 8a788971951d7..6f702d6b55ffe 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -527,7 +527,7 @@ export class CloseLeftEditorsInGroupAction extends Action { } } - private getTarget(context?: IEditorIdentifier): { editor: EditorInput | null, group: IEditorGroup | undefined } { + private getTarget(context?: IEditorIdentifier): { editor: EditorInput | null; group: IEditorGroup | undefined } { if (context) { return { editor: context.editor, group: this.editorGroupService.getGroup(context.groupId) }; } diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index 23ecce07fe070..73206c285ffaa 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -1347,7 +1347,7 @@ function registerOtherEditorCommands(): void { }); } -function getEditorsContext(accessor: ServicesAccessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext): { editors: IEditorCommandsContext[], groups: Array } { +function getEditorsContext(accessor: ServicesAccessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext): { editors: IEditorCommandsContext[]; groups: Array } { const editorGroupService = accessor.get(IEditorGroupsService); const listService = accessor.get(IListService); @@ -1384,7 +1384,7 @@ function getCommandsContext(resourceOrContext?: URI | IEditorCommandsContext, co return undefined; } -function resolveCommandsContext(editorGroupService: IEditorGroupsService, context?: IEditorCommandsContext): { group: IEditorGroup, editor?: EditorInput } { +function resolveCommandsContext(editorGroupService: IEditorGroupsService, context?: IEditorCommandsContext): { group: IEditorGroup; editor?: EditorInput } { // Resolve from context let group = context && typeof context.groupId === 'number' ? editorGroupService.getGroup(context.groupId) : undefined; diff --git a/src/vs/workbench/browser/parts/editor/editorDropTarget.ts b/src/vs/workbench/browser/parts/editor/editorDropTarget.ts index d3eb933b0a1dd..37ac0c7c64e82 100644 --- a/src/vs/workbench/browser/parts/editor/editorDropTarget.ts +++ b/src/vs/workbench/browser/parts/editor/editorDropTarget.ts @@ -483,7 +483,7 @@ class DropOverlay extends Themable { this.currentDropOperation = { splitDirection }; } - private doPositionOverlay(options: { top: string, left: string, width: string, height: string }): void { + private doPositionOverlay(options: { top: string; left: string; width: string; height: string }): void { const [container, overlay] = assertAllDefined(this.container, this.overlay); // Container diff --git a/src/vs/workbench/browser/parts/editor/editorGroupView.ts b/src/vs/workbench/browser/parts/editor/editorGroupView.ts index 8a65ad784bc6c..5ad34a3c872b2 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupView.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupView.ts @@ -339,7 +339,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { // Toolbar actions const containerToolbarMenu = this._register(this.menuService.createMenu(MenuId.EmptyEditorGroup, this.scopedContextKeyService)); const updateContainerToolbar = () => { - const actions: { primary: IAction[], secondary: IAction[]; } = { primary: [], secondary: [] }; + const actions: { primary: IAction[]; secondary: IAction[] } = { primary: [], secondary: [] }; this.containerToolBarMenuDisposable.value = combinedDisposable( @@ -377,7 +377,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { } // Find target anchor - let anchor: HTMLElement | { x: number, y: number; } = this.element; + let anchor: HTMLElement | { x: number; y: number } = this.element; if (e instanceof MouseEvent) { const event = new StandardMouseEvent(e); anchor = { x: event.posx, y: event.posy }; @@ -861,7 +861,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { return this.model.contains(candidate, options); } - getEditors(order: EditorsOrder, options?: { excludeSticky?: boolean; }): EditorInput[] { + getEditors(order: EditorsOrder, options?: { excludeSticky?: boolean }): EditorInput[] { return this.model.getEditors(order, options); } @@ -1059,7 +1059,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { return showEditorResult; } - private doShowEditor(editor: EditorInput, context: { active: boolean, isNew: boolean; }, options?: IEditorOptions, internalOptions?: IInternalEditorOpenOptions): Promise { + private doShowEditor(editor: EditorInput, context: { active: boolean; isNew: boolean }, options?: IEditorOptions, internalOptions?: IInternalEditorOpenOptions): Promise { // Show in editor control if the active editor changed let openEditorPromise: Promise; @@ -1186,7 +1186,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { //#region openEditors() - async openEditors(editors: { editor: EditorInput, options?: IEditorOptions; }[]): Promise { + async openEditors(editors: { editor: EditorInput; options?: IEditorOptions }[]): Promise { // Guard against invalid editors. Disposed editors // should never open because they emit no events @@ -1238,7 +1238,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { //#region moveEditor() - moveEditors(editors: { editor: EditorInput, options?: IEditorOptions; }[], target: EditorGroupView): void { + moveEditors(editors: { editor: EditorInput; options?: IEditorOptions }[], target: EditorGroupView): void { // Optimization: knowing that we move many editors, we // delay the title update to a later point for this group @@ -1337,7 +1337,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { //#region copyEditor() - copyEditors(editors: { editor: EditorInput, options?: IEditorOptions; }[], target: EditorGroupView): void { + copyEditors(editors: { editor: EditorInput; options?: IEditorOptions }[], target: EditorGroupView): void { // Optimization: knowing that we move many editors, we // delay the title update to a later point for this group @@ -1549,7 +1549,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { return this.handleDirtyClosing(editors); } - private async doHandleDirtyClosing(editor: EditorInput, options?: { skipAutoSave: boolean; }): Promise { + private async doHandleDirtyClosing(editor: EditorInput, options?: { skipAutoSave: boolean }): Promise { if (!editor.isDirty() || editor.isSaving()) { return false; // editor must be dirty and not saving } @@ -1942,7 +1942,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { get maximumWidth(): number { return this.editorPane.maximumWidth; } get maximumHeight(): number { return this.editorPane.maximumHeight; } - private _onDidChange = this._register(new Relay<{ width: number; height: number; } | undefined>()); + private _onDidChange = this._register(new Relay<{ width: number; height: number } | undefined>()); readonly onDidChange = this._onDidChange.event; layout(width: number, height: number): void { diff --git a/src/vs/workbench/browser/parts/editor/editorPanes.ts b/src/vs/workbench/browser/parts/editor/editorPanes.ts index 045805ca56503..4558ce5618eb1 100644 --- a/src/vs/workbench/browser/parts/editor/editorPanes.ts +++ b/src/vs/workbench/browser/parts/editor/editorPanes.ts @@ -62,7 +62,7 @@ export class EditorPanes extends Disposable { private readonly _onDidFocus = this._register(new Emitter()); readonly onDidFocus = this._onDidFocus.event; - private _onDidChangeSizeConstraints = this._register(new Emitter<{ width: number; height: number; } | undefined>()); + private _onDidChangeSizeConstraints = this._register(new Emitter<{ width: number; height: number } | undefined>()); readonly onDidChangeSizeConstraints = this._onDidChangeSizeConstraints.event; //#endregion @@ -251,7 +251,7 @@ export class EditorPanes extends Disposable { this._onDidChangeSizeConstraints.fire(undefined); } - private async doSetInput(editorPane: EditorPane, editor: EditorInput, options: IEditorOptions | undefined, context: IEditorOpenContext): Promise<{ changed: boolean, cancelled: boolean }> { + private async doSetInput(editorPane: EditorPane, editor: EditorInput, options: IEditorOptions | undefined, context: IEditorOpenContext): Promise<{ changed: boolean; cancelled: boolean }> { // If the input did not change, return early and only // apply the options unless the options instruct us to diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 5e5b04df889bb..31c28c9eabf01 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -49,7 +49,7 @@ class GridWidgetView implements IView { get minimumHeight(): number { return this.gridWidget ? this.gridWidget.minimumHeight : 0; } get maximumHeight(): number { return this.gridWidget ? this.gridWidget.maximumHeight : Number.POSITIVE_INFINITY; } - private _onDidChange = new Relay<{ width: number; height: number; } | undefined>(); + private _onDidChange = new Relay<{ width: number; height: number } | undefined>(); readonly onDidChange = this._onDidChange.event; private _gridWidget: Grid | undefined; @@ -115,9 +115,9 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro private readonly _onDidMoveGroup = this._register(new Emitter()); readonly onDidMoveGroup = this._onDidMoveGroup.event; - private readonly onDidSetGridWidget = this._register(new Emitter<{ width: number; height: number; } | undefined>()); + private readonly onDidSetGridWidget = this._register(new Emitter<{ width: number; height: number } | undefined>()); - private readonly _onDidChangeSizeConstraints = this._register(new Relay<{ width: number; height: number; } | undefined>()); + private readonly _onDidChangeSizeConstraints = this._register(new Relay<{ width: number; height: number } | undefined>()); readonly onDidChangeSizeConstraints = Event.any(this.onDidSetGridWidget.event, this._onDidChangeSizeConstraints.event); private readonly _onDidChangeEditorPartOptions = this._register(new Emitter()); @@ -336,13 +336,13 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro return groupView; } - getSize(group: IEditorGroupView | GroupIdentifier): { width: number, height: number } { + getSize(group: IEditorGroupView | GroupIdentifier): { width: number; height: number } { const groupView = this.assertGroupView(group); return this.gridWidget.getViewSize(groupView); } - setSize(group: IEditorGroupView | GroupIdentifier, size: { width: number, height: number }): void { + setSize(group: IEditorGroupView | GroupIdentifier, size: { width: number; height: number }): void { const groupView = this.assertGroupView(group); this.gridWidget.resizeView(groupView, size); diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index c5021bac9be3d..f60356c71d701 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -179,15 +179,15 @@ class StateChange { } type StateDelta = ( - { type: 'selectionStatus'; selectionStatus: string | undefined; } - | { type: 'languageId'; languageId: string | undefined; } - | { type: 'encoding'; encoding: string | undefined; } - | { type: 'EOL'; EOL: string | undefined; } - | { type: 'indentation'; indentation: string | undefined; } - | { type: 'tabFocusMode'; tabFocusMode: boolean; } - | { type: 'columnSelectionMode'; columnSelectionMode: boolean; } - | { type: 'screenReaderMode'; screenReaderMode: boolean; } - | { type: 'metadata'; metadata: string | undefined; } + { type: 'selectionStatus'; selectionStatus: string | undefined } + | { type: 'languageId'; languageId: string | undefined } + | { type: 'encoding'; encoding: string | undefined } + | { type: 'EOL'; EOL: string | undefined } + | { type: 'indentation'; indentation: string | undefined } + | { type: 'tabFocusMode'; tabFocusMode: boolean } + | { type: 'columnSelectionMode'; columnSelectionMode: boolean } + | { type: 'screenReaderMode'; screenReaderMode: boolean } + | { type: 'metadata'; metadata: string | undefined } ); class State { @@ -378,7 +378,7 @@ export class EditorStatus extends Disposable implements IWorkbenchContribution { return this.quickInputService.pick([{ label: localize('noWritableCodeEditor', "The active code editor is read-only.") }]); } - const picks: QuickPickInput[] = [ + const picks: QuickPickInput[] = [ activeTextEditorControl.getAction(IndentUsingSpaces.ID), activeTextEditorControl.getAction(IndentUsingTabs.ID), activeTextEditorControl.getAction(DetectIndentation.ID), diff --git a/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts b/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts index 1c4551af28b86..2cdbdc12c7f22 100644 --- a/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts +++ b/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts @@ -79,9 +79,9 @@ export class SideBySideEditor extends AbstractEditorWithViewState()); + private onDidCreateEditors = this._register(new Emitter<{ width: number; height: number } | undefined>()); - private _onDidChangeSizeConstraints = this._register(new Relay<{ width: number; height: number; } | undefined>()); + private _onDidChangeSizeConstraints = this._register(new Relay<{ width: number; height: number } | undefined>()); override readonly onDidChangeSizeConstraints = Event.any(this.onDidCreateEditors.event, this._onDidChangeSizeConstraints.event); //#endregion @@ -262,7 +262,7 @@ export class SideBySideEditor extends AbstractEditorWithViewState; - onDidPaneCompositeClose: Event<{ composite: IPaneComposite; viewContainerLocation: ViewContainerLocation; }>; + onDidPaneCompositeOpen: Event<{ composite: IPaneComposite; viewContainerLocation: ViewContainerLocation }>; + onDidPaneCompositeClose: Event<{ composite: IPaneComposite; viewContainerLocation: ViewContainerLocation }>; private paneCompositeParts = new Map(); private paneCompositeSelectorParts = new Map(); diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 69da4553060bf..8aceae4ad090f 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -52,7 +52,7 @@ interface ICachedPanel { pinned: boolean; order?: number; visible: boolean; - views?: { when?: string; }[]; + views?: { when?: string }[]; } interface IPlaceholderViewContainer { @@ -61,8 +61,8 @@ interface IPlaceholderViewContainer { } interface IPanelPartOptions extends IPartOptions { - hasTitle: true, - borderWidth?: (() => number), + hasTitle: true; + borderWidth?: (() => number); useIcons?: boolean; } @@ -107,7 +107,7 @@ export abstract class BasePanelPart extends CompositePart impleme readonly onDidPaneCompositeClose = this.onDidCompositeClose.event as Event; private compositeBar: CompositeBar; - private readonly compositeActions = new Map(); + private readonly compositeActions = new Map(); private readonly panelDisposables: Map = new Map(); @@ -685,7 +685,7 @@ export abstract class BasePanelPart extends CompositePart impleme return viewContainer && this.viewDescriptorService.getViewContainerLocation(viewContainer) === this.viewContainerLocation ? viewContainer : undefined; } - private getCompositeActions(compositeId: string): { activityAction: PanelActivityAction, pinnedAction: ToggleCompositePinnedAction; } { + private getCompositeActions(compositeId: string): { activityAction: PanelActivityAction; pinnedAction: ToggleCompositePinnedAction } { let compositeActions = this.compositeActions.get(compositeId); if (!compositeActions) { // const panel = this.getPaneComposite(compositeId); diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index c5672a9a14844..aea0b4f74c316 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -175,7 +175,7 @@ export class SidebarPart extends CompositePart implements IPaneCo this.titleLabelElement!.draggable = true; - const draggedItemProvider = (): { type: 'view' | 'composite', id: string } => { + const draggedItemProvider = (): { type: 'view' | 'composite'; id: string } => { const activeViewlet = this.getActivePaneComposite()!; return { type: 'composite', id: activeViewlet.getId() }; }; @@ -285,7 +285,7 @@ export class SidebarPart extends CompositePart implements IPaneCo if (activeViewlet) { const contextMenuActions = activeViewlet ? activeViewlet.getContextMenuActions() : []; if (contextMenuActions.length) { - const anchor: { x: number, y: number } = { x: event.posx, y: event.posy }; + const anchor: { x: number; y: number } = { x: event.posx, y: event.posy }; this.contextMenuService.showContextMenu({ getAnchor: () => anchor, getActions: () => contextMenuActions.slice(), diff --git a/src/vs/workbench/browser/parts/statusbar/statusbarModel.ts b/src/vs/workbench/browser/parts/statusbar/statusbarModel.ts index b4b8d744c8f4e..ae7029312ad8a 100644 --- a/src/vs/workbench/browser/parts/statusbar/statusbarModel.ts +++ b/src/vs/workbench/browser/parts/statusbar/statusbarModel.ts @@ -74,7 +74,7 @@ export class StatusbarViewModel extends Disposable { private static readonly HIDDEN_ENTRIES_KEY = 'workbench.statusbar.hidden'; - private readonly _onDidChangeEntryVisibility = this._register(new Emitter<{ id: string, visible: boolean }>()); + private readonly _onDidChangeEntryVisibility = this._register(new Emitter<{ id: string; visible: boolean }>()); readonly onDidChangeEntryVisibility = this._onDidChangeEntryVisibility.event; private _entries: IStatusbarViewModelEntry[] = []; // Intentionally not using a map here since multiple entries can have the same ID diff --git a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts index 95ccdf43cb7c9..2ddc43cd2b803 100644 --- a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts +++ b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts @@ -40,7 +40,7 @@ import { IsMacNativeContext, IsWebContext } from 'vs/platform/contextkey/common/ import { ICommandService } from 'vs/platform/commands/common/commands'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -export type IOpenRecentAction = IAction & { uri: URI, remoteAuthority?: string }; +export type IOpenRecentAction = IAction & { uri: URI; remoteAuthority?: string }; MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, { submenu: MenuId.MenubarFileMenu, @@ -221,7 +221,7 @@ export abstract class MenubarControl extends Disposable { this.menuUpdater.schedule(); } - protected calculateActionLabel(action: { id: string; label: string; }): string { + protected calculateActionLabel(action: { id: string; label: string }): string { let label = action.label; switch (action.id) { default: diff --git a/src/vs/workbench/browser/parts/views/treeView.ts b/src/vs/workbench/browser/parts/views/treeView.ts index a148326cd4833..e965895185cc8 100644 --- a/src/vs/workbench/browser/parts/views/treeView.ts +++ b/src/vs/workbench/browser/parts/views/treeView.ts @@ -799,7 +799,7 @@ abstract class AbstractTreeView extends Disposable implements ITreeView { } class TreeViewIdentityProvider implements IIdentityProvider { - getId(element: ITreeItem): { toString(): string; } { + getId(element: ITreeItem): { toString(): string } { return element.handle; } } @@ -980,7 +980,7 @@ class TreeRenderer extends Disposable implements ITreeRenderer('explorer.decorations'); + const fileDecorations = this.configurationService.getValue<{ colors: boolean; badges: boolean }>('explorer.decorations'); const labelResource = resource ? resource : URI.parse('missing:_icon_resource'); templateData.resourceLabel.setResource({ name: label, description, resource: labelResource }, { fileKind: this.getFileKind(node), @@ -1163,7 +1163,7 @@ class TreeMenus extends Disposable implements IDisposable { this.contextKeyService = service; } - private getActions(menuId: MenuId, context: { key: string, value?: string; }): { primary: IAction[]; secondary: IAction[]; } { + private getActions(menuId: MenuId, context: { key: string; value?: string }): { primary: IAction[]; secondary: IAction[] } { if (!this.contextKeyService) { return { primary: [], secondary: [] }; } @@ -1233,7 +1233,7 @@ export class TreeView extends AbstractTreeView { } interface TreeDragSourceInfo { - id: string, + id: string; itemHandles: string[]; } diff --git a/src/vs/workbench/browser/parts/views/viewPane.ts b/src/vs/workbench/browser/parts/views/viewPane.ts index 51b3f5551cece..fa70a4f92f90d 100644 --- a/src/vs/workbench/browser/parts/views/viewPane.ts +++ b/src/vs/workbench/browser/parts/views/viewPane.ts @@ -50,8 +50,8 @@ export interface IViewPaneOptions extends IPaneOptions { } type WelcomeActionClassification = { - viewId: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - uri: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + viewId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + uri: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; const viewPaneContainerExpandedIcon = registerIcon('view-pane-container-expanded', Codicon.chevronDown, nls.localize('viewPaneContainerExpandedIcon', 'Icon for an expanded view pane container.')); @@ -565,7 +565,7 @@ export abstract class ViewPane extends Pane implements IView { const button = new Button(buttonContainer, { title: node.title, supportIcons: true }); button.label = node.label; button.onDidClick(_ => { - this.telemetryService.publicLog2<{ viewId: string, uri: string }, WelcomeActionClassification>('views.welcomeAction', { viewId: this.id, uri: node.href }); + this.telemetryService.publicLog2<{ viewId: string; uri: string }, WelcomeActionClassification>('views.welcomeAction', { viewId: this.id, uri: node.href }); this.openerService.open(node.href, { allowCommands: true }); }, null, disposables); disposables.add(button); diff --git a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts index 17e0b2b1d6e44..51d370356aa06 100644 --- a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts +++ b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts @@ -73,7 +73,7 @@ const enum DropDirection { RIGHT } -type BoundingRect = { top: number, left: number, bottom: number, right: number }; +type BoundingRect = { top: number; left: number; bottom: number; right: number }; class ViewPaneDropOverlay extends Themable { @@ -271,7 +271,7 @@ class ViewPaneDropOverlay extends Themable { this.overlay.style.borderRightWidth = direction === DropDirection.RIGHT ? '2px' : '0px'; } - private doPositionOverlay(options: { top?: string, bottom?: string, left?: string, right?: string, width: string, height: string }): void { + private doPositionOverlay(options: { top?: string; bottom?: string; left?: string; right?: string; width: string; height: string }): void { // Container this.container.style.height = '100%'; @@ -435,7 +435,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { }; }; - const inBounds = (bounds: BoundingRect, pos: { x: number, y: number }) => { + const inBounds = (bounds: BoundingRect, pos: { x: number; y: number }) => { return pos.x >= bounds.left && pos.x <= bounds.right && pos.y >= bounds.top && pos.y <= bounds.bottom; }; @@ -580,7 +580,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { event.stopPropagation(); event.preventDefault(); - let anchor: { x: number, y: number; } = { x: event.posx, y: event.posy }; + let anchor: { x: number; y: number } = { x: event.posx, y: event.posy }; this.contextMenuService.showContextMenu({ getAnchor: () => anchor, getActions: () => this.menuActions?.getContextMenuActions() ?? [] @@ -647,7 +647,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { return optimalWidth + additionalMargin; } - addPanes(panes: { pane: ViewPane, size: number, index?: number; }[]): void { + addPanes(panes: { pane: ViewPane; size: number; index?: number }[]): void { const wasMerged = this.isViewMergedWithContainer(); for (const { pane: pane, size, index } of panes) { @@ -743,7 +743,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { const actions: IAction[] = viewPane.menuActions.getContextMenuActions(); - let anchor: { x: number, y: number } = { x: event.posx, y: event.posy }; + let anchor: { x: number; y: number } = { x: event.posx, y: event.posy }; this.contextMenuService.showContextMenu({ getAnchor: () => anchor, getActions: () => actions @@ -766,7 +766,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { } protected onDidAddViewDescriptors(added: IAddedViewDescriptorRef[]): ViewPane[] { - const panesToAdd: { pane: ViewPane, size: number, index: number }[] = []; + const panesToAdd: { pane: ViewPane; size: number; index: number }[] = []; for (const { viewDescriptor, collapsed, index, size } of added) { const pane = this.createView(viewDescriptor, @@ -823,10 +823,10 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { if (this.viewContainerModel.activeViewDescriptors.some(viewDescriptor => viewDescriptor.id === viewId)) { const visible = !this.viewContainerModel.isVisible(viewId); type ViewsToggleVisibilityClassification = { - viewId: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - visible: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + viewId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + visible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; - this.telemetryService.publicLog2<{ viewId: String, visible: boolean }, ViewsToggleVisibilityClassification>('views.toggleVisibility', { viewId, visible }); + this.telemetryService.publicLog2<{ viewId: String; visible: boolean }, ViewsToggleVisibilityClassification>('views.toggleVisibility', { viewId, visible }); this.viewContainerModel.setVisible(viewId, visible); } } @@ -1262,7 +1262,7 @@ registerAction2(class MoveViews extends Action2 { }); } - async run(accessor: ServicesAccessor, options: { viewIds: string[], destinationId: string }): Promise { + async run(accessor: ServicesAccessor, options: { viewIds: string[]; destinationId: string }): Promise { if (!Array.isArray(options?.viewIds) || typeof options?.destinationId !== 'string') { return Promise.reject('Invalid arguments'); } diff --git a/src/vs/workbench/browser/parts/views/viewsService.ts b/src/vs/workbench/browser/parts/views/viewsService.ts index 18a44dd6076ec..93840bf4a76f4 100644 --- a/src/vs/workbench/browser/parts/views/viewsService.ts +++ b/src/vs/workbench/browser/parts/views/viewsService.ts @@ -39,10 +39,10 @@ export class ViewsService extends Disposable implements IViewsService { private readonly viewDisposable: Map; private readonly viewPaneContainers: Map; - private readonly _onDidChangeViewVisibility: Emitter<{ id: string, visible: boolean }> = this._register(new Emitter<{ id: string, visible: boolean }>()); - readonly onDidChangeViewVisibility: Event<{ id: string, visible: boolean }> = this._onDidChangeViewVisibility.event; + private readonly _onDidChangeViewVisibility: Emitter<{ id: string; visible: boolean }> = this._register(new Emitter<{ id: string; visible: boolean }>()); + readonly onDidChangeViewVisibility: Event<{ id: string; visible: boolean }> = this._onDidChangeViewVisibility.event; - private readonly _onDidChangeViewContainerVisibility = this._register(new Emitter<{ id: string, visible: boolean, location: ViewContainerLocation }>()); + private readonly _onDidChangeViewContainerVisibility = this._register(new Emitter<{ id: string; visible: boolean; location: ViewContainerLocation }>()); readonly onDidChangeViewContainerVisibility = this._onDidChangeViewContainerVisibility.event; private readonly visibleViewContextKeys: Map>; @@ -103,7 +103,7 @@ export class ViewsService extends Disposable implements IViewsService { return contextKey; } - private onDidChangeContainers(added: ReadonlyArray<{ container: ViewContainer, location: ViewContainerLocation }>, removed: ReadonlyArray<{ container: ViewContainer, location: ViewContainerLocation }>): void { + private onDidChangeContainers(added: ReadonlyArray<{ container: ViewContainer; location: ViewContainerLocation }>, removed: ReadonlyArray<{ container: ViewContainer; location: ViewContainerLocation }>): void { for (const { container, location } of removed) { this.deregisterPaneComposite(container, location); } @@ -158,7 +158,7 @@ export class ViewsService extends Disposable implements IViewsService { return this.paneCompositeService.openPaneComposite(compositeId, location, focus); } - private getComposite(compositeId: string, location: ViewContainerLocation): { id: string, name: string } | undefined { + private getComposite(compositeId: string, location: ViewContainerLocation): { id: string; name: string } | undefined { return this.paneCompositeService.getPaneComposite(compositeId, location); } diff --git a/src/vs/workbench/browser/quickaccess.ts b/src/vs/workbench/browser/quickaccess.ts index 2f527dab11a10..a7e0980b6d228 100644 --- a/src/vs/workbench/browser/quickaccess.ts +++ b/src/vs/workbench/browser/quickaccess.ts @@ -21,11 +21,11 @@ export interface IWorkbenchQuickAccessConfiguration { commandPalette: { history: number; preserveInput: boolean; - }, + }; quickOpen: { enableExperimentalNewVersion: boolean; preserveInput: boolean; - } + }; }; } diff --git a/src/vs/workbench/browser/web.api.ts b/src/vs/workbench/browser/web.api.ts index 41bb1cf3bb26f..44593e9280773 100644 --- a/src/vs/workbench/browser/web.api.ts +++ b/src/vs/workbench/browser/web.api.ts @@ -33,7 +33,7 @@ export interface IWorkbench { * @return A promise that resolves to the returned value of the given command. */ executeCommand(command: string, ...args: any[]): Promise; - } + }; env: { @@ -61,7 +61,7 @@ export interface IWorkbench { * workbench. */ openUri(target: URI): Promise; - } + }; /** * Triggers shutdown of the workbench programmatically. After this method is @@ -122,13 +122,13 @@ export interface IWorkbenchConstructionOptions { /** * Endpoints to be used for proxying authentication code exchange calls in the browser. */ - readonly codeExchangeProxyEndpoints?: { [providerId: string]: string } + readonly codeExchangeProxyEndpoints?: { [providerId: string]: string }; /** * [TEMPORARY]: This will be removed soon. * Endpoints to be used for proxying repository tarball download calls in the browser. */ - readonly _tarballProxyEndpoints?: { [providerId: string]: string } + readonly _tarballProxyEndpoints?: { [providerId: string]: string }; //#endregion @@ -282,7 +282,7 @@ export interface IResourceUriProvider { */ export type ExtensionId = string; -export type MarketplaceExtension = ExtensionId | { readonly id: ExtensionId, preRelease?: boolean, migrateStorageFrom?: ExtensionId }; +export type MarketplaceExtension = ExtensionId | { readonly id: ExtensionId; preRelease?: boolean; migrateStorageFrom?: ExtensionId }; export interface ICommonTelemetryPropertiesResolver { (): { [key: string]: any }; @@ -328,7 +328,7 @@ export interface ITunnelFactory { export interface ITunnelOptions { - remoteAddress: { port: number, host: string }; + remoteAddress: { port: number; host: string }; /** * The desired local port. If this port can't be used, then another will be chosen. @@ -357,7 +357,7 @@ export interface TunnelCreationOptions { export interface ITunnel { - remoteAddress: { port: number, host: string }; + remoteAddress: { port: number; host: string }; /** * The complete local address(ex. localhost:1234) @@ -399,20 +399,20 @@ export interface ICommand { * An identifier for the command. Commands can be executed from extensions * using the `vscode.commands.executeCommand` API using that command ID. */ - id: string, + id: string; /** * The optional label of the command. If provided, the command will appear * in the command palette. */ - label?: string, + label?: string; /** * The optional menus to append this command to. Only valid if `label` is * provided as well. * @default Menu.CommandPalette */ - menu?: Menu | Menu[], + menu?: Menu | Menu[]; /** * A function that is being executed with any arguments passed over. The diff --git a/src/vs/workbench/browser/web.main.ts b/src/vs/workbench/browser/web.main.ts index 0b85a689a3a73..23e4b302631a7 100644 --- a/src/vs/workbench/browser/web.main.ts +++ b/src/vs/workbench/browser/web.main.ts @@ -144,7 +144,7 @@ export class BrowserMain extends Disposable { this._register(workbench.onDidShutdown(() => this.dispose())); } - private async initServices(): Promise<{ serviceCollection: ServiceCollection, configurationService: IWorkbenchConfigurationService, logService: ILogService }> { + private async initServices(): Promise<{ serviceCollection: ServiceCollection; configurationService: IWorkbenchConfigurationService; logService: ILogService }> { const serviceCollection = new ServiceCollection(); diff --git a/src/vs/workbench/browser/workbench.ts b/src/vs/workbench/browser/workbench.ts index c6755a2a284f3..6d6439c4b13f4 100644 --- a/src/vs/workbench/browser/workbench.ts +++ b/src/vs/workbench/browser/workbench.ts @@ -110,7 +110,7 @@ export class Workbench extends Layout { }); } - private previousUnexpectedError: { message: string | undefined, time: number } = { message: undefined, time: 0 }; + private previousUnexpectedError: { message: string | undefined; time: number } = { message: undefined, time: 0 }; private handleUnexpectedError(error: unknown, logService: ILogService): void { const message = toErrorMessage(error, true); if (!message) { diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 28d62d13555f7..a93fb61501277 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -130,7 +130,7 @@ export interface IEditorPane extends IComposite { /** * An event to notify whenever minimum/maximum width/height changes. */ - readonly onDidChangeSizeConstraints: Event<{ width: number; height: number; } | undefined>; + readonly onDidChangeSizeConstraints: Event<{ width: number; height: number } | undefined>; /** * The context key service for this editor. Should be overridden by @@ -822,7 +822,7 @@ export const enum GroupModelChangeKind { export interface IWorkbenchEditorConfiguration { workbench?: { - editor?: IEditorPartConfiguration, + editor?: IEditorPartConfiguration; iconTheme?: string; }; } @@ -861,7 +861,7 @@ interface IEditorPartConfiguration { decorations?: { badges?: boolean; colors?: boolean; - } + }; } export interface IEditorPartOptions extends IEditorPartConfiguration { @@ -943,8 +943,8 @@ class EditorResourceAccessorImpl { */ getOriginalUri(editor: EditorInput | IUntypedEditorInput | undefined | null): URI | undefined; getOriginalUri(editor: EditorInput | IUntypedEditorInput | undefined | null, options: IEditorResourceAccessorOptions & { supportSideBySide?: SideBySideEditor.PRIMARY | SideBySideEditor.SECONDARY | SideBySideEditor.ANY }): URI | undefined; - getOriginalUri(editor: EditorInput | IUntypedEditorInput | undefined | null, options: IEditorResourceAccessorOptions & { supportSideBySide: SideBySideEditor.BOTH }): URI | { primary?: URI, secondary?: URI } | undefined; - getOriginalUri(editor: EditorInput | IUntypedEditorInput | undefined | null, options?: IEditorResourceAccessorOptions): URI | { primary?: URI, secondary?: URI } | undefined { + getOriginalUri(editor: EditorInput | IUntypedEditorInput | undefined | null, options: IEditorResourceAccessorOptions & { supportSideBySide: SideBySideEditor.BOTH }): URI | { primary?: URI; secondary?: URI } | undefined; + getOriginalUri(editor: EditorInput | IUntypedEditorInput | undefined | null, options?: IEditorResourceAccessorOptions): URI | { primary?: URI; secondary?: URI } | undefined { if (!editor) { return undefined; } @@ -979,7 +979,7 @@ class EditorResourceAccessorImpl { return this.filterUri(originalResource, options.filterByScheme); } - private getSideEditors(editor: EditorInput | IUntypedEditorInput): { primary: EditorInput | IUntypedEditorInput | undefined, secondary: EditorInput | IUntypedEditorInput | undefined } { + private getSideEditors(editor: EditorInput | IUntypedEditorInput): { primary: EditorInput | IUntypedEditorInput | undefined; secondary: EditorInput | IUntypedEditorInput | undefined } { if (isSideBySideEditorInput(editor) || isResourceSideBySideEditorInput(editor)) { return { primary: editor.primary, secondary: editor.secondary }; } @@ -1006,8 +1006,8 @@ class EditorResourceAccessorImpl { */ getCanonicalUri(editor: EditorInput | IUntypedEditorInput | undefined | null): URI | undefined; getCanonicalUri(editor: EditorInput | IUntypedEditorInput | undefined | null, options: IEditorResourceAccessorOptions & { supportSideBySide?: SideBySideEditor.PRIMARY | SideBySideEditor.SECONDARY | SideBySideEditor.ANY }): URI | undefined; - getCanonicalUri(editor: EditorInput | IUntypedEditorInput | undefined | null, options: IEditorResourceAccessorOptions & { supportSideBySide: SideBySideEditor.BOTH }): URI | { primary?: URI, secondary?: URI } | undefined; - getCanonicalUri(editor: EditorInput | IUntypedEditorInput | undefined | null, options?: IEditorResourceAccessorOptions): URI | { primary?: URI, secondary?: URI } | undefined { + getCanonicalUri(editor: EditorInput | IUntypedEditorInput | undefined | null, options: IEditorResourceAccessorOptions & { supportSideBySide: SideBySideEditor.BOTH }): URI | { primary?: URI; secondary?: URI } | undefined; + getCanonicalUri(editor: EditorInput | IUntypedEditorInput | undefined | null, options?: IEditorResourceAccessorOptions): URI | { primary?: URI; secondary?: URI } | undefined { if (!editor) { return undefined; } diff --git a/src/vs/workbench/common/notifications.ts b/src/vs/workbench/common/notifications.ts index 78e0be0b8452f..87f21476aff86 100644 --- a/src/vs/workbench/common/notifications.ts +++ b/src/vs/workbench/common/notifications.ts @@ -506,7 +506,7 @@ export class NotificationViewItem extends Disposable implements INotificationVie private _sticky: boolean | undefined, private _silent: boolean | undefined, private _message: INotificationMessage, - private _source: string | { label: string, id: string; } | undefined, + private _source: string | { label: string; id: string } | undefined, progress: INotificationProgressProperties | undefined, actions?: INotificationActions ) { diff --git a/src/vs/workbench/common/views.ts b/src/vs/workbench/common/views.ts index 7d5ddb49ae042..89caae66fef5c 100644 --- a/src/vs/workbench/common/views.ts +++ b/src/vs/workbench/common/views.ts @@ -127,12 +127,12 @@ export interface IViewContainersRegistry { /** * An event that is triggered when a view container is registered. */ - readonly onDidRegister: Event<{ viewContainer: ViewContainer, viewContainerLocation: ViewContainerLocation }>; + readonly onDidRegister: Event<{ viewContainer: ViewContainer; viewContainerLocation: ViewContainerLocation }>; /** * An event that is triggered when a view container is deregistered. */ - readonly onDidDeregister: Event<{ viewContainer: ViewContainer, viewContainerLocation: ViewContainerLocation }>; + readonly onDidDeregister: Event<{ viewContainer: ViewContainer; viewContainerLocation: ViewContainerLocation }>; /** * All registered view containers @@ -148,7 +148,7 @@ export interface IViewContainersRegistry { * * @returns the registered ViewContainer. */ - registerViewContainer(viewContainerDescriptor: IViewContainerDescriptor, location: ViewContainerLocation, options?: { isDefault?: boolean, donotRegisterOpenCommand?: boolean }): ViewContainer; + registerViewContainer(viewContainerDescriptor: IViewContainerDescriptor, location: ViewContainerLocation, options?: { isDefault?: boolean; donotRegisterOpenCommand?: boolean }): ViewContainer; /** * Deregisters the given view container @@ -192,11 +192,11 @@ interface RelaxedViewContainer extends ViewContainer { class ViewContainersRegistryImpl extends Disposable implements IViewContainersRegistry { - private readonly _onDidRegister = this._register(new Emitter<{ viewContainer: ViewContainer, viewContainerLocation: ViewContainerLocation }>()); - readonly onDidRegister: Event<{ viewContainer: ViewContainer, viewContainerLocation: ViewContainerLocation }> = this._onDidRegister.event; + private readonly _onDidRegister = this._register(new Emitter<{ viewContainer: ViewContainer; viewContainerLocation: ViewContainerLocation }>()); + readonly onDidRegister: Event<{ viewContainer: ViewContainer; viewContainerLocation: ViewContainerLocation }> = this._onDidRegister.event; - private readonly _onDidDeregister = this._register(new Emitter<{ viewContainer: ViewContainer, viewContainerLocation: ViewContainerLocation }>()); - readonly onDidDeregister: Event<{ viewContainer: ViewContainer, viewContainerLocation: ViewContainerLocation }> = this._onDidDeregister.event; + private readonly _onDidDeregister = this._register(new Emitter<{ viewContainer: ViewContainer; viewContainerLocation: ViewContainerLocation }>()); + readonly onDidDeregister: Event<{ viewContainer: ViewContainer; viewContainerLocation: ViewContainerLocation }> = this._onDidDeregister.event; private readonly viewContainers: Map = new Map(); private readonly defaultViewContainers: ViewContainer[] = []; @@ -205,7 +205,7 @@ class ViewContainersRegistryImpl extends Disposable implements IViewContainersRe return flatten([...this.viewContainers.values()]); } - registerViewContainer(viewContainerDescriptor: IViewContainerDescriptor, viewContainerLocation: ViewContainerLocation, options?: { isDefault?: boolean, donotRegisterOpenCommand?: boolean }): ViewContainer { + registerViewContainer(viewContainerDescriptor: IViewContainerDescriptor, viewContainerLocation: ViewContainerLocation, options?: { isDefault?: boolean; donotRegisterOpenCommand?: boolean }): ViewContainer { const existing = this.get(viewContainerDescriptor.id); if (existing) { return existing; @@ -287,14 +287,14 @@ export interface IViewDescriptor { readonly workspace?: boolean; - readonly focusCommand?: { id: string, keybindings?: IKeybindings }; + readonly focusCommand?: { id: string; keybindings?: IKeybindings }; // For contributed remote explorer views readonly group?: string; readonly remoteAuthority?: string | string[]; - readonly openCommandActionDescriptor?: OpenCommandActionDescriptor + readonly openCommandActionDescriptor?: OpenCommandActionDescriptor; } export interface ICustomTreeViewDescriptor extends ITreeViewDescriptor { @@ -320,7 +320,7 @@ export interface IAddedViewDescriptorRef extends IViewDescriptorRef { } export interface IAddedViewDescriptorState { - viewDescriptor: IViewDescriptor, + viewDescriptor: IViewDescriptor; collapsed?: boolean; visible?: boolean; } @@ -332,18 +332,18 @@ export interface IViewContainerModel { readonly title: string; readonly icon: ThemeIcon | URI | undefined; readonly keybindingId: string | undefined; - readonly onDidChangeContainerInfo: Event<{ title?: boolean, icon?: boolean, keybindingId?: boolean }>; + readonly onDidChangeContainerInfo: Event<{ title?: boolean; icon?: boolean; keybindingId?: boolean }>; readonly allViewDescriptors: ReadonlyArray; - readonly onDidChangeAllViewDescriptors: Event<{ added: ReadonlyArray, removed: ReadonlyArray }>; + readonly onDidChangeAllViewDescriptors: Event<{ added: ReadonlyArray; removed: ReadonlyArray }>; readonly activeViewDescriptors: ReadonlyArray; - readonly onDidChangeActiveViewDescriptors: Event<{ added: ReadonlyArray, removed: ReadonlyArray }>; + readonly onDidChangeActiveViewDescriptors: Event<{ added: ReadonlyArray; removed: ReadonlyArray }>; readonly visibleViewDescriptors: ReadonlyArray; readonly onDidAddVisibleViewDescriptors: Event; - readonly onDidRemoveVisibleViewDescriptors: Event - readonly onDidMoveVisibleViewDescriptors: Event<{ from: IViewDescriptorRef; to: IViewDescriptorRef; }> + readonly onDidRemoveVisibleViewDescriptors: Event; + readonly onDidMoveVisibleViewDescriptors: Event<{ from: IViewDescriptorRef; to: IViewDescriptorRef }>; isVisible(id: string): boolean; setVisible(id: string, visible: boolean, size?: number): void; @@ -352,7 +352,7 @@ export interface IViewContainerModel { setCollapsed(id: string, collapsed: boolean): void; getSize(id: string): number | undefined; - setSize(id: string, size: number): void + setSize(id: string, size: number): void; move(from: string, to: string): void; } @@ -374,15 +374,15 @@ export interface IViewContentDescriptor { export interface IViewsRegistry { - readonly onViewsRegistered: Event<{ views: IViewDescriptor[], viewContainer: ViewContainer }[]>; + readonly onViewsRegistered: Event<{ views: IViewDescriptor[]; viewContainer: ViewContainer }[]>; - readonly onViewsDeregistered: Event<{ views: IViewDescriptor[], viewContainer: ViewContainer }>; + readonly onViewsDeregistered: Event<{ views: IViewDescriptor[]; viewContainer: ViewContainer }>; - readonly onDidChangeContainer: Event<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }>; + readonly onDidChangeContainer: Event<{ views: IViewDescriptor[]; from: ViewContainer; to: ViewContainer }>; registerViews(views: IViewDescriptor[], viewContainer: ViewContainer): void; - registerViews2(views: { views: IViewDescriptor[], viewContainer: ViewContainer }[]): void; + registerViews2(views: { views: IViewDescriptor[]; viewContainer: ViewContainer }[]): void; deregisterViews(views: IViewDescriptor[], viewContainer: ViewContainer): void; @@ -411,14 +411,14 @@ function compareViewContentDescriptors(a: IViewContentDescriptor, b: IViewConten class ViewsRegistry extends Disposable implements IViewsRegistry { - private readonly _onViewsRegistered = this._register(new Emitter<{ views: IViewDescriptor[], viewContainer: ViewContainer }[]>()); + private readonly _onViewsRegistered = this._register(new Emitter<{ views: IViewDescriptor[]; viewContainer: ViewContainer }[]>()); readonly onViewsRegistered = this._onViewsRegistered.event; - private readonly _onViewsDeregistered: Emitter<{ views: IViewDescriptor[], viewContainer: ViewContainer }> = this._register(new Emitter<{ views: IViewDescriptor[], viewContainer: ViewContainer }>()); - readonly onViewsDeregistered: Event<{ views: IViewDescriptor[], viewContainer: ViewContainer }> = this._onViewsDeregistered.event; + private readonly _onViewsDeregistered: Emitter<{ views: IViewDescriptor[]; viewContainer: ViewContainer }> = this._register(new Emitter<{ views: IViewDescriptor[]; viewContainer: ViewContainer }>()); + readonly onViewsDeregistered: Event<{ views: IViewDescriptor[]; viewContainer: ViewContainer }> = this._onViewsDeregistered.event; - private readonly _onDidChangeContainer: Emitter<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }> = this._register(new Emitter<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }>()); - readonly onDidChangeContainer: Event<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }> = this._onDidChangeContainer.event; + private readonly _onDidChangeContainer: Emitter<{ views: IViewDescriptor[]; from: ViewContainer; to: ViewContainer }> = this._register(new Emitter<{ views: IViewDescriptor[]; from: ViewContainer; to: ViewContainer }>()); + readonly onDidChangeContainer: Event<{ views: IViewDescriptor[]; from: ViewContainer; to: ViewContainer }> = this._onDidChangeContainer.event; private readonly _onDidChangeViewWelcomeContent: Emitter = this._register(new Emitter()); readonly onDidChangeViewWelcomeContent: Event = this._onDidChangeViewWelcomeContent.event; @@ -431,7 +431,7 @@ class ViewsRegistry extends Disposable implements IViewsRegistry { this.registerViews2([{ views, viewContainer }]); } - registerViews2(views: { views: IViewDescriptor[], viewContainer: ViewContainer }[]): void { + registerViews2(views: { views: IViewDescriptor[]; viewContainer: ViewContainer }[]): void { views.forEach(({ views, viewContainer }) => this.addViews(views, viewContainer)); this._onViewsRegistered.fire(views); } @@ -575,7 +575,7 @@ export interface IViewsService { readonly _serviceBrand: undefined; // View Container APIs - readonly onDidChangeViewContainerVisibility: Event<{ id: string, visible: boolean, location: ViewContainerLocation }>; + readonly onDidChangeViewContainerVisibility: Event<{ id: string; visible: boolean; location: ViewContainerLocation }>; isViewContainerVisible(id: string): boolean; openViewContainer(id: string, focus?: boolean): Promise; closeViewContainer(id: string): void; @@ -583,7 +583,7 @@ export interface IViewsService { getActiveViewPaneContainerWithId(viewContainerId: string): IViewPaneContainer | null; // View APIs - readonly onDidChangeViewVisibility: Event<{ id: string, visible: boolean }>; + readonly onDidChangeViewVisibility: Event<{ id: string; visible: boolean }>; isViewVisible(id: string): boolean; openView(id: string, focus?: boolean): Promise; closeView(id: string): void; @@ -605,7 +605,7 @@ export interface IViewDescriptorService { // ViewContainers readonly viewContainers: ReadonlyArray; - readonly onDidChangeViewContainers: Event<{ added: ReadonlyArray<{ container: ViewContainer, location: ViewContainerLocation }>, removed: ReadonlyArray<{ container: ViewContainer, location: ViewContainerLocation }> }>; + readonly onDidChangeViewContainers: Event<{ added: ReadonlyArray<{ container: ViewContainer; location: ViewContainerLocation }>; removed: ReadonlyArray<{ container: ViewContainer; location: ViewContainerLocation }> }>; getDefaultViewContainer(location: ViewContainerLocation): ViewContainer | undefined; getViewContainerById(id: string): ViewContainer | null; @@ -615,7 +615,7 @@ export interface IViewDescriptorService { getViewContainersByLocation(location: ViewContainerLocation): ViewContainer[]; getViewContainerModel(viewContainer: ViewContainer): IViewContainerModel; - readonly onDidChangeContainerLocation: Event<{ viewContainer: ViewContainer, from: ViewContainerLocation, to: ViewContainerLocation }>; + readonly onDidChangeContainerLocation: Event<{ viewContainer: ViewContainer; from: ViewContainerLocation; to: ViewContainerLocation }>; moveViewContainerToLocation(viewContainer: ViewContainer, location: ViewContainerLocation, requestedIndex?: number): void; // Views @@ -624,10 +624,10 @@ export interface IViewDescriptorService { getDefaultContainerById(id: string): ViewContainer | null; getViewLocationById(id: string): ViewContainerLocation | null; - readonly onDidChangeContainer: Event<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }>; + readonly onDidChangeContainer: Event<{ views: IViewDescriptor[]; from: ViewContainer; to: ViewContainer }>; moveViewsToContainer(views: IViewDescriptor[], viewContainer: ViewContainer, visibilityState?: ViewVisibilityState): void; - readonly onDidChangeLocation: Event<{ views: IViewDescriptor[], from: ViewContainerLocation, to: ViewContainerLocation }>; + readonly onDidChangeLocation: Event<{ views: IViewDescriptor[]; from: ViewContainerLocation; to: ViewContainerLocation }>; moveViewToLocation(view: IViewDescriptor, location: ViewContainerLocation): void; reset(): void; @@ -713,8 +713,8 @@ export interface ITreeViewDescriptor extends IViewDescriptor { } export type TreeViewItemHandleArg = { - $treeViewId: string, - $treeItemHandle: string + $treeViewId: string; + $treeItemHandle: string; }; export enum TreeItemCollapsibleState { @@ -838,7 +838,7 @@ export interface ITreeViewDragAndDropController { } export interface IEditableData { - validationMessage: (value: string) => { content: string, severity: Severity } | null; + validationMessage: (value: string) => { content: string; severity: Severity } | null; placeholder?: string | null; startingValue?: string | null; onFinish: (value: string, success: boolean) => Promise; diff --git a/src/vs/workbench/common/webview.ts b/src/vs/workbench/common/webview.ts index b18082e48812b..0b58f3a5d4ed3 100644 --- a/src/vs/workbench/common/webview.ts +++ b/src/vs/workbench/common/webview.ts @@ -10,7 +10,7 @@ import { URI } from 'vs/base/common/uri'; export interface WebviewInitData { readonly remote: { readonly isRemote: boolean; - readonly authority: string | undefined + readonly authority: string | undefined; }; } @@ -41,7 +41,7 @@ export const webviewGenericCspSource = `https://*.${webviewResourceBaseHost}`; */ export function asWebviewUri( resource: URI, - remoteInfo?: { authority: string | undefined, isRemote: boolean } + remoteInfo?: { authority: string | undefined; isRemote: boolean } ): URI { if (resource.scheme === Schemas.http || resource.scheme === Schemas.https) { return resource; diff --git a/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.ts b/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.ts index 2f80a8a5cecd7..737c8d2a00dbc 100644 --- a/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.ts +++ b/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.ts @@ -20,7 +20,7 @@ import { IModelService } from 'vs/editor/common/services/model'; import { ResourceTextEdit } from 'vs/editor/browser/services/bulkEditService'; import { CancellationToken } from 'vs/base/common/cancellation'; -type ValidationResult = { canApply: true } | { canApply: false, reason: URI }; +type ValidationResult = { canApply: true } | { canApply: false; reason: URI }; class ModelEditTask implements IDisposable { diff --git a/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.ts b/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.ts index f5030f491e469..c796f5e0ce4e0 100644 --- a/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.ts +++ b/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree.ts @@ -359,7 +359,7 @@ export class BulkEditAccessibilityProvider implements IListAccessibilityProvider export class BulkEditIdentityProvider implements IIdentityProvider { - getId(element: BulkEditElement): { toString(): string; } { + getId(element: BulkEditElement): { toString(): string } { if (element instanceof FileElement) { return element.edit.uri + (element.parent instanceof CategoryElement ? JSON.stringify(element.parent.category.metadata) : ''); } else if (element instanceof TextEditElement) { diff --git a/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.ts b/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.ts index f17983a8256fb..bce1b7846ddc4 100644 --- a/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.ts +++ b/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.ts @@ -86,7 +86,7 @@ export class IdentityProvider implements IIdentityProvider { public getDirection: () => CallHierarchyDirection ) { } - getId(element: Call): { toString(): string; } { + getId(element: Call): { toString(): string } { let res = this.getDirection() + JSON.stringify(element.item.uri) + JSON.stringify(element.item.range); if (element.parent) { res += this.getId(element.parent); diff --git a/src/vs/workbench/contrib/callHierarchy/common/callHierarchy.ts b/src/vs/workbench/contrib/callHierarchy/common/callHierarchy.ts index 9e89788a17ce9..181d4cf333526 100644 --- a/src/vs/workbench/contrib/callHierarchy/common/callHierarchy.ts +++ b/src/vs/workbench/contrib/callHierarchy/common/callHierarchy.ts @@ -32,7 +32,7 @@ export interface CallHierarchyItem { uri: URI; range: IRange; selectionRange: IRange; - tags?: SymbolTag[] + tags?: SymbolTag[]; } export interface IncomingCall { diff --git a/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.ts b/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.ts index 77c4a6b781e23..4dd4f7e3bb3e3 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.ts @@ -140,8 +140,8 @@ interface ISemanticTokenInfo { type: string; modifiers: string[]; range: Range; - metadata?: IDecodedMetadata, - definitions: TokenStyleDefinitions + metadata?: IDecodedMetadata; + definitions: TokenStyleDefinitions; } interface IDecodedMetadata { @@ -178,7 +178,7 @@ function renderTokenText(tokenText: string): string { return result; } -type SemanticTokensResult = { tokens: SemanticTokens, legend: SemanticTokensLegend }; +type SemanticTokensResult = { tokens: SemanticTokens; legend: SemanticTokensLegend }; class InspectEditorTokensWidget extends Disposable implements IContentWidget { diff --git a/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.ts b/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.ts index f445897c334f4..b87cfe3abf8f6 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.ts @@ -29,7 +29,7 @@ export type DocumentSymbolItem = OutlineGroup | OutlineElement; export class DocumentSymbolNavigationLabelProvider implements IKeyboardNavigationLabelProvider { - getKeyboardNavigationLabel(element: DocumentSymbolItem): { toString(): string; } { + getKeyboardNavigationLabel(element: DocumentSymbolItem): { toString(): string } { if (element instanceof OutlineGroup) { return element.label; } else { @@ -55,7 +55,7 @@ export class DocumentSymbolAccessibilityProvider implements IListAccessibilityPr } export class DocumentSymbolIdentityProvider implements IIdentityProvider { - getId(element: DocumentSymbolItem): { toString(): string; } { + getId(element: DocumentSymbolItem): { toString(): string } { return element.id; } } diff --git a/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.ts b/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.ts index dd65b5710dab2..cec3c9c01f8a2 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.ts @@ -44,7 +44,7 @@ export class GotoLineQuickAccessProvider extends AbstractGotoLineQuickAccessProv return this.editorService.activeTextEditorControl; } - protected override gotoLocation(context: IQuickAccessTextEditorContext, options: { range: IRange, keyMods: IKeyMods, forceSideBySide?: boolean, preserveFocus?: boolean }): void { + protected override gotoLocation(context: IQuickAccessTextEditorContext, options: { range: IRange; keyMods: IKeyMods; forceSideBySide?: boolean; preserveFocus?: boolean }): void { // Check for sideBySide use if ((options.keyMods.alt || (this.configuration.openEditorPinned && options.keyMods.ctrlCmd) || options.forceSideBySide) && this.editorService.activeEditor) { diff --git a/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts b/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts index f24163133c696..703b333927a58 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts @@ -74,7 +74,7 @@ export class GotoSymbolQuickAccessProvider extends AbstractGotoSymbolQuickAccess return this.editorService.activeTextEditorControl; } - protected override gotoLocation(context: IQuickAccessTextEditorContext, options: { range: IRange, keyMods: IKeyMods, forceSideBySide?: boolean, preserveFocus?: boolean }): void { + protected override gotoLocation(context: IQuickAccessTextEditorContext, options: { range: IRange; keyMods: IKeyMods; forceSideBySide?: boolean; preserveFocus?: boolean }): void { // Check for sideBySide use if ((options.keyMods.alt || (this.configuration.openEditorPinned && options.keyMods.ctrlCmd) || options.forceSideBySide) && this.editorService.activeEditor) { diff --git a/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.ts b/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.ts index 7eed1cbb6b707..b2aeea97c6935 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.ts @@ -42,7 +42,7 @@ export class TrimWhitespaceParticipant implements ITextFileSaveParticipant { // Nothing } - async participate(model: ITextFileEditorModel, env: { reason: SaveReason; }): Promise { + async participate(model: ITextFileEditorModel, env: { reason: SaveReason }): Promise { if (!model.textEditorModel) { return; } @@ -108,7 +108,7 @@ export class FinalNewLineParticipant implements ITextFileSaveParticipant { // Nothing } - async participate(model: ITextFileEditorModel, _env: { reason: SaveReason; }): Promise { + async participate(model: ITextFileEditorModel, _env: { reason: SaveReason }): Promise { if (!model.textEditorModel) { return; } @@ -146,7 +146,7 @@ export class TrimFinalNewLinesParticipant implements ITextFileSaveParticipant { // Nothing } - async participate(model: ITextFileEditorModel, env: { reason: SaveReason; }): Promise { + async participate(model: ITextFileEditorModel, env: { reason: SaveReason }): Promise { if (!model.textEditorModel) { return; } @@ -220,7 +220,7 @@ class FormatOnSaveParticipant implements ITextFileSaveParticipant { // Nothing } - async participate(model: ITextFileEditorModel, env: { reason: SaveReason; }, progress: IProgress, token: CancellationToken): Promise { + async participate(model: ITextFileEditorModel, env: { reason: SaveReason }, progress: IProgress, token: CancellationToken): Promise { if (!model.textEditorModel) { return; } @@ -231,7 +231,7 @@ class FormatOnSaveParticipant implements ITextFileSaveParticipant { const textEditorModel = model.textEditorModel; const overrides = { overrideIdentifier: textEditorModel.getLanguageId(), resource: textEditorModel.uri }; - const nestedProgress = new Progress<{ displayName?: string, extensionId?: ExtensionIdentifier }>(provider => { + const nestedProgress = new Progress<{ displayName?: string; extensionId?: ExtensionIdentifier }>(provider => { progress.report({ message: localize( { key: 'formatting2', comment: ['[configure]({1}) is a link. Only translate `configure`. Do not change brackets and parentheses or {1}'] }, @@ -275,7 +275,7 @@ class CodeActionOnSaveParticipant implements ITextFileSaveParticipant { @ILanguageFeaturesService private readonly languageFeaturesService: ILanguageFeaturesService, ) { } - async participate(model: ITextFileEditorModel, env: { reason: SaveReason; }, progress: IProgress, token: CancellationToken): Promise { + async participate(model: ITextFileEditorModel, env: { reason: SaveReason }, progress: IProgress, token: CancellationToken): Promise { if (!model.textEditorModel) { return; } diff --git a/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts b/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts index 37dcd9f9c2dc8..0bf30f3aa60fb 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts @@ -299,13 +299,13 @@ export class SuggestEnabledInput extends Widget implements IThemable { } export interface ISuggestEnabledHistoryOptions { - id: string, - ariaLabel: string, - parent: HTMLElement, - suggestionProvider: SuggestResultsProvider, - resourceHandle: string, - suggestOptions: SuggestEnabledInputOptions, - history: string[], + id: string; + ariaLabel: string; + parent: HTMLElement; + suggestionProvider: SuggestResultsProvider; + resourceHandle: string; + suggestOptions: SuggestEnabledInputOptions; + history: string[]; } export class SuggestEnabledInputWithHistory extends SuggestEnabledInput implements IHistoryNavigationWidget { diff --git a/src/vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard.ts b/src/vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard.ts index f64cd82881f1b..7e1393bfc9e06 100644 --- a/src/vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard.ts +++ b/src/vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard.ts @@ -97,7 +97,7 @@ class SelectionClipboardPastePreventer implements IWorkbenchContribution { document.addEventListener('mouseup', (e) => { if (e.button === 1) { // middle button - const config = configurationService.getValue<{ selectionClipboard: boolean; }>('editor'); + const config = configurationService.getValue<{ selectionClipboard: boolean }>('editor'); if (!config.selectionClipboard) { // selection clipboard is disabled // try to stop the upcoming paste diff --git a/src/vs/workbench/contrib/comments/browser/commentNode.ts b/src/vs/workbench/contrib/comments/browser/commentNode.ts index d58bfc8405b75..feca79752d1f8 100644 --- a/src/vs/workbench/contrib/comments/browser/commentNode.ts +++ b/src/vs/workbench/contrib/comments/browser/commentNode.ts @@ -179,7 +179,7 @@ export class CommentNode extends Disposable { this.createActionsToolbar(); } - private getToolbarActions(menu: IMenu): { primary: IAction[], secondary: IAction[] } { + private getToolbarActions(menu: IMenu): { primary: IAction[]; secondary: IAction[] } { const contributedActions = menu.getActions({ shouldForwardArgs: true }); const primary: IAction[] = []; const secondary: IAction[] = []; @@ -576,7 +576,7 @@ export class CommentNode extends Disposable { } } -function fillInActions(groups: [string, Array][], target: IAction[] | { primary: IAction[]; secondary: IAction[]; }, useAlternativeActions: boolean, isPrimaryGroup: (group: string) => boolean = group => group === 'navigation'): void { +function fillInActions(groups: [string, Array][], target: IAction[] | { primary: IAction[]; secondary: IAction[] }, useAlternativeActions: boolean, isPrimaryGroup: (group: string) => boolean = group => group === 'navigation'): void { for (let tuple of groups) { let [group, actions] = tuple; if (useAlternativeActions) { diff --git a/src/vs/workbench/contrib/comments/browser/commentService.ts b/src/vs/workbench/contrib/comments/browser/commentService.ts index 3fdbfab97dd5d..fb20f3f18dec0 100644 --- a/src/vs/workbench/contrib/comments/browser/commentService.ts +++ b/src/vs/workbench/contrib/comments/browser/commentService.ts @@ -37,8 +37,8 @@ export interface ICommentService { readonly onDidSetAllCommentThreads: Event; readonly onDidUpdateCommentThreads: Event; readonly onDidChangeActiveCommentThread: Event; - readonly onDidUpdateCommentingRanges: Event<{ owner: string; }> - readonly onDidChangeActiveCommentingRange: Event<{ range: Range, commentingRangesInfo: CommentingRanges }>; + readonly onDidUpdateCommentingRanges: Event<{ owner: string }>; + readonly onDidChangeActiveCommentingRange: Event<{ range: Range; commentingRangesInfo: CommentingRanges }>; readonly onDidSetDataProvider: Event; readonly onDidDeleteDataProvider: Event; setDocumentComments(resource: URI, commentInfos: ICommentInfo[]): void; @@ -78,20 +78,20 @@ export class CommentService extends Disposable implements ICommentService { private readonly _onDidUpdateCommentThreads: Emitter = this._register(new Emitter()); readonly onDidUpdateCommentThreads: Event = this._onDidUpdateCommentThreads.event; - private readonly _onDidUpdateCommentingRanges: Emitter<{ owner: string; }> = this._register(new Emitter<{ owner: string; }>()); - readonly onDidUpdateCommentingRanges: Event<{ owner: string; }> = this._onDidUpdateCommentingRanges.event; + private readonly _onDidUpdateCommentingRanges: Emitter<{ owner: string }> = this._register(new Emitter<{ owner: string }>()); + readonly onDidUpdateCommentingRanges: Event<{ owner: string }> = this._onDidUpdateCommentingRanges.event; private readonly _onDidChangeActiveCommentThread = this._register(new Emitter()); readonly onDidChangeActiveCommentThread = this._onDidChangeActiveCommentThread.event; private readonly _onDidChangeActiveCommentingRange: Emitter<{ - range: Range, commentingRangesInfo: - CommentingRanges + range: Range; commentingRangesInfo: + CommentingRanges; }> = this._register(new Emitter<{ - range: Range, commentingRangesInfo: - CommentingRanges + range: Range; commentingRangesInfo: + CommentingRanges; }>()); - readonly onDidChangeActiveCommentingRange: Event<{ range: Range, commentingRangesInfo: CommentingRanges }> = this._onDidChangeActiveCommentingRange.event; + readonly onDidChangeActiveCommentingRange: Event<{ range: Range; commentingRangesInfo: CommentingRanges }> = this._onDidChangeActiveCommentingRange.event; private _commentControls = new Map(); private _commentMenus = new Map(); diff --git a/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts b/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts index aa924524dc818..ce2bfc0ac0311 100644 --- a/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts +++ b/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts @@ -77,7 +77,7 @@ class CommentingRangeDecoration { this._decorationId = this._editor.deltaDecorations([], commentingRangeDecorations)[0]; } - public getCommentAction(): { ownerId: string, extensionId: string | undefined, label: string | undefined, commentingRangesInfo: modes.CommentingRanges } { + public getCommentAction(): { ownerId: string; extensionId: string | undefined; label: string | undefined; commentingRangesInfo: modes.CommentingRanges } { return { extensionId: this._extensionId, label: this._label, @@ -496,7 +496,7 @@ export class CommentController implements IEditorContribution { return Promise.resolve(); } - private getCommentProvidersQuickPicks(commentInfos: { ownerId: string, extensionId: string | undefined, label: string | undefined, commentingRangesInfo: modes.CommentingRanges | undefined }[]) { + private getCommentProvidersQuickPicks(commentInfos: { ownerId: string; extensionId: string | undefined; label: string | undefined; commentingRangesInfo: modes.CommentingRanges | undefined }[]) { const picks: QuickPickInput[] = commentInfos.map((commentInfo) => { const { ownerId, extensionId, label } = commentInfo; @@ -509,7 +509,7 @@ export class CommentController implements IEditorContribution { return picks; } - private getContextMenuActions(commentInfos: { ownerId: string, extensionId: string | undefined, label: string | undefined, commentingRangesInfo: modes.CommentingRanges }[], lineNumber: number): IAction[] { + private getContextMenuActions(commentInfos: { ownerId: string; extensionId: string | undefined; label: string | undefined; commentingRangesInfo: modes.CommentingRanges }[], lineNumber: number): IAction[] { const actions: IAction[] = []; commentInfos.forEach(commentInfo => { diff --git a/src/vs/workbench/contrib/customEditor/browser/customEditorInput.ts b/src/vs/workbench/contrib/customEditor/browser/customEditorInput.ts index 1feb70a01bdcb..f6fe05027faf1 100644 --- a/src/vs/workbench/contrib/customEditor/browser/customEditorInput.ts +++ b/src/vs/workbench/contrib/customEditor/browser/customEditorInput.ts @@ -32,7 +32,7 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput { resource: URI, viewType: string, group: GroupIdentifier | undefined, - options?: { readonly customClasses?: string, readonly oldResource?: URI }, + options?: { readonly customClasses?: string; readonly oldResource?: URI }, ): EditorInput { return instantiationService.invokeFunction(accessor => { // If it's an untitled file we must populate the untitledDocumentData @@ -67,7 +67,7 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput { viewType: string, id: string, webview: IOverlayWebview, - options: { startsDirty?: boolean, backupId?: string, untitledDocumentData?: VSBuffer, readonly oldResource?: URI }, + options: { startsDirty?: boolean; backupId?: string; untitledDocumentData?: VSBuffer; readonly oldResource?: URI }, @IWebviewWorkbenchService webviewWorkbenchService: IWebviewWorkbenchService, @IInstantiationService private readonly instantiationService: IInstantiationService, @ILabelService private readonly labelService: ILabelService, diff --git a/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.ts b/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.ts index 126cc09d23cdf..3304e1334a0d2 100644 --- a/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.ts +++ b/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.ts @@ -107,7 +107,7 @@ export class CustomEditorInputSerializer extends WebviewEditorInputSerializer { } } -function reviveWebview(webviewService: IWebviewService, data: { id: string, state: any, webviewOptions: WebviewOptions, contentOptions: WebviewContentOptions, extension?: WebviewExtensionDescription, }) { +function reviveWebview(webviewService: IWebviewService, data: { id: string; state: any; webviewOptions: WebviewOptions; contentOptions: WebviewContentOptions; extension?: WebviewExtensionDescription }) { const webview = webviewService.createWebviewOverlay(data.id, { purpose: WebviewContentPurpose.CustomEditor, enableFindWidget: data.webviewOptions.enableFindWidget, diff --git a/src/vs/workbench/contrib/customEditor/common/customEditor.ts b/src/vs/workbench/contrib/customEditor/common/customEditor.ts index 18cbdd958ca68..aab705ab7612f 100644 --- a/src/vs/workbench/contrib/customEditor/common/customEditor.ts +++ b/src/vs/workbench/contrib/customEditor/common/customEditor.ts @@ -37,11 +37,11 @@ export interface ICustomEditorService { getUserConfiguredCustomEditors(resource: URI): CustomEditorInfoCollection; registerCustomEditorCapabilities(viewType: string, options: CustomEditorCapabilities): IDisposable; - getCustomEditorCapabilities(viewType: string): CustomEditorCapabilities | undefined + getCustomEditorCapabilities(viewType: string): CustomEditorCapabilities | undefined; } export interface ICustomEditorModelManager { - getAllModels(resource: URI): Promise + getAllModels(resource: URI): Promise; get(resource: URI, viewType: string): Promise; diff --git a/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.ts b/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.ts index 94628c1b486b7..b93540ddfaf9f 100644 --- a/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.ts +++ b/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.ts @@ -11,9 +11,9 @@ import { ICustomEditorModel, ICustomEditorModelManager } from 'vs/workbench/cont export class CustomEditorModelManager implements ICustomEditorModelManager { private readonly _references = new Map, - counter: number + readonly viewType: string; + readonly model: Promise; + counter: number; }>(); public async getAllModels(resource: URI): Promise { diff --git a/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts b/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts index 5042a44eede24..807a53b14b2ff 100644 --- a/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts +++ b/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts @@ -52,8 +52,8 @@ const breakpointHelperDecoration: IModelDecorationOptions = { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }; -export function createBreakpointDecorations(model: ITextModel, breakpoints: ReadonlyArray, state: State, breakpointsActivated: boolean, showBreakpointsInOverviewRuler: boolean): { range: Range; options: IModelDecorationOptions; }[] { - const result: { range: Range; options: IModelDecorationOptions; }[] = []; +export function createBreakpointDecorations(model: ITextModel, breakpoints: ReadonlyArray, state: State, breakpointsActivated: boolean, showBreakpointsInOverviewRuler: boolean): { range: Range; options: IModelDecorationOptions }[] { + const result: { range: Range; options: IModelDecorationOptions }[] = []; breakpoints.forEach((breakpoint) => { if (breakpoint.lineNumber > model.getLineCount()) { return; @@ -165,7 +165,7 @@ export class BreakpointEditorContribution implements IBreakpointEditorContributi private ignoreDecorationsChangedEvent = false; private ignoreBreakpointsChangeEvent = false; private breakpointDecorations: IBreakpointDecoration[] = []; - private candidateDecorations: { decorationId: string, inlineWidget: InlineBreakpointWidget }[] = []; + private candidateDecorations: { decorationId: string; inlineWidget: InlineBreakpointWidget }[] = []; private setDecorationsScheduler: RunOnceScheduler; constructor( diff --git a/src/vs/workbench/contrib/debug/browser/breakpointsView.ts b/src/vs/workbench/contrib/debug/browser/breakpointsView.ts index d911c850057f5..13f110597de2e 100644 --- a/src/vs/workbench/contrib/debug/browser/breakpointsView.ts +++ b/src/vs/workbench/contrib/debug/browser/breakpointsView.ts @@ -1010,7 +1010,7 @@ export function openBreakpointSource(breakpoint: IBreakpoint, sideBySide: boolea }, sideBySide ? SIDE_GROUP : ACTIVE_GROUP); } -export function getBreakpointMessageAndIcon(state: State, breakpointsActivated: boolean, breakpoint: BreakpointItem, labelService?: ILabelService): { message?: string, icon: ThemeIcon } { +export function getBreakpointMessageAndIcon(state: State, breakpointsActivated: boolean, breakpoint: BreakpointItem, labelService?: ILabelService): { message?: string; icon: ThemeIcon } { const debugActive = state === State.Running || state === State.Stopped; const breakpointIcon = breakpoint instanceof DataBreakpoint ? icons.dataBreakpoint : breakpoint instanceof FunctionBreakpoint ? icons.functionBreakpoint : breakpoint.logMessage ? icons.logBreakpoint : icons.breakpoint; diff --git a/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts b/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts index 167e3114c04f8..0305d93dbcba1 100644 --- a/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts +++ b/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts @@ -32,10 +32,10 @@ export class StartDebugActionViewItem extends BaseActionViewItem { private container!: HTMLElement; private start!: HTMLElement; private selectBox: SelectBox; - private debugOptions: { label: string, handler: (() => Promise) }[] = []; + private debugOptions: { label: string; handler: (() => Promise) }[] = []; private toDispose: IDisposable[]; private selected = 0; - private providers: { label: string, type: string, pick: () => Promise<{ launch: ILaunch, config: IConfig } | undefined> }[] = []; + private providers: { label: string; type: string; pick: () => Promise<{ launch: ILaunch; config: IConfig } | undefined> }[] = []; constructor( private context: unknown, diff --git a/src/vs/workbench/contrib/debug/browser/debugAdapterManager.ts b/src/vs/workbench/contrib/debug/browser/debugAdapterManager.ts index 3ebbddc0f2315..2a01435a6f5a9 100644 --- a/src/vs/workbench/contrib/debug/browser/debugAdapterManager.ts +++ b/src/vs/workbench/contrib/debug/browser/debugAdapterManager.ts @@ -331,7 +331,7 @@ export class AdapterManager extends Disposable implements IAdapterManager { } candidates.sort((first, second) => first.label.localeCompare(second.label)); - const picks: { label: string, debugger?: Debugger, type?: string }[] = candidates.map(c => ({ label: c.label, debugger: c })); + const picks: { label: string; debugger?: Debugger; type?: string }[] = candidates.map(c => ({ label: c.label, debugger: c })); if (picks.length === 0 && languageLabel) { if (languageLabel.indexOf(' ') >= 0) { @@ -350,7 +350,7 @@ export class AdapterManager extends Disposable implements IAdapterManager { const placeHolder = nls.localize('selectDebug', "Select environment"); picks.push({ label: languageLabel ? nls.localize('installLanguage', "Install an extension for {0}...", languageLabel) : nls.localize('installExt', "Install extension...") }); - return this.quickInputService.pick<{ label: string, debugger?: Debugger }>(picks, { activeItem: picks[0], placeHolder }) + return this.quickInputService.pick<{ label: string; debugger?: Debugger }>(picks, { activeItem: picks[0], placeHolder }) .then(picked => { if (picked && picked.debugger) { return picked.debugger; diff --git a/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts b/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts index 36657e3abdb1b..e3eaf0b143802 100644 --- a/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts +++ b/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts @@ -48,7 +48,7 @@ const DEBUG_SELECTED_ROOT = 'debug.selectedroot'; const DEBUG_SELECTED_TYPE = 'debug.selectedtype'; const DEBUG_RECENT_DYNAMIC_CONFIGURATIONS = 'debug.recentdynamicconfigurations'; -interface IDynamicPickItem { label: string, launch: ILaunch, config: IConfig } +interface IDynamicPickItem { label: string; launch: ILaunch; config: IConfig } export class ConfigurationManager implements IConfigurationManager { private launches!: ILaunch[]; @@ -163,7 +163,7 @@ export class ConfigurationManager implements IConfigurationManager { return results.reduce((first, second) => first.concat(second), []); } - async getDynamicProviders(): Promise<{ label: string, type: string, getProvider: () => Promise, pick: () => Promise<{ launch: ILaunch, config: IConfig } | undefined> }[]> { + async getDynamicProviders(): Promise<{ label: string; type: string; getProvider: () => Promise; pick: () => Promise<{ launch: ILaunch; config: IConfig } | undefined> }[]> { const extensions = await this.extensionService.getExtensions(); const onDebugDynamicConfigurationsName = 'onDebugDynamicConfigurations'; const debugDynamicExtensionsTypes = extensions.reduce((acc, e) => { @@ -262,7 +262,7 @@ export class ConfigurationManager implements IConfigurationManager { } getAllConfigurations(): { launch: ILaunch; name: string; presentation?: IConfigPresentation }[] { - const all: { launch: ILaunch, name: string, presentation?: IConfigPresentation }[] = []; + const all: { launch: ILaunch; name: string; presentation?: IConfigPresentation }[] = []; for (const l of this.launches) { for (const name of l.getConfigurationNames()) { const config = l.getConfiguration(name) || l.getCompound(name); @@ -285,7 +285,7 @@ export class ConfigurationManager implements IConfigurationManager { } } - getRecentDynamicConfigurations(): { name: string, type: string }[] { + getRecentDynamicConfigurations(): { name: string; type: string }[] { return JSON.parse(this.storageService.get(DEBUG_RECENT_DYNAMIC_CONFIGURATIONS, StorageScope.WORKSPACE, '[]')); } @@ -344,7 +344,7 @@ export class ConfigurationManager implements IConfigurationManager { return this.launches.find(l => l.workspace && this.uriIdentityService.extUri.isEqual(l.workspace.uri, workspaceUri)); } - get selectedConfiguration(): { launch: ILaunch | undefined, name: string | undefined, getConfig: () => Promise, type: string | undefined } { + get selectedConfiguration(): { launch: ILaunch | undefined; name: string | undefined; getConfig: () => Promise; type: string | undefined } { return { launch: this.selectedLaunch, name: this.selectedName, @@ -573,7 +573,7 @@ class Launch extends AbstractLaunch implements ILaunch { return this.configurationService.inspect('launch', { resource: this.workspace.uri }).workspaceFolderValue; } - async openConfigFile(preserveFocus: boolean, type?: string, token?: CancellationToken): Promise<{ editor: IEditorPane | null, created: boolean }> { + async openConfigFile(preserveFocus: boolean, type?: string, token?: CancellationToken): Promise<{ editor: IEditorPane | null; created: boolean }> { const resource = this.uri; let created = false; let content = ''; @@ -658,7 +658,7 @@ class WorkspaceLaunch extends AbstractLaunch implements ILaunch { return this.configurationService.inspect('launch').workspaceValue; } - async openConfigFile(preserveFocus: boolean, type?: string, token?: CancellationToken): Promise<{ editor: IEditorPane | null, created: boolean }> { + async openConfigFile(preserveFocus: boolean, type?: string, token?: CancellationToken): Promise<{ editor: IEditorPane | null; created: boolean }> { const launchExistInFile = !!this.getConfig(); if (!launchExistInFile) { // Launch property in workspace config not found: create one by collecting launch configs from debugConfigProviders @@ -713,7 +713,7 @@ class UserLaunch extends AbstractLaunch implements ILaunch { return this.configurationService.inspect('launch').userValue; } - async openConfigFile(preserveFocus: boolean): Promise<{ editor: IEditorPane | null, created: boolean }> { + async openConfigFile(preserveFocus: boolean): Promise<{ editor: IEditorPane | null; created: boolean }> { const editor = await this.preferencesService.openUserSettings({ jsonEditor: true, preserveFocus, revealSetting: { key: 'launch' } }); return ({ editor: withUndefinedAsNull(editor), diff --git a/src/vs/workbench/contrib/debug/browser/debugProgress.ts b/src/vs/workbench/contrib/debug/browser/debugProgress.ts index 67c9753590f1d..4b94190fd0ea0 100644 --- a/src/vs/workbench/contrib/debug/browser/debugProgress.ts +++ b/src/vs/workbench/contrib/debug/browser/debugProgress.ts @@ -49,7 +49,7 @@ export class DebugProgressContribution implements IWorkbenchContribution { delay: 500 }, progressStep => { let total = 0; - const reportProgress = (progress: { message?: string, percentage?: number }) => { + const reportProgress = (progress: { message?: string; percentage?: number }) => { let increment = undefined; if (typeof progress.percentage === 'number') { increment = progress.percentage - total; diff --git a/src/vs/workbench/contrib/debug/browser/debugService.ts b/src/vs/workbench/contrib/debug/browser/debugService.ts index b2e3f0a6d4911..20e627b3d5630 100644 --- a/src/vs/workbench/contrib/debug/browser/debugService.ts +++ b/src/vs/workbench/contrib/debug/browser/debugService.ts @@ -82,7 +82,7 @@ export class DebugService implements IDebugService { private previousState: State | undefined; private sessionCancellationTokens = new Map(); private activity: IDisposable | undefined; - private chosenEnvironments: { [key: string]: string; }; + private chosenEnvironments: { [key: string]: string }; constructor( @IEditorService private readonly editorService: IEditorService, @@ -530,7 +530,7 @@ export class DebugService implements IDebugService { /** * instantiates the new session, initializes the session, registers session listeners and reports telemetry */ - private async doCreateSession(sessionId: string, root: IWorkspaceFolder | undefined, configuration: { resolved: IConfig, unresolved: IConfig | undefined; }, options?: IDebugSessionOptions): Promise { + private async doCreateSession(sessionId: string, root: IWorkspaceFolder | undefined, configuration: { resolved: IConfig; unresolved: IConfig | undefined }, options?: IDebugSessionOptions): Promise { const session = this.instantiationService.createInstance(DebugSession, sessionId, configuration, root, this.model, options); if (options?.startedByUser && this.model.getSessions().some(s => s.getLabel() === session.getLabel())) { @@ -972,7 +972,7 @@ export class DebugService implements IDebugService { this.model.addFunctionBreakpoint(name || '', id); } - async updateFunctionBreakpoint(id: string, update: { name?: string, hitCondition?: string, condition?: string; }): Promise { + async updateFunctionBreakpoint(id: string, update: { name?: string; hitCondition?: string; condition?: string }): Promise { this.model.updateFunctionBreakpoint(id, update); this.debugStorage.storeBreakpoints(this.model); await this.sendFunctionBreakpoints(); @@ -1214,7 +1214,7 @@ export class DebugService implements IDebugService { } } -export function getStackFrameThreadAndSessionToFocus(model: IDebugModel, stackFrame: IStackFrame | undefined, thread?: IThread, session?: IDebugSession, avoidSession?: IDebugSession): { stackFrame: IStackFrame | undefined, thread: IThread | undefined, session: IDebugSession | undefined; } { +export function getStackFrameThreadAndSessionToFocus(model: IDebugModel, stackFrame: IStackFrame | undefined, thread?: IThread, session?: IDebugSession, avoidSession?: IDebugSession): { stackFrame: IStackFrame | undefined; thread: IThread | undefined; session: IDebugSession | undefined } { if (!session) { if (stackFrame || thread) { session = stackFrame ? stackFrame.thread.session : thread!.session; diff --git a/src/vs/workbench/contrib/debug/browser/debugSession.ts b/src/vs/workbench/contrib/debug/browser/debugSession.ts index cc89d00e77483..5448a5f7d6e83 100644 --- a/src/vs/workbench/contrib/debug/browser/debugSession.ts +++ b/src/vs/workbench/contrib/debug/browser/debugSession.ts @@ -74,7 +74,7 @@ export class DebugSession implements IDebugSession { constructor( private id: string, - private _configuration: { resolved: IConfig, unresolved: IConfig | undefined }, + private _configuration: { resolved: IConfig; unresolved: IConfig | undefined }, public root: IWorkspaceFolder | undefined, private model: DebugModel, options: IDebugSessionOptions | undefined, @@ -172,7 +172,7 @@ export class DebugSession implements IDebugSession { return this._options.debugUI?.simple ?? false; } - setConfiguration(configuration: { resolved: IConfig, unresolved: IConfig | undefined }) { + setConfiguration(configuration: { resolved: IConfig; unresolved: IConfig | undefined }) { this._configuration = configuration; } @@ -464,7 +464,7 @@ export class DebugSession implements IDebugSession { } } - async dataBreakpointInfo(name: string, variablesReference?: number): Promise<{ dataId: string | null, description: string, canPersist?: boolean } | undefined> { + async dataBreakpointInfo(name: string, variablesReference?: number): Promise<{ dataId: string | null; description: string; canPersist?: boolean } | undefined> { if (!this.raw) { throw new Error(localize('noDebugAdapter', "No debugger available, can not send '{0}'", 'data breakpoints info')); } @@ -751,7 +751,7 @@ export class DebugSession implements IDebugSession { }, sessionCancelationToken); } - async stepInTargets(frameId: number): Promise<{ id: number, label: string }[] | undefined> { + async stepInTargets(frameId: number): Promise<{ id: number; label: string }[] | undefined> { if (!this.raw) { return Promise.reject(new Error(localize('noDebugAdapter', "No debugger available, can not send '{0}'", 'stepInTargets'))); } @@ -1301,7 +1301,7 @@ export class DebugSession implements IDebugSession { this.repl.appendToRepl(this, data, severity, source); } - logToRepl(sev: severity, args: any[], frame?: { uri: URI, line: number, column: number }) { + logToRepl(sev: severity, args: any[], frame?: { uri: URI; line: number; column: number }) { this.repl.logToRepl(this, sev, args, frame); } } diff --git a/src/vs/workbench/contrib/debug/browser/debugToolBar.ts b/src/vs/workbench/contrib/debug/browser/debugToolBar.ts index 16930d7599cac..f57588fdbe6a7 100644 --- a/src/vs/workbench/contrib/debug/browser/debugToolBar.ts +++ b/src/vs/workbench/contrib/debug/browser/debugToolBar.ts @@ -258,7 +258,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution { // Debug toolbar const debugViewTitleItems: IDisposable[] = []; -const registerDebugToolBarItem = (id: string, title: string, order: number, icon?: { light?: URI, dark?: URI; } | ThemeIcon, when?: ContextKeyExpression, precondition?: ContextKeyExpression, alt?: ICommandAction) => { +const registerDebugToolBarItem = (id: string, title: string, order: number, icon?: { light?: URI; dark?: URI } | ThemeIcon, when?: ContextKeyExpression, precondition?: ContextKeyExpression, alt?: ICommandAction) => { MenuRegistry.appendMenuItem(MenuId.DebugToolBar, { group: 'navigation', when, diff --git a/src/vs/workbench/contrib/debug/browser/debugViewlet.ts b/src/vs/workbench/contrib/debug/browser/debugViewlet.ts index 06a96962d190c..a90416994e19d 100644 --- a/src/vs/workbench/contrib/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/contrib/debug/browser/debugViewlet.ts @@ -120,7 +120,7 @@ export class DebugViewPaneContainer extends ViewPaneContainer { } } - override addPanes(panes: { pane: ViewPane, size: number, index?: number }[]): void { + override addPanes(panes: { pane: ViewPane; size: number; index?: number }[]): void { super.addPanes(panes); for (const { pane: pane } of panes) { @@ -208,7 +208,7 @@ registerAction2(class extends Action2 { launch = launches[0]; } else { const picks = launches.map(l => ({ label: l.name, launch: l })); - const picked = await quickInputService.pick<{ label: string, launch: ILaunch }>(picks, { + const picked = await quickInputService.pick<{ label: string; launch: ILaunch }>(picks, { activeItem: picks[0], placeHolder: nls.localize({ key: 'selectWorkspaceFolder', comment: ['User picks a workspace folder or a workspace configuration file here. Workspace configuration files can contain settings and thus a launch.json configuration can be written into one.'] }, "Select a workspace folder to create a launch.json file in or add it to the workspace config file") }); diff --git a/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.ts b/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.ts index d5383a02bad67..1dc1a555216ff 100644 --- a/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.ts +++ b/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.ts @@ -129,7 +129,7 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient i const lastExtensionDevelopmentWorkspace = this.storageService.get(BrowserExtensionHostDebugService.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY, StorageScope.GLOBAL); if (lastExtensionDevelopmentWorkspace) { try { - const serializedWorkspace: { workspaceUri?: UriComponents, folderUri?: UriComponents } = JSON.parse(lastExtensionDevelopmentWorkspace); + const serializedWorkspace: { workspaceUri?: UriComponents; folderUri?: UriComponents } = JSON.parse(lastExtensionDevelopmentWorkspace); if (serializedWorkspace.workspaceUri) { debugWorkspace = { workspaceUri: URI.revive(serializedWorkspace.workspaceUri) }; } else if (serializedWorkspace.folderUri) { diff --git a/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts b/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts index 5c1d0d8332e28..bd959c9a8507f 100644 --- a/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts +++ b/src/vs/workbench/contrib/debug/browser/rawDebugSession.ts @@ -33,7 +33,7 @@ interface ILaunchVSCodeArgument { interface ILaunchVSCodeArguments { args: ILaunchVSCodeArgument[]; debugRenderer?: boolean; - env?: { [key: string]: string | null; }; + env?: { [key: string]: string | null }; } /** diff --git a/src/vs/workbench/contrib/debug/browser/repl.ts b/src/vs/workbench/contrib/debug/browser/repl.ts index 61d0bdc38bdbd..ef6e935b94b0c 100644 --- a/src/vs/workbench/contrib/debug/browser/repl.ts +++ b/src/vs/workbench/contrib/debug/browser/repl.ts @@ -287,7 +287,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget { await this.selectSession(); } - getFilterStats(): { total: number, filtered: number } { + getFilterStats(): { total: number; filtered: number } { // This could be called before the tree is created when setting this.filterState.filterText value return { total: this.tree?.getNode().children.length ?? 0, diff --git a/src/vs/workbench/contrib/debug/browser/replFilter.ts b/src/vs/workbench/contrib/debug/browser/replFilter.ts index e888619b0ba5b..84b1faf07e3c0 100644 --- a/src/vs/workbench/contrib/debug/browser/replFilter.ts +++ b/src/vs/workbench/contrib/debug/browser/replFilter.ts @@ -28,8 +28,8 @@ import { Variable } from 'vs/workbench/contrib/debug/common/debugModel'; type ParsedQuery = { - type: 'include' | 'exclude', - query: string, + type: 'include' | 'exclude'; + query: string; }; export class ReplFilter implements ITreeFilter { @@ -81,7 +81,7 @@ export class ReplFilter implements ITreeFilter { } export interface IFilterStatsProvider { - getFilterStats(): { total: number, filtered: number }; + getFilterStats(): { total: number; filtered: number }; } export class ReplFilterState { @@ -105,7 +105,7 @@ export class ReplFilterState { return this._filterText; } - get filterStats(): { total: number, filtered: number } { + get filterStats(): { total: number; filtered: number } { return this._stats; } diff --git a/src/vs/workbench/contrib/debug/common/debug.ts b/src/vs/workbench/contrib/debug/common/debug.ts index 18d2484195e2b..2cee07d84b4b1 100644 --- a/src/vs/workbench/contrib/debug/common/debug.ts +++ b/src/vs/workbench/contrib/debug/common/debug.ts @@ -201,7 +201,7 @@ export interface IDebugSessionOptions { export interface IDataBreakpointInfoResponse { dataId: string | null; description: string; - canPersist?: boolean, + canPersist?: boolean; accessTypes?: DebugProtocol.DataBreakpointAccessType[]; } @@ -226,7 +226,7 @@ export interface IValidMemoryRange extends IMemoryRange { type: MemoryRangeType.Valid; offset: number; length: number; - data: VSBuffer + data: VSBuffer; } export interface IUnreadableMemoryRange extends IMemoryRange { @@ -300,7 +300,7 @@ export interface IDebugSession extends ITreeElement { getSourceForUri(modelUri: uri): Source | undefined; getSource(raw?: DebugProtocol.Source): Source; - setConfiguration(configuration: { resolved: IConfig, unresolved: IConfig | undefined }): void; + setConfiguration(configuration: { resolved: IConfig; unresolved: IConfig | undefined }): void; rawUpdate(data: IRawModelUpdate): void; getThread(threadId: number): IThread | undefined; @@ -313,7 +313,7 @@ export interface IDebugSession extends ITreeElement { removeReplExpressions(): void; addReplExpression(stackFrame: IStackFrame | undefined, name: string): Promise; appendToRepl(data: string | IExpression, severity: severity, source?: IReplElementSource): void; - logToRepl(sev: severity, args: any[], frame?: { uri: uri, line: number, column: number }): void; + logToRepl(sev: severity, args: any[], frame?: { uri: uri; line: number; column: number }): void; // session events readonly onDidEndAdapter: Event; @@ -363,7 +363,7 @@ export interface IDebugSession extends ITreeElement { restartFrame(frameId: number, threadId: number): Promise; next(threadId: number, granularity?: DebugProtocol.SteppingGranularity): Promise; stepIn(threadId: number, targetId?: number, granularity?: DebugProtocol.SteppingGranularity): Promise; - stepInTargets(frameId: number): Promise<{ id: number, label: string }[] | undefined>; + stepInTargets(frameId: number): Promise<{ id: number; label: string }[] | undefined>; stepOut(threadId: number, granularity?: DebugProtocol.SteppingGranularity): Promise; stepBack(threadId: number, granularity?: DebugProtocol.SteppingGranularity): Promise; continue(threadId: number): Promise; @@ -508,7 +508,7 @@ export interface IBreakpoint extends IBaseBreakpoint { readonly column?: number; readonly endColumn?: number; readonly adapterData: any; - readonly sessionAgnosticData: { lineNumber: number, column: number | undefined }; + readonly sessionAgnosticData: { lineNumber: number; column: number | undefined }; } export interface IFunctionBreakpoint extends IBaseBreakpoint { @@ -566,7 +566,7 @@ export interface IViewModel extends ITreeElement { isMultiSessionView(): boolean; onDidFocusSession: Event; - onDidFocusStackFrame: Event<{ stackFrame: IStackFrame | undefined, explicit: boolean }>; + onDidFocusStackFrame: Event<{ stackFrame: IStackFrame | undefined; explicit: boolean }>; onDidSelectExpression: Event<{ expression: IExpression; settingWatch: boolean } | undefined>; onWillUpdateViews: Event; } @@ -578,7 +578,7 @@ export interface IEvaluate { export interface IDebugModel extends ITreeElement { getSession(sessionId: string | undefined, includeInactive?: boolean): IDebugSession | undefined; getSessions(includeInactive?: boolean): IDebugSession[]; - getBreakpoints(filter?: { uri?: uri, lineNumber?: number, column?: number, enabledOnly?: boolean }): ReadonlyArray; + getBreakpoints(filter?: { uri?: uri; lineNumber?: number; column?: number; enabledOnly?: boolean }): ReadonlyArray; areBreakpointsActivated(): boolean; getFunctionBreakpoints(): ReadonlyArray; getDataBreakpoints(): ReadonlyArray; @@ -631,7 +631,7 @@ export interface IDebugConfiguration { confirmOnExit: 'always' | 'never'; disassemblyView: { showSourceCode: boolean; - } + }; } export interface IGlobalConfig { @@ -680,7 +680,7 @@ export interface ICompound { name: string; stopAll?: boolean; preLaunchTask?: string | TaskIdentifier; - configurations: (string | { name: string, folder: string })[]; + configurations: (string | { name: string; folder: string })[]; presentation?: IConfigPresentation; } @@ -816,9 +816,9 @@ export interface IConfigurationManager { getLaunches(): ReadonlyArray; getLaunch(workspaceUri: uri | undefined): ILaunch | undefined; - getAllConfigurations(): { launch: ILaunch, name: string, presentation?: IConfigPresentation }[]; + getAllConfigurations(): { launch: ILaunch; name: string; presentation?: IConfigPresentation }[]; removeRecentDynamicConfigurations(name: string, type: string): void; - getRecentDynamicConfigurations(): { name: string, type: string }[]; + getRecentDynamicConfigurations(): { name: string; type: string }[]; /** * Allows to register on change of selected debug configuration. @@ -826,7 +826,7 @@ export interface IConfigurationManager { onDidSelectConfiguration: Event; hasDebugConfigurationProvider(debugType: string): boolean; - getDynamicProviders(): Promise<{ label: string, type: string, pick: () => Promise<{ launch: ILaunch, config: IConfig } | undefined> }[]>; + getDynamicProviders(): Promise<{ label: string; type: string; pick: () => Promise<{ launch: ILaunch; config: IConfig } | undefined> }[]>; registerDebugConfigurationProvider(debugConfigurationProvider: IDebugConfigurationProvider): IDisposable; unregisterDebugConfigurationProvider(debugConfigurationProvider: IDebugConfigurationProvider): void; @@ -896,7 +896,7 @@ export interface ILaunch { /** * Opens the launch.json file. Creates if it does not exist. */ - openConfigFile(preserveFocus: boolean, type?: string, token?: CancellationToken): Promise<{ editor: IEditorPane | null, created: boolean }>; + openConfigFile(preserveFocus: boolean, type?: string, token?: CancellationToken): Promise<{ editor: IEditorPane | null; created: boolean }>; } // Debug service interfaces @@ -990,7 +990,7 @@ export interface IDebugService { * Updates an already existing function breakpoint. * Notifies debug adapter of breakpoint changes. */ - updateFunctionBreakpoint(id: string, update: { name?: string, hitCondition?: string, condition?: string }): Promise; + updateFunctionBreakpoint(id: string, update: { name?: string; hitCondition?: string; condition?: string }): Promise; /** * Removes all function breakpoints. If id is passed only removes the function breakpoint with the passed id. diff --git a/src/vs/workbench/contrib/debug/common/debugModel.ts b/src/vs/workbench/contrib/debug/common/debugModel.ts index 3fd47ea1867e7..a6bc155cb1783 100644 --- a/src/vs/workbench/contrib/debug/common/debugModel.ts +++ b/src/vs/workbench/contrib/debug/common/debugModel.ts @@ -598,7 +598,7 @@ export class Thread implements IThread { export const getUriForDebugMemory = ( sessionId: string, memoryReference: string, - range?: { fromOffset: number, toOffset: number }, + range?: { fromOffset: number; toOffset: number }, displayName = 'memory' ) => { return URI.from({ @@ -696,7 +696,7 @@ interface IBreakpointSessionData extends DebugProtocol.Breakpoint { supportsLogPoints: boolean; supportsFunctionBreakpoints: boolean; supportsDataBreakpoints: boolean; - supportsInstructionBreakpoints: boolean + supportsInstructionBreakpoints: boolean; sessionId: string; } @@ -867,7 +867,7 @@ export class Breakpoint extends BaseBreakpoint implements IBreakpoint { return this.verified && this.data ? this.data.endColumn : undefined; } - get sessionAgnosticData(): { lineNumber: number, column: number | undefined } { + get sessionAgnosticData(): { lineNumber: number; column: number | undefined } { return { lineNumber: this._lineNumber, column: this._column @@ -1193,7 +1193,7 @@ export class DebugModel implements IDebugModel { } } - fetchCallStack(thread: Thread): { topCallStack: Promise, wholeCallStack: Promise } { + fetchCallStack(thread: Thread): { topCallStack: Promise; wholeCallStack: Promise } { if (thread.session.capabilities.supportsDelayedStackTraceLoading) { // For improved performance load the first stack frame and then load the rest async. let topCallStack = Promise.resolve(); @@ -1229,7 +1229,7 @@ export class DebugModel implements IDebugModel { return { wholeCallStack, topCallStack: wholeCallStack }; } - getBreakpoints(filter?: { uri?: uri, lineNumber?: number, column?: number, enabledOnly?: boolean }): IBreakpoint[] { + getBreakpoints(filter?: { uri?: uri; lineNumber?: number; column?: number; enabledOnly?: boolean }): IBreakpoint[] { if (filter) { const uriStr = filter.uri ? filter.uri.toString() : undefined; return this.breakpoints.filter(bp => { @@ -1471,7 +1471,7 @@ export class DebugModel implements IDebugModel { return newFunctionBreakpoint; } - updateFunctionBreakpoint(id: string, update: { name?: string, hitCondition?: string, condition?: string }): void { + updateFunctionBreakpoint(id: string, update: { name?: string; hitCondition?: string; condition?: string }): void { const functionBreakpoint = this.functionBreakpoints.find(fbp => fbp.getId() === id); if (functionBreakpoint) { if (typeof update.name === 'string') { diff --git a/src/vs/workbench/contrib/debug/common/debugSource.ts b/src/vs/workbench/contrib/debug/common/debugSource.ts index d7b43b14248f9..ba2495306d2d0 100644 --- a/src/vs/workbench/contrib/debug/common/debugSource.ts +++ b/src/vs/workbench/contrib/debug/common/debugSource.ts @@ -86,7 +86,7 @@ export class Source { }, sideBySide ? SIDE_GROUP : ACTIVE_GROUP); } - static getEncodedDebugData(modelUri: URI): { name: string, path: string, sessionId?: string, sourceReference?: number } { + static getEncodedDebugData(modelUri: URI): { name: string; path: string; sessionId?: string; sourceReference?: number } { let path: string; let sourceReference: number | undefined; let sessionId: string | undefined; diff --git a/src/vs/workbench/contrib/debug/common/debugStorage.ts b/src/vs/workbench/contrib/debug/common/debugStorage.ts index e08e07304475a..53ba25115bd81 100644 --- a/src/vs/workbench/contrib/debug/common/debugStorage.ts +++ b/src/vs/workbench/contrib/debug/common/debugStorage.ts @@ -80,7 +80,7 @@ export class DebugStorage { loadWatchExpressions(): Expression[] { let result: Expression[] | undefined; try { - result = JSON.parse(this.storageService.get(DEBUG_WATCH_EXPRESSIONS_KEY, StorageScope.WORKSPACE, '[]')).map((watchStoredData: { name: string, id: string }) => { + result = JSON.parse(this.storageService.get(DEBUG_WATCH_EXPRESSIONS_KEY, StorageScope.WORKSPACE, '[]')).map((watchStoredData: { name: string; id: string }) => { return new Expression(watchStoredData.name, watchStoredData.id); }); } catch (e) { } diff --git a/src/vs/workbench/contrib/debug/common/debugUtils.ts b/src/vs/workbench/contrib/debug/common/debugUtils.ts index ed3852e0e4612..4485ab95b63e7 100644 --- a/src/vs/workbench/contrib/debug/common/debugUtils.ts +++ b/src/vs/workbench/contrib/debug/common/debugUtils.ts @@ -72,7 +72,7 @@ export function isDebuggerMainContribution(dbg: IDebuggerContribution) { return dbg.type && (dbg.label || dbg.program || dbg.runtime); } -export function getExactExpressionStartAndEnd(lineContent: string, looseStart: number, looseEnd: number): { start: number, end: number } { +export function getExactExpressionStartAndEnd(lineContent: string, looseStart: number, looseEnd: number): { start: number; end: number } { let matchingExpression: string | undefined = undefined; let startOffset = 0; diff --git a/src/vs/workbench/contrib/debug/common/debugViewModel.ts b/src/vs/workbench/contrib/debug/common/debugViewModel.ts index 68bd9a62171aa..a3b5fa0474229 100644 --- a/src/vs/workbench/contrib/debug/common/debugViewModel.ts +++ b/src/vs/workbench/contrib/debug/common/debugViewModel.ts @@ -17,7 +17,7 @@ export class ViewModel implements IViewModel { private _focusedThread: IThread | undefined; private selectedExpression: { expression: IExpression; settingWatch: boolean } | undefined; private readonly _onDidFocusSession = new Emitter(); - private readonly _onDidFocusStackFrame = new Emitter<{ stackFrame: IStackFrame | undefined, explicit: boolean }>(); + private readonly _onDidFocusStackFrame = new Emitter<{ stackFrame: IStackFrame | undefined; explicit: boolean }>(); private readonly _onDidSelectExpression = new Emitter<{ expression: IExpression; settingWatch: boolean } | undefined>(); private readonly _onWillUpdateViews = new Emitter(); private expressionSelectedContextKey!: IContextKey; @@ -103,7 +103,7 @@ export class ViewModel implements IViewModel { return this._onDidFocusSession.event; } - get onDidFocusStackFrame(): Event<{ stackFrame: IStackFrame | undefined, explicit: boolean }> { + get onDidFocusStackFrame(): Event<{ stackFrame: IStackFrame | undefined; explicit: boolean }> { return this._onDidFocusStackFrame.event; } diff --git a/src/vs/workbench/contrib/debug/common/replModel.ts b/src/vs/workbench/contrib/debug/common/replModel.ts index 59b388ccabff7..f3ae6c3098d5b 100644 --- a/src/vs/workbench/contrib/debug/common/replModel.ts +++ b/src/vs/workbench/contrib/debug/common/replModel.ts @@ -289,7 +289,7 @@ export class ReplModel { this._onDidChangeElements.fire(); } - logToRepl(session: IDebugSession, sev: severity, args: any[], frame?: { uri: URI, line: number, column: number }) { + logToRepl(session: IDebugSession, sev: severity, args: any[], frame?: { uri: URI; line: number; column: number }) { let source: IReplElementSource | undefined; if (frame) { diff --git a/src/vs/workbench/contrib/debug/node/terminals.ts b/src/vs/workbench/contrib/debug/node/terminals.ts index e8854c5a8212f..d25efaffb6e9c 100644 --- a/src/vs/workbench/contrib/debug/node/terminals.ts +++ b/src/vs/workbench/contrib/debug/node/terminals.ts @@ -56,7 +56,7 @@ export async function hasChildProcesses(processId: number | undefined): Promise< const enum ShellType { cmd, powershell, bash } -export function prepareCommand(shell: string, args: string[], cwd?: string, env?: { [key: string]: string | null; }): string { +export function prepareCommand(shell: string, args: string[], cwd?: string, env?: { [key: string]: string | null }): string { shell = shell.trim().toLowerCase(); diff --git a/src/vs/workbench/contrib/debug/test/browser/callStack.test.ts b/src/vs/workbench/contrib/debug/test/browser/callStack.test.ts index 13dfdda095545..dfa763ce7cf16 100644 --- a/src/vs/workbench/contrib/debug/test/browser/callStack.test.ts +++ b/src/vs/workbench/contrib/debug/test/browser/callStack.test.ts @@ -41,7 +41,7 @@ export function createMockSession(model: DebugModel, name = 'mockSession', optio } as IDebugService, undefined!, undefined!, new TestConfigurationService({ debug: { console: { collapseIdenticalLines: true } } }), undefined!, mockWorkspaceContextService, undefined!, undefined!, undefined!, mockUriIdentityService, new TestInstantiationService(), undefined!, undefined!); } -function createTwoStackFrames(session: DebugSession): { firstStackFrame: StackFrame, secondStackFrame: StackFrame } { +function createTwoStackFrames(session: DebugSession): { firstStackFrame: StackFrame; secondStackFrame: StackFrame } { const thread = new class extends Thread { public override getCallStack(): StackFrame[] { return [firstStackFrame, secondStackFrame]; diff --git a/src/vs/workbench/contrib/debug/test/browser/debugANSIHandling.test.ts b/src/vs/workbench/contrib/debug/test/browser/debugANSIHandling.test.ts index b3a85c5625904..f551035fd81f8 100644 --- a/src/vs/workbench/contrib/debug/test/browser/debugANSIHandling.test.ts +++ b/src/vs/workbench/contrib/debug/test/browser/debugANSIHandling.test.ts @@ -38,7 +38,7 @@ suite('Debug - ANSI Handling', () => { const instantiationService: TestInstantiationService = workbenchInstantiationService(undefined, disposables); linkDetector = instantiationService.createInstance(LinkDetector); - const colors: { [id: string]: string; } = {}; + const colors: { [id: string]: string } = {}; for (const color in ansiColorMap) { colors[color] = ansiColorMap[color].defaults.dark; } diff --git a/src/vs/workbench/contrib/debug/test/browser/mockDebug.ts b/src/vs/workbench/contrib/debug/test/browser/mockDebug.ts index af18ed46c5c30..ff77730fe3523 100644 --- a/src/vs/workbench/contrib/debug/test/browser/mockDebug.ts +++ b/src/vs/workbench/contrib/debug/test/browser/mockDebug.ts @@ -105,7 +105,7 @@ export class MockDebugService implements IDebugService { moveWatchExpression(id: string, position: number): void { } - updateFunctionBreakpoint(id: string, update: { name?: string, hitCondition?: string, condition?: string }): Promise { + updateFunctionBreakpoint(id: string, update: { name?: string; hitCondition?: string; condition?: string }): Promise { throw new Error('not implemented'); } @@ -194,7 +194,7 @@ export class MockSession implements IDebugSession { return false; } - stepInTargets(frameId: number): Promise<{ id: number; label: string; }[]> { + stepInTargets(frameId: number): Promise<{ id: number; label: string }[]> { throw new Error('Method not implemented.'); } @@ -206,7 +206,7 @@ export class MockSession implements IDebugSession { throw new Error('Method not implemented.'); } - dataBreakpointInfo(name: string, variablesReference?: number | undefined): Promise<{ dataId: string | null; description: string; canPersist?: boolean | undefined; } | undefined> { + dataBreakpointInfo(name: string, variablesReference?: number | undefined): Promise<{ dataId: string | null; description: string; canPersist?: boolean | undefined } | undefined> { throw new Error('Method not implemented.'); } @@ -246,7 +246,7 @@ export class MockSession implements IDebugSession { } appendToRepl(data: string | IExpression, severity: Severity, source?: IReplElementSource): void { } - logToRepl(sev: Severity, args: any[], frame?: { uri: uri; line: number; column: number; }) { } + logToRepl(sev: Severity, args: any[], frame?: { uri: uri; line: number; column: number }) { } configuration: IConfig = { type: 'mock', name: 'mock', request: 'launch' }; unresolvedConfiguration: IConfig = { type: 'mock', name: 'mock', request: 'launch' }; @@ -314,7 +314,7 @@ export class MockSession implements IDebugSession { throw new Error('not implemented'); } - setConfiguration(configuration: { resolved: IConfig, unresolved: IConfig }) { } + setConfiguration(configuration: { resolved: IConfig; unresolved: IConfig }) { } getAllThreads(): IThread[] { return []; diff --git a/src/vs/workbench/contrib/experiments/browser/experimentalPrompt.ts b/src/vs/workbench/contrib/experiments/browser/experimentalPrompt.ts index da48b392a550d..d0a2ef8983ced 100644 --- a/src/vs/workbench/contrib/experiments/browser/experimentalPrompt.ts +++ b/src/vs/workbench/contrib/experiments/browser/experimentalPrompt.ts @@ -98,7 +98,7 @@ export class ExperimentalPrompts extends Disposable implements IWorkbenchContrib }); } - static getLocalizedText(text: string | { [key: string]: string; }, displayLanguage: string): string { + static getLocalizedText(text: string | { [key: string]: string }, displayLanguage: string): string { if (typeof text === 'string') { return text; } diff --git a/src/vs/workbench/contrib/experiments/common/experimentService.ts b/src/vs/workbench/contrib/experiments/common/experimentService.ts index 81ec52a88fe63..a0d52ac4b5225 100644 --- a/src/vs/workbench/contrib/experiments/common/experimentService.ts +++ b/src/vs/workbench/contrib/experiments/common/experimentService.ts @@ -44,7 +44,7 @@ export enum ExperimentActionType { ExtensionSearchResults = 'ExtensionSearchResults' } -export type LocalizedPromptText = { [locale: string]: string; }; +export type LocalizedPromptText = { [locale: string]: string }; export interface IExperimentActionPromptProperties { promptText: string | LocalizedPromptText; @@ -52,7 +52,7 @@ export interface IExperimentActionPromptProperties { } export interface IExperimentActionPromptCommand { - text: string | { [key: string]: string; }; + text: string | { [key: string]: string }; externalLink?: string; curatedExtensionsKey?: string; curatedExtensionsList?: string[]; @@ -105,7 +105,7 @@ interface IRawExperiment { newUser?: boolean; displayLanguage?: string; // Evaluates to true iff all the given user settings are deeply equal - userSetting?: { [key: string]: unknown; }; + userSetting?: { [key: string]: unknown }; // Start the experiment if the number of activation events have happened over the last week: activationEvent?: { event: string | string[]; @@ -237,7 +237,7 @@ export class ExperimentService extends Disposable implements IExperimentService if (context.res.statusCode !== 200) { return null; } - const result = await asJson<{ experiments?: IRawExperiment; }>(context); + const result = await asJson<{ experiments?: IRawExperiment }>(context); return result && Array.isArray(result.experiments) ? result.experiments : []; } catch (_e) { // Bad request or invalid JSON @@ -300,9 +300,9 @@ export class ExperimentService extends Disposable implements IExperimentService const promises = rawExperiments.map(experiment => this.evaluateExperiment(experiment)); return Promise.all(promises).then(() => { type ExperimentsClassification = { - experiments: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; + experiments: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; - this.telemetryService.publicLog2<{ experiments: string[]; }, ExperimentsClassification>('experiments', { experiments: this._experiments.map(e => e.id) }); + this.telemetryService.publicLog2<{ experiments: string[] }, ExperimentsClassification>('experiments', { experiments: this._experiments.map(e => e.id) }); }); }); } diff --git a/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts b/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts index 74119ee2a19a1..a97d0ace12a93 100644 --- a/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts +++ b/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts @@ -40,7 +40,7 @@ interface ExperimentSettings { state?: ExperimentState; } -let experimentData: { [i: string]: any; } = { +let experimentData: { [i: string]: any } = { experiments: [] }; diff --git a/src/vs/workbench/contrib/experiments/test/electron-browser/experimentalPrompts.test.ts b/src/vs/workbench/contrib/experiments/test/electron-browser/experimentalPrompts.test.ts index 93490e6e8a85e..025369ee34c40 100644 --- a/src/vs/workbench/contrib/experiments/test/electron-browser/experimentalPrompts.test.ts +++ b/src/vs/workbench/contrib/experiments/test/electron-browser/experimentalPrompts.test.ts @@ -26,7 +26,7 @@ suite('Experimental Prompts', () => { let commandService: TestCommandService; let onExperimentEnabledEvent: Emitter; - let storageData: { [key: string]: any; } = {}; + let storageData: { [key: string]: any } = {}; const promptText = 'Hello there! Can you see this?'; const experiment: IExperiment = { diff --git a/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts b/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts index 6a4e23e9f2722..1398da1656081 100644 --- a/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts @@ -104,7 +104,7 @@ export abstract class AbstractRuntimeExtensionsEditor extends EditorPane { const extensionsDescriptions = (await this._extensionService.getExtensions()).filter((extension) => { return Boolean(extension.main) || Boolean(extension.browser); }); - let marketplaceMap: { [id: string]: IExtension; } = Object.create(null); + let marketplaceMap: { [id: string]: IExtension } = Object.create(null); const marketPlaceExtensions = await this._extensionsWorkbenchService.queryLocal(); for (let extension of marketPlaceExtensions) { marketplaceMap[ExtensionIdentifier.toKey(extension.identifier.id)] = extension; @@ -113,7 +113,7 @@ export abstract class AbstractRuntimeExtensionsEditor extends EditorPane { let statusMap = this._extensionService.getExtensionsStatus(); // group profile segments by extension - let segments: { [id: string]: number[]; } = Object.create(null); + let segments: { [id: string]: number[] } = Object.create(null); const profileInfo = this._getProfileInfo(); if (profileInfo) { diff --git a/src/vs/workbench/contrib/extensions/browser/dynamicWorkspaceRecommendations.ts b/src/vs/workbench/contrib/extensions/browser/dynamicWorkspaceRecommendations.ts index a94821cd5da51..f287d1ebe38db 100644 --- a/src/vs/workbench/contrib/extensions/browser/dynamicWorkspaceRecommendations.ts +++ b/src/vs/workbench/contrib/extensions/browser/dynamicWorkspaceRecommendations.ts @@ -16,11 +16,11 @@ import { ExtensionRecommendationReason } from 'vs/workbench/services/extensionRe import { localize } from 'vs/nls'; type DynamicWorkspaceRecommendationsClassification = { - count: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - cache: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + count: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + cache: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; -type IStoredDynamicWorkspaceRecommendations = { recommendations: string[], timestamp: number }; +type IStoredDynamicWorkspaceRecommendations = { recommendations: string[]; timestamp: number }; const dynamicWorkspaceRecommendationsStorageKey = 'extensionsAssistant/dynamicWorkspaceRecommendations'; const milliSecondsInADay = 1000 * 60 * 60 * 24; @@ -62,7 +62,7 @@ export class DynamicWorkspaceRecommendations extends ExtensionRecommendations { const cachedDynamicWorkspaceRecommendations = this.getCachedDynamicWorkspaceRecommendations(); if (cachedDynamicWorkspaceRecommendations) { this._recommendations = cachedDynamicWorkspaceRecommendations.map(id => this.toExtensionRecommendation(id, folder)); - this.telemetryService.publicLog2<{ count: number, cache: number }, DynamicWorkspaceRecommendationsClassification>('dynamicWorkspaceRecommendations', { count: this._recommendations.length, cache: 1 }); + this.telemetryService.publicLog2<{ count: number; cache: number }, DynamicWorkspaceRecommendationsClassification>('dynamicWorkspaceRecommendations', { count: this._recommendations.length, cache: 1 }); return; } @@ -82,7 +82,7 @@ export class DynamicWorkspaceRecommendations extends ExtensionRecommendations { if (workspaceTip) { this._recommendations = workspaceTip.recommendations.map(id => this.toExtensionRecommendation(id, folder)); this.storageService.store(dynamicWorkspaceRecommendationsStorageKey, JSON.stringify({ recommendations: workspaceTip.recommendations, timestamp: Date.now() }), StorageScope.WORKSPACE, StorageTarget.MACHINE); - this.telemetryService.publicLog2<{ count: number, cache: number }, DynamicWorkspaceRecommendationsClassification>('dynamicWorkspaceRecommendations', { count: this._recommendations.length, cache: 0 }); + this.telemetryService.publicLog2<{ count: number; cache: number }, DynamicWorkspaceRecommendationsClassification>('dynamicWorkspaceRecommendations', { count: this._recommendations.length, cache: 0 }); return; } } diff --git a/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.ts b/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.ts index 6bfdcc1c7498f..6096e57e82ad8 100644 --- a/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.ts +++ b/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.ts @@ -24,7 +24,7 @@ export class ExeBasedRecommendations extends ExtensionRecommendations { super(); } - getRecommendations(exe: string): { important: ExtensionRecommendation[], others: ExtensionRecommendation[] } { + getRecommendations(exe: string): { important: ExtensionRecommendation[]; others: ExtensionRecommendation[] } { const important = this._importantTips .filter(tip => tip.exeName.toLowerCase() === exe.toLowerCase()) .map(tip => this.toExtensionRecommendation(tip)); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts index 6611228e7d42a..eacf49efe36c7 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts @@ -74,8 +74,8 @@ import { IExtensionGalleryService, IGalleryExtension } from 'vs/platform/extensi class NavBar extends Disposable { - private _onChange = this._register(new Emitter<{ id: string | null, focus: boolean; }>()); - get onChange(): Event<{ id: string | null, focus: boolean; }> { return this._onChange.event; } + private _onChange = this._register(new Emitter<{ id: string | null; focus: boolean }>()); + get onChange(): Event<{ id: string | null; focus: boolean }> { return this._onChange.event; } private _currentId: string | null = null; get currentId(): string | null { return this._currentId; } @@ -704,7 +704,7 @@ export class ExtensionEditor extends EditorPane { return this.activeElement as IWebview; } - private onNavbarChange(extension: IExtension, { id, focus }: { id: string | null, focus: boolean; }, template: IExtensionEditorTemplate): void { + private onNavbarChange(extension: IExtension, { id, focus }: { id: string | null; focus: boolean }, template: IExtensionEditorTemplate): void { this.contentDisposables.clear(); template.content.innerText = ''; this.activeElement = null; @@ -1290,7 +1290,7 @@ export class ExtensionEditor extends EditorPane { let viewContainersForLocation: IViewContainer[] = contrib[location]; result.push(...viewContainersForLocation.map(viewContainer => ({ ...viewContainer, location }))); return result; - }, [] as Array<{ id: string, title: string, location: string; }>); + }, [] as Array<{ id: string; title: string; location: string }>); if (!viewContainers.length) { return false; @@ -1315,7 +1315,7 @@ export class ExtensionEditor extends EditorPane { let viewsForLocation: IView[] = contrib[location]; result.push(...viewsForLocation.map(view => ({ ...view, location }))); return result; - }, [] as Array<{ id: string, name: string, location: string; }>); + }, [] as Array<{ id: string; name: string; location: string }>); if (!views.length) { return false; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.ts b/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.ts index 91ef8cc0fb30a..4e95edf7f9e4a 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.ts @@ -27,13 +27,13 @@ import { EnablementState, IWorkbenchExtensionManagementService, IWorkbenchExtens import { IExtensionIgnoredRecommendationsService } from 'vs/workbench/services/extensionRecommendations/common/extensionRecommendations'; type ExtensionRecommendationsNotificationClassification = { - userReaction: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - extensionId?: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight'; }; - source: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; + userReaction: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + extensionId?: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; + source: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; type ExtensionWorkspaceRecommendationsNotificationClassification = { - userReaction: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; + userReaction: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; const ignoreImportantExtensionRecommendationStorageKey = 'extensionsAssistant/importantRecommendationsIgnore'; @@ -104,8 +104,8 @@ class RecommendationsNotification { } } -type PendingRecommendationsNotification = { recommendationsNotification: RecommendationsNotification, source: RecommendationSource, token: CancellationToken; }; -type VisibleRecommendationsNotification = { recommendationsNotification: RecommendationsNotification, source: RecommendationSource, from: number; }; +type PendingRecommendationsNotification = { recommendationsNotification: RecommendationsNotification; source: RecommendationSource; token: CancellationToken }; +type VisibleRecommendationsNotification = { recommendationsNotification: RecommendationsNotification; source: RecommendationSource; from: number }; export class ExtensionRecommendationNotificationService implements IExtensionRecommendationNotificationService { @@ -138,7 +138,7 @@ export class ExtensionRecommendationNotificationService implements IExtensionRec ) { } hasToIgnoreRecommendationNotifications(): boolean { - const config = this.configurationService.getValue<{ ignoreRecommendations: boolean, showRecommendationsOnlyOnDemand?: boolean; }>('extensions'); + const config = this.configurationService.getValue<{ ignoreRecommendations: boolean; showRecommendationsOnlyOnDemand?: boolean }>('extensions'); return config.ignoreRecommendations || !!config.showRecommendationsOnlyOnDemand; } @@ -150,13 +150,13 @@ export class ExtensionRecommendationNotificationService implements IExtensionRec } return this.promptRecommendationsNotification(extensionIds, message, searchValue, source, { - onDidInstallRecommendedExtensions: (extensions: IExtension[]) => extensions.forEach(extension => this.telemetryService.publicLog2<{ userReaction: string, extensionId: string, source: string; }, ExtensionRecommendationsNotificationClassification>('extensionRecommendations:popup', { userReaction: 'install', extensionId: extension.identifier.id, source: RecommendationSourceToString(source) })), - onDidShowRecommendedExtensions: (extensions: IExtension[]) => extensions.forEach(extension => this.telemetryService.publicLog2<{ userReaction: string, extensionId: string, source: string; }, ExtensionRecommendationsNotificationClassification>('extensionRecommendations:popup', { userReaction: 'show', extensionId: extension.identifier.id, source: RecommendationSourceToString(source) })), - onDidCancelRecommendedExtensions: (extensions: IExtension[]) => extensions.forEach(extension => this.telemetryService.publicLog2<{ userReaction: string, extensionId: string, source: string; }, ExtensionRecommendationsNotificationClassification>('extensionRecommendations:popup', { userReaction: 'cancelled', extensionId: extension.identifier.id, source: RecommendationSourceToString(source) })), + onDidInstallRecommendedExtensions: (extensions: IExtension[]) => extensions.forEach(extension => this.telemetryService.publicLog2<{ userReaction: string; extensionId: string; source: string }, ExtensionRecommendationsNotificationClassification>('extensionRecommendations:popup', { userReaction: 'install', extensionId: extension.identifier.id, source: RecommendationSourceToString(source) })), + onDidShowRecommendedExtensions: (extensions: IExtension[]) => extensions.forEach(extension => this.telemetryService.publicLog2<{ userReaction: string; extensionId: string; source: string }, ExtensionRecommendationsNotificationClassification>('extensionRecommendations:popup', { userReaction: 'show', extensionId: extension.identifier.id, source: RecommendationSourceToString(source) })), + onDidCancelRecommendedExtensions: (extensions: IExtension[]) => extensions.forEach(extension => this.telemetryService.publicLog2<{ userReaction: string; extensionId: string; source: string }, ExtensionRecommendationsNotificationClassification>('extensionRecommendations:popup', { userReaction: 'cancelled', extensionId: extension.identifier.id, source: RecommendationSourceToString(source) })), onDidNeverShowRecommendedExtensionsAgain: (extensions: IExtension[]) => { for (const extension of extensions) { this.addToImportantRecommendationsIgnore(extension.identifier.id); - this.telemetryService.publicLog2<{ userReaction: string, extensionId: string, source: string; }, ExtensionRecommendationsNotificationClassification>('extensionRecommendations:popup', { userReaction: 'neverShowAgain', extensionId: extension.identifier.id, source: RecommendationSourceToString(source) }); + this.telemetryService.publicLog2<{ userReaction: string; extensionId: string; source: string }, ExtensionRecommendationsNotificationClassification>('extensionRecommendations:popup', { userReaction: 'neverShowAgain', extensionId: extension.identifier.id, source: RecommendationSourceToString(source) }); } this.notificationService.prompt( Severity.Info, @@ -187,10 +187,10 @@ export class ExtensionRecommendationNotificationService implements IExtensionRec const message = (extensions: IExtension[]) => extensions.length === 1 ? localize('singleExtensionRecommended', "'{0}' extension is recommended for this repository. Do you want to install?", extensions[0].displayName) : localize('workspaceRecommended', "Do you want to install the recommended extensions for this repository?"); const result = await this.promptRecommendationsNotification(recommendations, message, '@recommended ', RecommendationSource.WORKSPACE, { - onDidInstallRecommendedExtensions: () => this.telemetryService.publicLog2<{ userReaction: string; }, ExtensionWorkspaceRecommendationsNotificationClassification>('extensionWorkspaceRecommendations:popup', { userReaction: 'install' }), - onDidShowRecommendedExtensions: () => this.telemetryService.publicLog2<{ userReaction: string; }, ExtensionWorkspaceRecommendationsNotificationClassification>('extensionWorkspaceRecommendations:popup', { userReaction: 'show' }), - onDidCancelRecommendedExtensions: () => this.telemetryService.publicLog2<{ userReaction: string; }, ExtensionWorkspaceRecommendationsNotificationClassification>('extensionWorkspaceRecommendations:popup', { userReaction: 'cancelled' }), - onDidNeverShowRecommendedExtensionsAgain: () => this.telemetryService.publicLog2<{ userReaction: string; }, ExtensionWorkspaceRecommendationsNotificationClassification>('extensionWorkspaceRecommendations:popup', { userReaction: 'neverShowAgain' }), + onDidInstallRecommendedExtensions: () => this.telemetryService.publicLog2<{ userReaction: string }, ExtensionWorkspaceRecommendationsNotificationClassification>('extensionWorkspaceRecommendations:popup', { userReaction: 'install' }), + onDidShowRecommendedExtensions: () => this.telemetryService.publicLog2<{ userReaction: string }, ExtensionWorkspaceRecommendationsNotificationClassification>('extensionWorkspaceRecommendations:popup', { userReaction: 'show' }), + onDidCancelRecommendedExtensions: () => this.telemetryService.publicLog2<{ userReaction: string }, ExtensionWorkspaceRecommendationsNotificationClassification>('extensionWorkspaceRecommendations:popup', { userReaction: 'cancelled' }), + onDidNeverShowRecommendedExtensionsAgain: () => this.telemetryService.publicLog2<{ userReaction: string }, ExtensionWorkspaceRecommendationsNotificationClassification>('extensionWorkspaceRecommendations:popup', { userReaction: 'neverShowAgain' }), }); if (result === RecommendationsNotificationResult.Accepted) { diff --git a/src/vs/workbench/contrib/extensions/browser/extensionRecommendations.ts b/src/vs/workbench/contrib/extensions/browser/extensionRecommendations.ts index 5c6ee68a963cb..f068993197032 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionRecommendations.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionRecommendations.ts @@ -7,7 +7,7 @@ import { Disposable } from 'vs/base/common/lifecycle'; import { IExtensionRecommendationReson } from 'vs/workbench/services/extensionRecommendations/common/extensionRecommendations'; export type ExtensionRecommendation = { - readonly extensionId: string, + readonly extensionId: string; readonly reason: IExtensionRecommendationReson; }; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionRecommendationsService.ts b/src/vs/workbench/contrib/extensions/browser/extensionRecommendationsService.ts index 86fff66f30337..77078e13a0ee0 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionRecommendationsService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionRecommendationsService.ts @@ -27,8 +27,8 @@ import { URI } from 'vs/base/common/uri'; import { WebRecommendations } from 'vs/workbench/contrib/extensions/browser/webRecommendations'; type IgnoreRecommendationClassification = { - recommendationReason: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - extensionId: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; + recommendationReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + extensionId: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; }; export class ExtensionRecommendationsService extends Disposable implements IExtensionRecommendationsService { @@ -107,7 +107,7 @@ export class ExtensionRecommendationsService extends Disposable implements IExte if (!isRecommended) { const reason = this.getAllRecommendationsWithReason()[extensionId]; if (reason && reason.reasonId) { - this.telemetryService.publicLog2<{ extensionId: string, recommendationReason: ExtensionRecommendationReason }, IgnoreRecommendationClassification>('extensionsRecommendations:ignoreRecommendation', { extensionId, recommendationReason: reason.reasonId }); + this.telemetryService.publicLog2<{ extensionId: string; recommendationReason: ExtensionRecommendationReason }, IgnoreRecommendationClassification>('extensionsRecommendations:ignoreRecommendation', { extensionId, recommendationReason: reason.reasonId }); } } })); @@ -123,11 +123,11 @@ export class ExtensionRecommendationsService extends Disposable implements IExte await Promise.all([this.dynamicWorkspaceRecommendations.activate(), this.exeBasedRecommendations.activate(), this.configBasedRecommendations.activate()]); } - getAllRecommendationsWithReason(): { [id: string]: { reasonId: ExtensionRecommendationReason, reasonText: string }; } { + getAllRecommendationsWithReason(): { [id: string]: { reasonId: ExtensionRecommendationReason; reasonText: string } } { /* Activate proactive recommendations */ this.activateProactiveRecommendations(); - const output: { [id: string]: { reasonId: ExtensionRecommendationReason, reasonText: string }; } = Object.create(null); + const output: { [id: string]: { reasonId: ExtensionRecommendationReason; reasonText: string } } = Object.create(null); const allRecommendations = [ ...this.dynamicWorkspaceRecommendations.recommendations, @@ -150,7 +150,7 @@ export class ExtensionRecommendationsService extends Disposable implements IExte return output; } - async getConfigBasedRecommendations(): Promise<{ important: string[], others: string[] }> { + async getConfigBasedRecommendations(): Promise<{ important: string[]; others: string[] }> { await this.configBasedRecommendations.activate(); return { important: this.toExtensionRecommendations(this.configBasedRecommendations.importantRecommendations), @@ -211,7 +211,7 @@ export class ExtensionRecommendationsService extends Disposable implements IExte return this.toExtensionRecommendations(this.workspaceRecommendations.recommendations); } - async getExeBasedRecommendations(exe?: string): Promise<{ important: string[], others: string[] }> { + async getExeBasedRecommendations(exe?: string): Promise<{ important: string[]; others: string[] }> { await this.exeBasedRecommendations.activate(); const { important, others } = exe ? this.exeBasedRecommendations.getRecommendations(exe) : { important: this.exeBasedRecommendations.importantRecommendations, others: this.exeBasedRecommendations.otherRecommendations }; diff --git a/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts index 770aec192bba3..86f6c74b06ed3 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts @@ -289,7 +289,7 @@ CommandsRegistry.registerCommand({ } ] }, - handler: async (accessor, arg: string | UriComponents, options?: { installOnlyNewlyAddedFromExtensionPackVSIX?: boolean, installPreReleaseVersion?: boolean, donotSync?: boolean }) => { + handler: async (accessor, arg: string | UriComponents, options?: { installOnlyNewlyAddedFromExtensionPackVSIX?: boolean; installPreReleaseVersion?: boolean; donotSync?: boolean }) => { const extensionsWorkbenchService = accessor.get(IExtensionsWorkbenchService); try { if (typeof arg === 'string') { @@ -1494,7 +1494,7 @@ class ExtensionsContributions extends Disposable implements IWorkbenchContributi private registerExtensionAction(extensionActionOptions: IExtensionActionOptions): IDisposable { const menus = extensionActionOptions.menu ? isArray(extensionActionOptions.menu) ? extensionActionOptions.menu : [extensionActionOptions.menu] : []; let menusWithOutTitles: ({ id: MenuId } & Omit)[] = []; - const menusWithTitles: { id: MenuId, item: IMenuItem }[] = []; + const menusWithTitles: { id: MenuId; item: IMenuItem }[] = []; if (extensionActionOptions.menuTitles) { for (let index = 0; index < menus.length; index++) { const menu = menus[index]; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index fdc588c6bdb92..4d5d9f4cfdfb0 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -829,7 +829,7 @@ export abstract class ExtensionDropDownAction extends ExtensionAction { return this._actionViewItem; } - public override run({ actionGroups, disposeActionsOnHide }: { actionGroups: IAction[][], disposeActionsOnHide: boolean; }): Promise { + public override run({ actionGroups, disposeActionsOnHide }: { actionGroups: IAction[][]; disposeActionsOnHide: boolean }): Promise { if (this._actionViewItem) { this._actionViewItem.showMenu(actionGroups, disposeActionsOnHide); } @@ -1556,7 +1556,7 @@ export class SetColorThemeAction extends ExtensionAction { this.class = this.enabled ? SetColorThemeAction.EnabledClass : SetColorThemeAction.DisabledClass; } - override async run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean, ignoreFocusLost: boolean; } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise { + override async run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean; ignoreFocusLost: boolean } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise { this.colorThemes = await this.workbenchThemeService.getColorThemes(); this.update(); @@ -1607,7 +1607,7 @@ export class SetFileIconThemeAction extends ExtensionAction { this.class = this.enabled ? SetFileIconThemeAction.EnabledClass : SetFileIconThemeAction.DisabledClass; } - override async run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean, ignoreFocusLost: boolean; } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise { + override async run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean; ignoreFocusLost: boolean } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise { this.fileIconThemes = await this.workbenchThemeService.getFileIconThemes(); this.update(); if (!this.enabled) { @@ -1657,7 +1657,7 @@ export class SetProductIconThemeAction extends ExtensionAction { this.class = this.enabled ? SetProductIconThemeAction.EnabledClass : SetProductIconThemeAction.DisabledClass; } - override async run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean, ignoreFocusLost: boolean; } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise { + override async run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean; ignoreFocusLost: boolean } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise { this.productIconThemes = await this.workbenchThemeService.getProductIconThemes(); this.update(); if (!this.enabled) { @@ -1879,7 +1879,7 @@ export abstract class AbstractConfigureRecommendedExtensionsAction extends Actio return Promise.resolve(undefined); } - private getOrCreateExtensionsFile(extensionsFileResource: URI): Promise<{ created: boolean, extensionsFileResource: URI, content: string; }> { + private getOrCreateExtensionsFile(extensionsFileResource: URI): Promise<{ created: boolean; extensionsFileResource: URI; content: string }> { return Promise.resolve(this.fileService.readFile(extensionsFileResource)).then(content => { return { created: false, extensionsFileResource, content: content.value.toString() }; }, err => { @@ -2100,7 +2100,7 @@ export class ToggleSyncExtensionAction extends ExtensionDropDownAction { } } -export type ExtensionStatus = { readonly message: IMarkdownString, readonly icon?: ThemeIcon; }; +export type ExtensionStatus = { readonly message: IMarkdownString; readonly icon?: ThemeIcon }; export class ExtensionStatusAction extends ExtensionAction { @@ -2406,7 +2406,7 @@ export class ReinstallAction extends Action { .then(pick => pick && this.reinstallExtension(pick.extension)); } - private getEntries(): Promise<(IQuickPickItem & { extension: IExtension; })[]> { + private getEntries(): Promise<(IQuickPickItem & { extension: IExtension })[]> { return this.extensionsWorkbenchService.queryLocal() .then(local => { const entries = local @@ -2417,7 +2417,7 @@ export class ReinstallAction extends Action { label: extension.displayName, description: extension.identifier.id, extension, - } as (IQuickPickItem & { extension: IExtension; }); + } as (IQuickPickItem & { extension: IExtension }); }); return entries; }); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsList.ts b/src/vs/workbench/contrib/extensions/browser/extensionsList.ts index 82f297f1b7a82..90d51d12865c4 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsList.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsList.ts @@ -57,8 +57,8 @@ export class Delegate implements IListVirtualDelegate { export type ExtensionListRendererOptions = { hoverOptions: { - position: () => HoverPosition - } + position: () => HoverPosition; + }; }; export class Renderer implements IPagedRenderer { diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts index c9039fca8ce91..a18904b831fdb 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts @@ -60,7 +60,7 @@ import { isOfflineError } from 'vs/base/parts/request/common/request'; const FORCE_FEATURE_EXTENSIONS = ['vscode.git', 'vscode.git-base', 'vscode.search-result']; type WorkspaceRecommendationsClassification = { - count: { classification: 'SystemMetaData', purpose: 'FeatureInsight', 'isMeasurement': true; }; + count: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; 'isMeasurement': true }; }; class ExtensionsViewState extends Disposable implements IExtensionsViewState { @@ -103,7 +103,7 @@ export class ExtensionsListView extends ViewPane { } | undefined; private badge: CountBadge | undefined; private list: WorkbenchPagedList | null = null; - private queryRequest: { query: string, request: CancelablePromise>; } | null = null; + private queryRequest: { query: string; request: CancelablePromise> } | null = null; private queryResult: IQueryResult | undefined; private readonly contextMenuActionRunner = this._register(new ActionRunner()); @@ -379,7 +379,7 @@ export class ExtensionsListView extends ViewPane { }; } - private filterLocal(local: IExtension[], runningExtensions: IExtensionDescription[], query: Query, options: IQueryOptions): { extensions: IExtension[], canIncludeInstalledExtensions: boolean; } { + private filterLocal(local: IExtension[], runningExtensions: IExtensionDescription[], query: Query, options: IQueryOptions): { extensions: IExtension[]; canIncludeInstalledExtensions: boolean } { let value = query.value; let extensions: IExtension[] = []; let canIncludeInstalledExtensions = true; @@ -462,7 +462,7 @@ export class ExtensionsListView extends ViewPane { return this.sortExtensions(result, options); } - private parseCategories(value: string): { value: string, categories: string[]; } { + private parseCategories(value: string): { value: string; categories: string[] } { const categories: string[] = []; value = value.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g, (_, quotedCategory, category) => { const entry = (category || quotedCategory || '').toLowerCase(); @@ -828,7 +828,7 @@ export class ExtensionsListView extends ViewPane { private async getWorkspaceRecommendationsModel(query: Query, options: IQueryOptions, token: CancellationToken): Promise> { const recommendations = await this.getWorkspaceRecommendations(); const installableRecommendations = (await this.getInstallableRecommendations(recommendations, { ...options, source: 'recommendations-workspace' }, token)); - this.telemetryService.publicLog2<{ count: number; }, WorkspaceRecommendationsClassification>('extensionWorkspaceRecommendations:open', { count: installableRecommendations.length }); + this.telemetryService.publicLog2<{ count: number }, WorkspaceRecommendationsClassification>('extensionWorkspaceRecommendations:open', { count: installableRecommendations.length }); const result: IExtension[] = coalesce(recommendations.map(id => installableRecommendations.find(i => areSameExtensions(i.identifier, { id })))); return new PagedModel(result); } @@ -956,7 +956,7 @@ export class ExtensionsListView extends ViewPane { } } - private openExtension(extension: IExtension, options: { sideByside?: boolean, preserveFocus?: boolean, pinned?: boolean; }): void { + private openExtension(extension: IExtension, options: { sideByside?: boolean; preserveFocus?: boolean; pinned?: boolean }): void { extension = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, extension.identifier))[0] || extension; this.extensionsWorkbenchService.open(extension, options).then(undefined, err => this.onError(err)); } diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index d71605d07642b..462dbfb6efdf6 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -113,7 +113,7 @@ class Extension implements IExtension { return this.local!.manifest.publisher; } - get publisherDomain(): { link: string, verified: boolean; } | undefined { + get publisherDomain(): { link: string; verified: boolean } | undefined { return this.gallery?.publisherDomain; } @@ -187,7 +187,7 @@ class Extension implements IExtension { } public isMalicious: boolean = false; - public isUnsupported: boolean | { preReleaseExtension: { id: string, displayName: string; }; } = false; + public isUnsupported: boolean | { preReleaseExtension: { id: string; displayName: string } } = false; get installCount(): number | undefined { return this.gallery ? this.gallery.installCount : undefined; @@ -374,8 +374,8 @@ class Extensions extends Disposable { } } - private readonly _onChange: Emitter<{ extension: Extension, operation?: InstallOperation; } | undefined> = this._register(new Emitter<{ extension: Extension, operation?: InstallOperation; } | undefined>()); - get onChange(): Event<{ extension: Extension, operation?: InstallOperation; } | undefined> { return this._onChange.event; } + private readonly _onChange: Emitter<{ extension: Extension; operation?: InstallOperation } | undefined> = this._register(new Emitter<{ extension: Extension; operation?: InstallOperation } | undefined>()); + get onChange(): Event<{ extension: Extension; operation?: InstallOperation } | undefined> { return this._onChange.event; } private installing: Extension[] = []; private uninstalling: Extension[] = []; @@ -1307,7 +1307,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension return this.doSetEnablement(allExtensions, enablementState); } - private getExtensionsRecursively(extensions: IExtension[], installed: IExtension[], enablementState: EnablementState, options: { dependencies: boolean, pack: boolean; }, checked: IExtension[] = []): IExtension[] { + private getExtensionsRecursively(extensions: IExtension[], installed: IExtension[], enablementState: EnablementState, options: { dependencies: boolean; pack: boolean }, checked: IExtension[] = []): IExtension[] { const toCheck = extensions.filter(e => checked.indexOf(e) === -1); if (toCheck.length) { for (const extension of toCheck) { diff --git a/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.ts b/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.ts index f9eb8c240f23f..66b7f7280ab45 100644 --- a/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.ts +++ b/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.ts @@ -36,8 +36,8 @@ import { ViewContainerLocation } from 'vs/workbench/common/views'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; type FileExtensionSuggestionClassification = { - userReaction: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - fileExtension: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; + userReaction: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + fileExtension: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; }; const promptedRecommendationsStorageKey = 'fileBasedRecommendations/promptedRecommendations'; @@ -334,7 +334,7 @@ export class FileBasedRecommendations extends ExtensionRecommendations { label: searchMarketplace, run: () => { this.addToPromptedFileExtensions(fileExtension); - this.telemetryService.publicLog2<{ userReaction: string, fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'ok', fileExtension }); + this.telemetryService.publicLog2<{ userReaction: string; fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'ok', fileExtension }); this.paneCompositeService.openPaneComposite(EXTENSIONS_VIEWLET_ID, ViewContainerLocation.Sidebar, true) .then(viewlet => viewlet?.getViewPaneContainer() as IExtensionsViewPaneContainer) .then(viewlet => { @@ -351,13 +351,13 @@ export class FileBasedRecommendations extends ExtensionRecommendations { JSON.stringify(fileExtensionSuggestionIgnoreList), StorageScope.GLOBAL, StorageTarget.USER); - this.telemetryService.publicLog2<{ userReaction: string, fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'neverShowAgain', fileExtension }); + this.telemetryService.publicLog2<{ userReaction: string; fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'neverShowAgain', fileExtension }); } }], { sticky: true, onCancel: () => { - this.telemetryService.publicLog2<{ userReaction: string, fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'cancelled', fileExtension }); + this.telemetryService.publicLog2<{ userReaction: string; fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'cancelled', fileExtension }); } } ); diff --git a/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.ts b/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.ts index 5a5b43ed44769..84ec5199f0aad 100644 --- a/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.ts +++ b/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.ts @@ -78,7 +78,7 @@ export class WorkspaceRecommendations extends ExtensionRecommendations { } } - private async validateExtensions(contents: IExtensionsConfigContent[]): Promise<{ validRecommendations: string[], invalidRecommendations: string[], message: string }> { + private async validateExtensions(contents: IExtensionsConfigContent[]): Promise<{ validRecommendations: string[]; invalidRecommendations: string[]; message: string }> { const validExtensions: string[] = []; const invalidExtensions: string[] = []; diff --git a/src/vs/workbench/contrib/extensions/common/extensions.ts b/src/vs/workbench/contrib/extensions/common/extensions.ts index 135ba06042a49..b6744153baf8d 100644 --- a/src/vs/workbench/contrib/extensions/common/extensions.ts +++ b/src/vs/workbench/contrib/extensions/common/extensions.ts @@ -46,7 +46,7 @@ export interface IExtension { readonly identifier: IExtensionIdentifier; readonly publisher: string; readonly publisherDisplayName: string; - readonly publisherDomain?: { link: string, verified: boolean }; + readonly publisherDomain?: { link: string; verified: boolean }; readonly version: string; readonly latestVersion: string; readonly hasPreReleaseVersion: boolean; @@ -77,7 +77,7 @@ export interface IExtension { readonly local?: ILocalExtension; gallery?: IGalleryExtension; readonly isMalicious: boolean; - readonly isUnsupported: boolean | { preReleaseExtension: { id: string, displayName: string } }; + readonly isUnsupported: boolean | { preReleaseExtension: { id: string; displayName: string } }; } export const SERVICE_ID = 'extensionsWorkbenchService'; diff --git a/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts b/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts index e8bfa7eb18672..4d45de8f605f3 100644 --- a/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts +++ b/src/vs/workbench/contrib/extensions/common/extensionsUtils.ts @@ -57,7 +57,7 @@ export class KeymapExtensions extends Disposable implements IWorkbenchContributi private promptForDisablingOtherKeymaps(newKeymap: IExtensionStatus, oldKeymaps: IExtensionStatus[]): void { const onPrompt = (confirmed: boolean) => { - const telemetryData: { [key: string]: any; } = { + const telemetryData: { [key: string]: any } = { newKeymap: newKeymap.identifier, oldKeymaps: oldKeymaps.map(k => k.identifier), confirmed diff --git a/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions.ts b/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions.ts index ece72ff038c73..20154ad70e6d8 100644 --- a/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions.ts +++ b/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions.ts @@ -104,7 +104,7 @@ export async function createSlowExtensionAction( return undefined; } - const data = <{ total_count: number; }>JSON.parse(rawText); + const data = <{ total_count: number }>JSON.parse(rawText); if (!data || typeof data.total_count !== 'number') { return undefined; } else if (data.total_count === 0) { diff --git a/src/vs/workbench/contrib/extensions/electron-sandbox/reportExtensionIssueAction.ts b/src/vs/workbench/contrib/extensions/electron-sandbox/reportExtensionIssueAction.ts index f1755db8c4042..9e85ffd28e48f 100644 --- a/src/vs/workbench/contrib/extensions/electron-sandbox/reportExtensionIssueAction.ts +++ b/src/vs/workbench/contrib/extensions/electron-sandbox/reportExtensionIssueAction.ts @@ -28,7 +28,7 @@ export class ReportExtensionIssueAction extends Action { description: IExtensionDescription; marketplaceInfo: IExtension; status?: IExtensionsStatus; - unresponsiveProfile?: IExtensionHostProfile + unresponsiveProfile?: IExtensionHostProfile; }, @IOpenerService private readonly openerService: IOpenerService, @IClipboardService private readonly clipboardService: IClipboardService, @@ -51,7 +51,7 @@ export class ReportExtensionIssueAction extends Action { description: IExtensionDescription; marketplaceInfo: IExtension; status?: IExtensionsStatus; - unresponsiveProfile?: IExtensionHostProfile + unresponsiveProfile?: IExtensionHostProfile; }): Promise { let baseUrl = extension.marketplaceInfo && extension.marketplaceInfo.type === ExtensionType.User && extension.description.repository ? extension.description.repository.url : undefined; if (!baseUrl && extension.description.isBuiltin) { diff --git a/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.ts b/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.ts index 24a9f06dcee03..6b3229c7bf392 100644 --- a/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.ts +++ b/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.ts @@ -12,7 +12,7 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten interface RegisteredExternalOpener { readonly extensionId: string; - isCurrentlyRegistered: boolean + isCurrentlyRegistered: boolean; } interface OpenersMemento { diff --git a/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.ts b/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.ts index 6cc9f55b2b0b2..6d7c109de5443 100644 --- a/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.ts +++ b/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.ts @@ -39,7 +39,7 @@ export interface IExternalUriOpener { } export interface IExternalUriOpenerService { - readonly _serviceBrand: undefined + readonly _serviceBrand: undefined; /** * Registers a provider for external resources openers. @@ -50,7 +50,7 @@ export interface IExternalUriOpenerService { * Get the configured IExternalUriOpener for the the uri. * If there is no opener configured, then returns the first opener that can handle the uri. */ - getOpener(uri: URI, ctx: { sourceUri: URI, preferredOpenerId?: string }, token: CancellationToken): Promise; + getOpener(uri: URI, ctx: { sourceUri: URI; preferredOpenerId?: string }, token: CancellationToken): Promise; } export class ExternalUriOpenerService extends Disposable implements IExternalUriOpenerService, IExternalOpener { @@ -76,7 +76,7 @@ export class ExternalUriOpenerService extends Disposable implements IExternalUri return { dispose: remove }; } - private async getOpeners(targetUri: URI, allowOptional: boolean, ctx: { sourceUri: URI, preferredOpenerId?: string }, token: CancellationToken): Promise { + private async getOpeners(targetUri: URI, allowOptional: boolean, ctx: { sourceUri: URI; preferredOpenerId?: string }, token: CancellationToken): Promise { const allOpeners = await this.getAllOpenersForUri(targetUri); if (allOpeners.size === 0) { @@ -104,7 +104,7 @@ export class ExternalUriOpenerService extends Disposable implements IExternalUri } // Then check to see if there is a valid opener - const validOpeners: Array<{ opener: IExternalUriOpener, priority: modes.ExternalUriOpenerPriority }> = []; + const validOpeners: Array<{ opener: IExternalUriOpener; priority: modes.ExternalUriOpenerPriority }> = []; await Promise.all(Array.from(allOpeners.values()).map(async opener => { let priority: modes.ExternalUriOpenerPriority; try { @@ -141,7 +141,7 @@ export class ExternalUriOpenerService extends Disposable implements IExternalUri return validOpeners.map(value => value.opener); } - async openExternal(href: string, ctx: { sourceUri: URI, preferredOpenerId?: string }, token: CancellationToken): Promise { + async openExternal(href: string, ctx: { sourceUri: URI; preferredOpenerId?: string }, token: CancellationToken): Promise { const targetUri = typeof href === 'string' ? URI.parse(href) : href; @@ -156,7 +156,7 @@ export class ExternalUriOpenerService extends Disposable implements IExternalUri return this.showOpenerPrompt(allOpeners, targetUri, ctx, token); } - async getOpener(targetUri: URI, ctx: { sourceUri: URI, preferredOpenerId?: string }, token: CancellationToken): Promise { + async getOpener(targetUri: URI, ctx: { sourceUri: URI; preferredOpenerId?: string }, token: CancellationToken): Promise { const allOpeners = await this.getOpeners(targetUri, true, ctx, token); if (allOpeners.length >= 1) { return allOpeners[0]; diff --git a/src/vs/workbench/contrib/files/browser/explorerService.ts b/src/vs/workbench/contrib/files/browser/explorerService.ts index 59bff88721622..a12970017cf3b 100644 --- a/src/vs/workbench/contrib/files/browser/explorerService.ts +++ b/src/vs/workbench/contrib/files/browser/explorerService.ts @@ -32,7 +32,7 @@ export class ExplorerService implements IExplorerService { 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 private readonly disposables = new DisposableStore(); - private editable: { stat: ExplorerItem, data: IEditableData } | undefined; + private editable: { stat: ExplorerItem; data: IEditableData } | undefined; private _sortOrder: SortOrder; private _lexicographicOptions: LexicographicOptions; private cutItems: ExplorerItem[] | undefined; @@ -153,7 +153,7 @@ export class ExplorerService implements IExplorerService { return this.view.getContext(respectMultiSelection); } - async applyBulkEdit(edit: ResourceFileEdit[], options: { undoLabel: string, progressLabel: string, confirmBeforeUndo?: boolean, progressLocation?: ProgressLocation.Explorer | ProgressLocation.Window }): Promise { + async applyBulkEdit(edit: ResourceFileEdit[], options: { undoLabel: string; progressLabel: string; confirmBeforeUndo?: boolean; progressLocation?: ProgressLocation.Explorer | ProgressLocation.Window }): Promise { const cancellationTokenSource = new CancellationTokenSource(); const promise = this.progressService.withProgress({ location: options.progressLocation || ProgressLocation.Window, @@ -219,7 +219,7 @@ export class ExplorerService implements IExplorerService { return !!this.cutItems && this.cutItems.indexOf(item) >= 0; } - getEditable(): { stat: ExplorerItem, data: IEditableData } | undefined { + getEditable(): { stat: ExplorerItem; data: IEditableData } | undefined { return this.editable; } diff --git a/src/vs/workbench/contrib/files/browser/fileActions.ts b/src/vs/workbench/contrib/files/browser/fileActions.ts index 3e336a2aa73c0..b8dbf54e355fe 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.ts @@ -230,7 +230,7 @@ async function deleteFiles(explorerService: IExplorerService, workingCopyFileSer } } -function getMoveToTrashMessage(distinctElements: ExplorerItem[]): { message: string, detail: string } { +function getMoveToTrashMessage(distinctElements: ExplorerItem[]): { message: string; detail: string } { if (containsBothDirectoryAndFile(distinctElements)) { return { message: nls.localize('confirmMoveTrashMessageFilesAndDirectories', "Are you sure you want to delete the following {0} files/directories and their contents?", distinctElements.length), @@ -259,7 +259,7 @@ function getMoveToTrashMessage(distinctElements: ExplorerItem[]): { message: str return { message: nls.localize('confirmMoveTrashMessageFile', "Are you sure you want to delete '{0}'?", distinctElements[0].name), detail: '' }; } -function getDeleteMessage(distinctElements: ExplorerItem[]): { message: string, detail: string } { +function getDeleteMessage(distinctElements: ExplorerItem[]): { message: string; detail: string } { if (containsBothDirectoryAndFile(distinctElements)) { return { message: nls.localize('confirmDeleteMessageFilesAndDirectories', "Are you sure you want to permanently delete the following {0} files/directories and their contents?", distinctElements.length), @@ -296,7 +296,7 @@ function containsBothDirectoryAndFile(distinctElements: ExplorerItem[]): boolean } -export function findValidPasteFileTarget(explorerService: IExplorerService, targetFolder: ExplorerItem, fileToPaste: { resource: URI, isDirectory?: boolean, allowOverwrite: boolean }, incrementalNaming: 'simple' | 'smart'): URI { +export function findValidPasteFileTarget(explorerService: IExplorerService, targetFolder: ExplorerItem, fileToPaste: { resource: URI; isDirectory?: boolean; allowOverwrite: boolean }, incrementalNaming: 'simple' | 'smart'): URI { let name = resources.basenameOrAuthority(fileToPaste.resource); let candidate = resources.joinPath(targetFolder.resource, name); @@ -622,7 +622,7 @@ export class ShowOpenedFileInNewWindow extends Action { } } -export function validateFileName(pathService: IPathService, item: ExplorerItem, name: string, os: OperatingSystem): { content: string, severity: Severity } | null { +export function validateFileName(pathService: IPathService, item: ExplorerItem, name: string, os: OperatingSystem): { content: string; severity: Severity } | null { // Produce a well formed file name name = getWellFormedFileName(name); diff --git a/src/vs/workbench/contrib/files/browser/fileCommands.ts b/src/vs/workbench/contrib/files/browser/fileCommands.ts index a4563b415f892..80cfe25941b26 100644 --- a/src/vs/workbench/contrib/files/browser/fileCommands.ts +++ b/src/vs/workbench/contrib/files/browser/fileCommands.ts @@ -685,7 +685,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ } ] }, - handler: async (accessor, args?: { viewType: string; }) => { + handler: async (accessor, args?: { viewType: string }) => { const editorService = accessor.get(IEditorService); await editorService.openEditor({ diff --git a/src/vs/workbench/contrib/files/browser/fileImportExport.ts b/src/vs/workbench/contrib/files/browser/fileImportExport.ts index f9bd8a4575c66..5c92bd9935a1b 100644 --- a/src/vs/workbench/contrib/files/browser/fileImportExport.ts +++ b/src/vs/workbench/contrib/files/browser/fileImportExport.ts @@ -64,7 +64,7 @@ interface IWebkitDataTransferItemEntry { } interface IWebkitDataTransferItemEntryReader { - readEntries(resolve: (file: IWebkitDataTransferItemEntry[]) => void, reject: () => void): void + readEntries(resolve: (file: IWebkitDataTransferItemEntry[]) => void, reject: () => void): void; } export class BrowserFileUpload { @@ -140,7 +140,7 @@ export class BrowserFileUpload { entries.push(item.webkitGetAsEntry()); } - const results: { isFile: boolean, resource: URI }[] = []; + const results: { isFile: boolean; resource: URI }[] = []; const operation: IBrowserUploadOperation = { startTime: Date.now(), progressScheduler: new RunOnceWorker(steps => { progress.report(steps[steps.length - 1]); }, 1000), @@ -194,7 +194,7 @@ export class BrowserFileUpload { } } - private async doUploadEntry(entry: IWebkitDataTransferItemEntry, parentResource: URI, target: ExplorerItem | undefined, progress: IProgress, operation: IBrowserUploadOperation, token: CancellationToken): Promise<{ isFile: boolean, resource: URI } | undefined> { + private async doUploadEntry(entry: IWebkitDataTransferItemEntry, parentResource: URI, target: ExplorerItem | undefined, progress: IProgress, operation: IBrowserUploadOperation, token: CancellationToken): Promise<{ isFile: boolean; resource: URI } | undefined> { if (token.isCancellationRequested || !entry.name || (!entry.isFile && !entry.isDirectory)) { return undefined; } diff --git a/src/vs/workbench/contrib/files/browser/files.ts b/src/vs/workbench/contrib/files/browser/files.ts index 41f2da785bfa3..3baa0f0267979 100644 --- a/src/vs/workbench/contrib/files/browser/files.ts +++ b/src/vs/workbench/contrib/files/browser/files.ts @@ -26,7 +26,7 @@ export interface IExplorerService { getContext(respectMultiSelection: boolean): ExplorerItem[]; hasViewFocus(): boolean; setEditable(stat: ExplorerItem, data: IEditableData | null): Promise; - getEditable(): { stat: ExplorerItem, data: IEditableData } | undefined; + getEditable(): { stat: ExplorerItem; data: IEditableData } | undefined; getEditableData(stat: ExplorerItem): IEditableData | undefined; // If undefined is passed checks if any element is currently being edited. isEditable(stat: ExplorerItem | undefined): boolean; @@ -35,7 +35,7 @@ export interface IExplorerService { refresh(): Promise; setToCopy(stats: ExplorerItem[], cut: boolean): Promise; isCut(stat: ExplorerItem): boolean; - applyBulkEdit(edit: ResourceFileEdit[], options: { undoLabel: string, progressLabel: string, confirmBeforeUndo?: boolean, progressLocation?: ProgressLocation.Explorer | ProgressLocation.Window }): Promise; + applyBulkEdit(edit: ResourceFileEdit[], options: { undoLabel: string; progressLabel: string; confirmBeforeUndo?: boolean; progressLocation?: ProgressLocation.Explorer | ProgressLocation.Window }): Promise; /** * Selects and reveal the file element provided by the given resource if its found in the explorer. diff --git a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts index 775237385768c..7d8a01c841fdc 100644 --- a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts @@ -1198,7 +1198,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop { } } -function getIconLabelNameFromHTMLElement(target: HTMLElement | EventTarget | Element | null): { element: HTMLElement, count: number, index: number } | null { +function getIconLabelNameFromHTMLElement(target: HTMLElement | EventTarget | Element | null): { element: HTMLElement; count: number; index: number } | null { if (!(target instanceof HTMLElement)) { return null; } diff --git a/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts b/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts index 6e84f2245061a..962cdff6e9f58 100644 --- a/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts @@ -378,7 +378,7 @@ export class OpenEditorsView extends ViewPane { return this.elements.findIndex(e => e instanceof OpenEditor && e.editor === editor && e.group.id === group.id); } - private openEditor(element: OpenEditor, options: { preserveFocus?: boolean; pinned?: boolean; sideBySide?: boolean; }): void { + private openEditor(element: OpenEditor, options: { preserveFocus?: boolean; pinned?: boolean; sideBySide?: boolean }): void { if (element) { this.telemetryService.publicLog2('workbenchActionExecuted', { id: 'workbench.files.openFile', from: 'openEditors' }); diff --git a/src/vs/workbench/contrib/files/common/explorerModel.ts b/src/vs/workbench/contrib/files/common/explorerModel.ts index 0fa3602b52b62..03a1fab01a8de 100644 --- a/src/vs/workbench/contrib/files/common/explorerModel.ts +++ b/src/vs/workbench/contrib/files/common/explorerModel.ts @@ -413,7 +413,7 @@ export class ExplorerItem { * Tells this stat that it was renamed. This requires changes to all children of this stat (if any) * so that the path property can be updated properly. */ - rename(renamedStat: { name: string, mtime?: number }): void { + rename(renamedStat: { name: string; mtime?: number }): void { // Merge a subset of Properties that can change on rename this.updateName(renamedStat.name); diff --git a/src/vs/workbench/contrib/files/common/files.ts b/src/vs/workbench/contrib/files/common/files.ts index f8010d20ccca3..95ec6454ad05a 100644 --- a/src/vs/workbench/contrib/files/common/files.ts +++ b/src/vs/workbench/contrib/files/common/files.ts @@ -102,9 +102,9 @@ export interface IFilesConfiguration extends PlatformIFilesConfiguration, IWorkb fileNesting: { enabled: boolean; expand: boolean; - patterns: { [parent: string]: string } - } - } + patterns: { [parent: string]: string }; + }; + }; }; editor: IEditorOptions; } diff --git a/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts b/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts index 04ede62fb4ea1..cedf455a287ab 100644 --- a/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts +++ b/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts @@ -96,7 +96,7 @@ export class InteractiveDocumentContribution extends Disposable implements IWork if (_backupId instanceof VSBuffer) { const backup = _backupId.toString(); try { - const document = JSON.parse(backup) as { cells: { kind: CellKind, language: string, metadata: any, mime: string | undefined, content: string, outputs?: ICellOutput[] }[] }; + const document = JSON.parse(backup) as { cells: { kind: CellKind; language: string; metadata: any; mime: string | undefined; content: string; outputs?: ICellOutput[] }[] }; return { data: { metadata: {}, @@ -266,7 +266,7 @@ export class InteractiveEditorSerializer implements IEditorSerializer { } deserialize(instantiationService: IInstantiationService, raw: string) { - type Data = { resource: URI, inputResource: URI; }; + type Data = { resource: URI; inputResource: URI }; const data = parse(raw); if (!data) { return undefined; @@ -337,7 +337,7 @@ registerAction2(class extends Action2 { }); } - async run(accessor: ServicesAccessor, showOptions?: number | { viewColumn?: number, preserveFocus?: boolean }, resource?: URI, id?: string, title?: string): Promise<{ notebookUri: URI, inputUri: URI; notebookEditorId?: string }> { + async run(accessor: ServicesAccessor, showOptions?: number | { viewColumn?: number; preserveFocus?: boolean }, resource?: URI, id?: string, title?: string): Promise<{ notebookUri: URI; inputUri: URI; notebookEditorId?: string }> { const editorService = accessor.get(IEditorService); const editorGroupService = accessor.get(IEditorGroupsService); const historyService = accessor.get(IInteractiveHistoryService); @@ -355,7 +355,7 @@ registerAction2(class extends Action2 { const editorInput = editors[0].editor as InteractiveEditorInput; const currentGroup = editors[0].groupId; const editor = await editorService.openEditor(editorInput, editorOptions, currentGroup); - const editorControl = editor?.getControl() as { notebookEditor: NotebookEditorWidget | undefined, codeEditor: CodeEditorWidget; } | undefined; + const editorControl = editor?.getControl() as { notebookEditor: NotebookEditorWidget | undefined; codeEditor: CodeEditorWidget } | undefined; return { notebookUri: editorInput.resource!, @@ -393,7 +393,7 @@ registerAction2(class extends Action2 { const editorInput = InteractiveEditorInput.create(accessor.get(IInstantiationService), notebookUri, inputUri, title); historyService.clearHistory(notebookUri); const editorPane = await editorService.openEditor(editorInput, editorOptions, group); - const editorControl = editorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined, codeEditor: CodeEditorWidget; } | undefined; + const editorControl = editorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined; codeEditor: CodeEditorWidget } | undefined; // Extensions must retain references to these URIs to manipulate the interactive editor return { notebookUri, inputUri, notebookEditorId: editorControl?.notebookEditor?.getId() }; } @@ -428,7 +428,7 @@ registerAction2(class extends Action2 { const editorService = accessor.get(IEditorService); const bulkEditService = accessor.get(IBulkEditService); const historyService = accessor.get(IInteractiveHistoryService); - const editorControl = editorService.activeEditorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined, codeEditor: CodeEditorWidget; } | undefined; + const editorControl = editorService.activeEditorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined; codeEditor: CodeEditorWidget } | undefined; if (editorControl && editorControl.notebookEditor && editorControl.codeEditor) { const notebookDocument = editorControl.notebookEditor.textModel; @@ -492,7 +492,7 @@ registerAction2(class extends Action2 { async run(accessor: ServicesAccessor): Promise { const editorService = accessor.get(IEditorService); - const editorControl = editorService.activeEditorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined, codeEditor: CodeEditorWidget; } | undefined; + const editorControl = editorService.activeEditorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined; codeEditor: CodeEditorWidget } | undefined; if (editorControl && editorControl.notebookEditor && editorControl.codeEditor) { const notebookDocument = editorControl.notebookEditor.textModel; @@ -529,7 +529,7 @@ registerAction2(class extends Action2 { async run(accessor: ServicesAccessor): Promise { const editorService = accessor.get(IEditorService); const historyService = accessor.get(IInteractiveHistoryService); - const editorControl = editorService.activeEditorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined, codeEditor: CodeEditorWidget; } | undefined; + const editorControl = editorService.activeEditorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined; codeEditor: CodeEditorWidget } | undefined; if (editorControl && editorControl.notebookEditor && editorControl.codeEditor) { const notebookDocument = editorControl.notebookEditor.textModel; @@ -568,7 +568,7 @@ registerAction2(class extends Action2 { async run(accessor: ServicesAccessor): Promise { const editorService = accessor.get(IEditorService); const historyService = accessor.get(IInteractiveHistoryService); - const editorControl = editorService.activeEditorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined, codeEditor: CodeEditorWidget; } | undefined; + const editorControl = editorService.activeEditorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined; codeEditor: CodeEditorWidget } | undefined; if (editorControl && editorControl.notebookEditor && editorControl.codeEditor) { const notebookDocument = editorControl.notebookEditor.textModel; @@ -602,7 +602,7 @@ registerAction2(class extends Action2 { async run(accessor: ServicesAccessor): Promise { const editorService = accessor.get(IEditorService); - const editorControl = editorService.activeEditorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined, codeEditor: CodeEditorWidget; } | undefined; + const editorControl = editorService.activeEditorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined; codeEditor: CodeEditorWidget } | undefined; if (editorControl && editorControl.notebookEditor && editorControl.codeEditor) { if (editorControl.notebookEditor.getLength() === 0) { @@ -631,7 +631,7 @@ registerAction2(class extends Action2 { async run(accessor: ServicesAccessor): Promise { const editorService = accessor.get(IEditorService); - const editorControl = editorService.activeEditorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined, codeEditor: CodeEditorWidget; } | undefined; + const editorControl = editorService.activeEditorPane?.getControl() as { notebookEditor: NotebookEditorWidget | undefined; codeEditor: CodeEditorWidget } | undefined; if (editorControl && editorControl.notebookEditor && editorControl.codeEditor) { if (editorControl.notebookEditor.getLength() === 0) { diff --git a/src/vs/workbench/contrib/interactive/browser/interactiveDocumentService.ts b/src/vs/workbench/contrib/interactive/browser/interactiveDocumentService.ts index 31427351f5bb4..dafe865391593 100644 --- a/src/vs/workbench/contrib/interactive/browser/interactiveDocumentService.ts +++ b/src/vs/workbench/contrib/interactive/browser/interactiveDocumentService.ts @@ -12,17 +12,17 @@ export const IInteractiveDocumentService = createDecorator; - onWillRemoveInteractiveDocument: Event<{ notebookUri: URI; inputUri: URI; }>; + onWillAddInteractiveDocument: Event<{ notebookUri: URI; inputUri: URI; languageId: string }>; + onWillRemoveInteractiveDocument: Event<{ notebookUri: URI; inputUri: URI }>; willCreateInteractiveDocument(notebookUri: URI, inputUri: URI, languageId: string): void; willRemoveInteractiveDocument(notebookUri: URI, inputUri: URI): void; } export class InteractiveDocumentService extends Disposable implements IInteractiveDocumentService { declare readonly _serviceBrand: undefined; - private readonly _onWillAddInteractiveDocument = this._register(new Emitter<{ notebookUri: URI; inputUri: URI; languageId: string; }>()); + private readonly _onWillAddInteractiveDocument = this._register(new Emitter<{ notebookUri: URI; inputUri: URI; languageId: string }>()); onWillAddInteractiveDocument = this._onWillAddInteractiveDocument.event; - private readonly _onWillRemoveInteractiveDocument = this._register(new Emitter<{ notebookUri: URI; inputUri: URI; }>()); + private readonly _onWillRemoveInteractiveDocument = this._register(new Emitter<{ notebookUri: URI; inputUri: URI }>()); onWillRemoveInteractiveDocument = this._onWillRemoveInteractiveDocument.event; constructor() { diff --git a/src/vs/workbench/contrib/interactive/browser/interactiveEditor.ts b/src/vs/workbench/contrib/interactive/browser/interactiveEditor.ts index d95413eb75cfc..7b3ce552e6267 100644 --- a/src/vs/workbench/contrib/interactive/browser/interactiveEditor.ts +++ b/src/vs/workbench/contrib/interactive/browser/interactiveEditor.ts @@ -717,7 +717,7 @@ export class InteractiveEditor extends EditorPane { super.clearInput(); } - override getControl(): { notebookEditor: NotebookEditorWidget | undefined, codeEditor: CodeEditorWidget; } { + override getControl(): { notebookEditor: NotebookEditorWidget | undefined; codeEditor: CodeEditorWidget } { return { notebookEditor: this.#notebookWidget.value, codeEditor: this.#codeEditorWidget diff --git a/src/vs/workbench/contrib/markers/browser/markers.ts b/src/vs/workbench/contrib/markers/browser/markers.ts index 785ec070c8557..a62b4a553a44a 100644 --- a/src/vs/workbench/contrib/markers/browser/markers.ts +++ b/src/vs/workbench/contrib/markers/browser/markers.ts @@ -19,10 +19,10 @@ export interface IMarkersView extends IView { readonly onDidFocusFilter: Event; readonly onDidClearFilterText: Event; readonly filters: MarkersFilters; - readonly onDidChangeFilterStats: Event<{ total: number, filtered: number }>; + readonly onDidChangeFilterStats: Event<{ total: number; filtered: number }>; focusFilter(): void; clearFilterText(): void; - getFilterStats(): { total: number, filtered: number }; + getFilterStats(): { total: number; filtered: number }; getFocusElement(): MarkerElement | undefined; getFocusedSelectedElements(): MarkerElement[] | null; diff --git a/src/vs/workbench/contrib/markers/browser/markersFilterOptions.ts b/src/vs/workbench/contrib/markers/browser/markersFilterOptions.ts index 53c90cd8856f4..e8e5ca44edf7f 100644 --- a/src/vs/workbench/contrib/markers/browser/markersFilterOptions.ts +++ b/src/vs/workbench/contrib/markers/browser/markersFilterOptions.ts @@ -14,15 +14,15 @@ import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity' export class ResourceGlobMatcher { private readonly globalExpression: ParsedExpression; - private readonly expressionsByRoot: TernarySearchTree; + private readonly expressionsByRoot: TernarySearchTree; constructor( globalExpression: IExpression, - rootExpressions: { root: URI, expression: IExpression }[], + rootExpressions: { root: URI; expression: IExpression }[], uriIdentityService: IUriIdentityService ) { this.globalExpression = parse(globalExpression); - this.expressionsByRoot = TernarySearchTree.forUris<{ root: URI, expression: ParsedExpression }>(uri => uriIdentityService.extUri.ignorePathCasing(uri)); + this.expressionsByRoot = TernarySearchTree.forUris<{ root: URI; expression: ParsedExpression }>(uri => uriIdentityService.extUri.ignorePathCasing(uri)); for (const expression of rootExpressions) { this.expressionsByRoot.set(expression.root, { root: expression.root, expression: parse(expression.expression) }); } @@ -48,7 +48,7 @@ export class FilterOptions { readonly showWarnings: boolean = false; readonly showErrors: boolean = false; readonly showInfos: boolean = false; - readonly textFilter: { readonly text: string, readonly negate: boolean }; + readonly textFilter: { readonly text: string; readonly negate: boolean }; readonly excludesMatcher: ResourceGlobMatcher; readonly includesMatcher: ResourceGlobMatcher; @@ -56,7 +56,7 @@ export class FilterOptions { constructor( readonly filter: string, - filesExclude: { root: URI, expression: IExpression }[] | IExpression, + filesExclude: { root: URI; expression: IExpression }[] | IExpression, showWarnings: boolean, showErrors: boolean, showInfos: boolean, diff --git a/src/vs/workbench/contrib/markers/browser/markersTreeViewer.ts b/src/vs/workbench/contrib/markers/browser/markersTreeViewer.ts index a534be1456495..2da2b202c5157 100644 --- a/src/vs/workbench/contrib/markers/browser/markersTreeViewer.ts +++ b/src/vs/workbench/contrib/markers/browser/markersTreeViewer.ts @@ -695,7 +695,7 @@ export class MarkersViewModel extends Disposable { private readonly _onDidChange: Emitter = this._register(new Emitter()); readonly onDidChange: Event = this._onDidChange.event; - private readonly markersViewStates: Map = new Map(); + private readonly markersViewStates: Map = new Map(); private readonly markersPerResource: Map = new Map(); private bulkUpdate: boolean = false; diff --git a/src/vs/workbench/contrib/markers/browser/markersView.ts b/src/vs/workbench/contrib/markers/browser/markersView.ts index d510458e2eda0..2685f1b4f6fd5 100644 --- a/src/vs/workbench/contrib/markers/browser/markersView.ts +++ b/src/vs/workbench/contrib/markers/browser/markersView.ts @@ -84,9 +84,9 @@ export class MarkersView extends ViewPane implements IMarkersView { private readonly panelState: MementoObject; - private _onDidChangeFilterStats = this._register(new Emitter<{ total: number, filtered: number }>()); - readonly onDidChangeFilterStats: Event<{ total: number, filtered: number }> = this._onDidChangeFilterStats.event; - private cachedFilterStats: { total: number; filtered: number; } | undefined = undefined; + private _onDidChangeFilterStats = this._register(new Emitter<{ total: number; filtered: number }>()); + readonly onDidChangeFilterStats: Event<{ total: number; filtered: number }> = this._onDidChangeFilterStats.event; + private cachedFilterStats: { total: number; filtered: number } | undefined = undefined; private currentResourceGotAddedToMarkersData: boolean = false; private readonly markersViewModel: MarkersViewModel; @@ -332,7 +332,7 @@ export class MarkersView extends ViewPane implements IMarkersView { this.renderMessage(); } - private getFilesExcludeExpressions(): { root: URI, expression: IExpression }[] | IExpression { + private getFilesExcludeExpressions(): { root: URI; expression: IExpression }[] | IExpression { if (!this.filters.excludedFiles) { return []; } @@ -814,7 +814,7 @@ export class MarkersView extends ViewPane implements IMarkersView { return super.getActionViewItem(action); } - getFilterStats(): { total: number; filtered: number; } { + getFilterStats(): { total: number; filtered: number } { if (!this.cachedFilterStats) { this.cachedFilterStats = this.computeFilterStats(); } @@ -822,7 +822,7 @@ export class MarkersView extends ViewPane implements IMarkersView { return this.cachedFilterStats; } - private computeFilterStats(): { total: number; filtered: number; } { + private computeFilterStats(): { total: number; filtered: number } { let filtered = 0; if (this.tree) { const root = this.tree.getNode(); diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.ts b/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.ts index e1d95172e57de..51d32c3a2dc44 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.ts @@ -95,7 +95,7 @@ registerAction2(class extends Action2 { }); } - async run(accessor: ServicesAccessor, context?: SelectKernelReturnArgs | { ui?: boolean, notebookEditor?: NotebookEditorWidget }): Promise { + async run(accessor: ServicesAccessor, context?: SelectKernelReturnArgs | { ui?: boolean; notebookEditor?: NotebookEditorWidget }): Promise { const notebookKernelService = accessor.get(INotebookKernelService); const editorService = accessor.get(IEditorService); const quickInputService = accessor.get(IQuickInputService); @@ -153,7 +153,7 @@ registerAction2(class extends Action2 { } if (!newKernel) { - type KernelPick = IQuickPickItem & { kernel: INotebookKernel; }; + type KernelPick = IQuickPickItem & { kernel: INotebookKernel }; const configButton: IQuickInputButton = { iconClass: ThemeIcon.asClassName(configureKernelIcon), tooltip: nls.localize('notebook.promptKernel.setDefaultTooltip', "Set as default for '{0}' notebooks", editor.textModel.viewType) diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.ts b/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.ts index 55174579cb381..06ff1c4900d45 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.ts @@ -25,7 +25,7 @@ export class FindModel extends Disposable { protected _findMatchesStarts: PrefixSumComputer | null = null; private _currentMatch: number = -1; private _allMatchesDecorations: ICellModelDecorations[] = []; - private _currentMatchDecorations: { kind: 'input'; decorations: ICellModelDecorations[]; } | { kind: 'output'; index: number } | null = null; + private _currentMatchDecorations: { kind: 'input'; decorations: ICellModelDecorations[] } | { kind: 'output'; index: number } | null = null; private readonly _throttledDelayer: Delayer; private _computePromise: CancelablePromise | null = null; private readonly _modelDisposable = this._register(new DisposableStore()); diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.ts b/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.ts index ee74412fd443a..5f43f2d36f84b 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.ts @@ -210,7 +210,7 @@ class NotebookFindInput extends FindInput { this._filterButtonContainer.style.backgroundColor = this._filterChecked && this.inputActiveOptionBackground ? this.inputActiveOptionBackground.toString() : ''; } - getCellToolbarActions(menu: IMenu): { primary: IAction[], secondary: IAction[]; } { + getCellToolbarActions(menu: IMenu): { primary: IAction[]; secondary: IAction[] } { const primary: IAction[] = []; const secondary: IAction[] = []; const result = { primary, secondary }; @@ -455,7 +455,7 @@ export abstract class SimpleFindReplaceWidget extends Widget { this._innerReplaceDomNode.appendChild(this._replaceAllBtn.domNode); } - getCellToolbarActions(menu: IMenu): { primary: IAction[], secondary: IAction[]; } { + getCellToolbarActions(menu: IMenu): { primary: IAction[]; secondary: IAction[] } { const primary: IAction[] = []; const secondary: IAction[] = []; const result = { primary, secondary }; diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.ts b/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.ts index 3fcf08b7df63d..44ffbe69d1f3f 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.ts @@ -225,7 +225,7 @@ class NotebookOutlineAccessibility implements IListAccessibilityProvider { - getKeyboardNavigationLabel(element: OutlineEntry): { toString(): string | undefined; } | { toString(): string | undefined; }[] | undefined { + getKeyboardNavigationLabel(element: OutlineEntry): { toString(): string | undefined } | { toString(): string | undefined }[] | undefined { return element.label; } } diff --git a/src/vs/workbench/contrib/notebook/browser/controller/apiActions.ts b/src/vs/workbench/contrib/notebook/browser/controller/apiActions.ts index f06cabc40c997..8e6f97a22166b 100644 --- a/src/vs/workbench/contrib/notebook/browser/controller/apiActions.ts +++ b/src/vs/workbench/contrib/notebook/browser/controller/apiActions.ts @@ -13,8 +13,8 @@ import { INotebookService } from 'vs/workbench/contrib/notebook/common/notebookS CommandsRegistry.registerCommand('_resolveNotebookContentProvider', (accessor, args): { viewType: string; displayName: string; - options: { transientOutputs: boolean; transientCellMetadata: TransientCellMetadata; transientDocumentMetadata: TransientDocumentMetadata; }; - filenamePattern: (string | glob.IRelativePattern | { include: string | glob.IRelativePattern, exclude: string | glob.IRelativePattern; })[]; + options: { transientOutputs: boolean; transientCellMetadata: TransientCellMetadata; transientDocumentMetadata: TransientDocumentMetadata }; + filenamePattern: (string | glob.IRelativePattern | { include: string | glob.IRelativePattern; exclude: string | glob.IRelativePattern })[]; }[] => { const notebookService = accessor.get(INotebookService); const contentProviders = notebookService.getContributedNotebookTypes(); @@ -36,7 +36,7 @@ CommandsRegistry.registerCommand('_resolveNotebookContentProvider', (accessor, a } return null; - }).filter(pattern => pattern !== null) as (string | glob.IRelativePattern | { include: string | glob.IRelativePattern, exclude: string | glob.IRelativePattern; })[]; + }).filter(pattern => pattern !== null) as (string | glob.IRelativePattern | { include: string | glob.IRelativePattern; exclude: string | glob.IRelativePattern })[]; return { viewType: provider.id, diff --git a/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.ts b/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.ts index e3355f006fa02..66f576aa3f49a 100644 --- a/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.ts +++ b/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.ts @@ -336,7 +336,7 @@ export async function copyCellRange(context: INotebookCellActionContext, directi } } -export async function joinNotebookCells(editor: IActiveNotebookEditor, range: ICellRange, direction: 'above' | 'below', constraint?: CellKind): Promise<{ edits: ResourceEdit[], cell: ICellViewModel, endFocus: ICellRange, endSelections: ICellRange[]; } | null> { +export async function joinNotebookCells(editor: IActiveNotebookEditor, range: ICellRange, direction: 'above' | 'below', constraint?: CellKind): Promise<{ edits: ResourceEdit[]; cell: ICellViewModel; endFocus: ICellRange; endSelections: ICellRange[] } | null> { if (editor.isReadOnly) { return null; } diff --git a/src/vs/workbench/contrib/notebook/browser/controller/foldingController.ts b/src/vs/workbench/contrib/notebook/browser/controller/foldingController.ts index 2188c8df5a99e..a9989ca21d156 100644 --- a/src/vs/workbench/contrib/notebook/browser/controller/foldingController.ts +++ b/src/vs/workbench/contrib/notebook/browser/controller/foldingController.ts @@ -204,7 +204,7 @@ registerAction2(class extends Action2 { }); } - async run(accessor: ServicesAccessor, args?: { index: number, levels: number, direction: 'up' | 'down' }): Promise { + async run(accessor: ServicesAccessor, args?: { index: number; levels: number; direction: 'up' | 'down' }): Promise { const editorService = accessor.get(IEditorService); const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); @@ -274,7 +274,7 @@ registerAction2(class extends Action2 { }); } - async run(accessor: ServicesAccessor, args?: { index: number, levels: number, direction: 'up' | 'down' }): Promise { + async run(accessor: ServicesAccessor, args?: { index: number; levels: number; direction: 'up' | 'down' }): Promise { const editorService = accessor.get(IEditorService); const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); diff --git a/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.ts b/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.ts index 3d87b189b7e07..2c65e2d5ffd30 100644 --- a/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.ts +++ b/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.ts @@ -36,7 +36,7 @@ export abstract class DiffElementViewModelBase extends Disposable { public outputFoldingState: PropertyFoldingState; protected _layoutInfoEmitter = this._register(new Emitter()); onDidLayoutChange = this._layoutInfoEmitter.event; - protected _stateChangeEmitter = this._register(new Emitter<{ renderOutput: boolean; }>()); + protected _stateChangeEmitter = this._register(new Emitter<{ renderOutput: boolean }>()); onDidStateChange = this._stateChangeEmitter.event; protected _layoutInfo!: IDiffElementLayoutInfo; @@ -115,8 +115,8 @@ export abstract class DiffElementViewModelBase extends Disposable { readonly type: 'unchanged' | 'insert' | 'delete' | 'modified', readonly editorEventDispatcher: NotebookDiffEditorEventDispatcher, readonly initData: { - metadataStatusHeight: number, - outputStatusHeight: number + metadataStatusHeight: number; + outputStatusHeight: number; } ) { super(); @@ -274,8 +274,8 @@ export abstract class DiffElementViewModelBase extends Disposable { this.editorEventDispatcher.emit([{ type: NotebookDiffViewEventType.CellLayoutChanged, source: this._layoutInfo }]); } - abstract checkIfOutputsModified(): false | { reason: string | undefined; }; - abstract checkMetadataIfModified(): false | { reason: string | undefined; }; + abstract checkIfOutputsModified(): false | { reason: string | undefined }; + abstract checkMetadataIfModified(): false | { reason: string | undefined }; abstract isOutputEmpty(): boolean; abstract getRichOutputTotalHeight(): number; abstract getCellByUri(cellUri: URI): IGenericCellViewModel; @@ -338,8 +338,8 @@ export class SideBySideDiffElementViewModel extends DiffElementViewModelBase { type: 'unchanged' | 'modified', editorEventDispatcher: NotebookDiffEditorEventDispatcher, initData: { - metadataStatusHeight: number, - outputStatusHeight: number + metadataStatusHeight: number; + outputStatusHeight: number; } ) { super( @@ -489,8 +489,8 @@ export class SingleSideDiffElementViewModel extends DiffElementViewModelBase { type: 'insert' | 'delete', editorEventDispatcher: NotebookDiffEditorEventDispatcher, initData: { - metadataStatusHeight: number, - outputStatusHeight: number + metadataStatusHeight: number; + outputStatusHeight: number; } ) { super(mainDocumentTextModel, original, modified, type, editorEventDispatcher, initData); diff --git a/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.ts b/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.ts index 40cbe0922df29..02505de851372 100644 --- a/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.ts +++ b/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.ts @@ -77,7 +77,7 @@ registerAction2(class extends Action2 { } ); } - run(accessor: ServicesAccessor, context?: { cell: DiffElementViewModelBase; }) { + run(accessor: ServicesAccessor, context?: { cell: DiffElementViewModelBase }) { if (!context) { return; } @@ -132,7 +132,7 @@ registerAction2(class extends Action2 { } ); } - run(accessor: ServicesAccessor, context?: { cell: DiffElementViewModelBase; }) { + run(accessor: ServicesAccessor, context?: { cell: DiffElementViewModelBase }) { if (!context) { return; } @@ -157,7 +157,7 @@ registerAction2(class extends Action2 { } ); } - run(accessor: ServicesAccessor, context?: { cell: DiffElementViewModelBase; }) { + run(accessor: ServicesAccessor, context?: { cell: DiffElementViewModelBase }) { if (!context) { return; } @@ -191,7 +191,7 @@ registerAction2(class extends Action2 { } ); } - run(accessor: ServicesAccessor, context?: { cell: DiffElementViewModelBase; }) { + run(accessor: ServicesAccessor, context?: { cell: DiffElementViewModelBase }) { if (!context) { return; } diff --git a/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.ts b/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.ts index f9728478605e3..252a5438ecc76 100644 --- a/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.ts +++ b/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.ts @@ -30,8 +30,8 @@ export interface IDiffCellInfo extends ICommonCellInfo { export interface INotebookTextDiffEditor { notebookOptions: NotebookOptions; readonly textModel?: NotebookTextModel; - onMouseUp: Event<{ readonly event: MouseEvent; readonly target: DiffElementViewModelBase; }>; - onDidDynamicOutputRendered: Event<{ cell: IGenericCellViewModel, output: ICellOutputViewModel }>; + onMouseUp: Event<{ readonly event: MouseEvent; readonly target: DiffElementViewModelBase }>; + onDidDynamicOutputRendered: Event<{ cell: IGenericCellViewModel; output: ICellOutputViewModel }>; getOverflowContainerDomNode(): HTMLElement; getLayoutInfo(): NotebookLayoutInfo; layoutNotebookCell(cell: DiffElementViewModelBase, height: number): void; diff --git a/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor.ts b/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor.ts index ac279c4655917..569bfdc9477af 100644 --- a/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor.ts +++ b/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor.ts @@ -60,7 +60,7 @@ export class NotebookTextDiffEditor extends EditorPane implements INotebookTextD private _webviewTransparentCover: HTMLElement | null = null; private _fontInfo: FontInfo | undefined; - private readonly _onMouseUp = this._register(new Emitter<{ readonly event: MouseEvent; readonly target: DiffElementViewModelBase; }>()); + private readonly _onMouseUp = this._register(new Emitter<{ readonly event: MouseEvent; readonly target: DiffElementViewModelBase }>()); public readonly onMouseUp = this._onMouseUp.event; private _eventDispatcher: NotebookDiffEditorEventDispatcher | undefined; protected _scopeContextKeyService!: IContextKeyService; @@ -75,7 +75,7 @@ export class NotebookTextDiffEditor extends EditorPane implements INotebookTextD private _revealFirst: boolean; private readonly _insetModifyQueueByOutputId = new SequencerByKey(); - protected _onDidDynamicOutputRendered = this._register(new Emitter<{ cell: IGenericCellViewModel, output: ICellOutputViewModel; }>()); + protected _onDidDynamicOutputRendered = this._register(new Emitter<{ cell: IGenericCellViewModel; output: ICellOutputViewModel }>()); onDidDynamicOutputRendered = this._onDidDynamicOutputRendered.event; private _notebookOptions: NotebookOptions; @@ -147,10 +147,10 @@ export class NotebookTextDiffEditor extends EditorPane implements INotebookTextD setMarkupCellEditState(cellId: string, editState: CellEditState): void { // throw new Error('Method not implemented.'); } - didStartDragMarkupCell(cellId: string, event: { dragOffsetY: number; }): void { + didStartDragMarkupCell(cellId: string, event: { dragOffsetY: number }): void { // throw new Error('Method not implemented.'); } - didDragMarkupCell(cellId: string, event: { dragOffsetY: number; }): void { + didDragMarkupCell(cellId: string, event: { dragOffsetY: number }): void { // throw new Error('Method not implemented.'); } didEndDragMarkupCell(cellId: string): void { @@ -569,8 +569,8 @@ export class NotebookTextDiffEditor extends EditorPane implements INotebookTextD } static computeModifiedLCS(instantiationService: IInstantiationService, change: IDiffChange, originalModel: NotebookTextModel, modifiedModel: NotebookTextModel, eventDispatcher: NotebookDiffEditorEventDispatcher, initData: { - metadataStatusHeight: number, - outputStatusHeight: number + metadataStatusHeight: number; + outputStatusHeight: number; }) { const result: DiffElementViewModelBase[] = []; // modified cells diff --git a/src/vs/workbench/contrib/notebook/browser/extensionPoint.ts b/src/vs/workbench/contrib/notebook/browser/extensionPoint.ts index 3e827183b54b8..b48922916a042 100644 --- a/src/vs/workbench/contrib/notebook/browser/extensionPoint.ts +++ b/src/vs/workbench/contrib/notebook/browser/extensionPoint.ts @@ -18,7 +18,7 @@ namespace NotebookEditorContribution { export interface INotebookEditorContribution { readonly [NotebookEditorContribution.type]: string; readonly [NotebookEditorContribution.displayName]: string; - readonly [NotebookEditorContribution.selector]?: readonly { filenamePattern?: string; excludeFileNamePattern?: string; }[]; + readonly [NotebookEditorContribution.selector]?: readonly { filenamePattern?: string; excludeFileNamePattern?: string }[]; readonly [NotebookEditorContribution.priority]?: string; } diff --git a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts index c348b87c375b1..70cc931dfd078 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts @@ -148,7 +148,7 @@ class NotebookDiffEditorSerializer implements IEditorSerializer { } deserialize(instantiationService: IInstantiationService, raw: string) { - type Data = { resource: URI, originalResource: URI, name: string, originalName: string, viewType: string, textDiffName: string | undefined, group: number; }; + type Data = { resource: URI; originalResource: URI; name: string; originalName: string; viewType: string; textDiffName: string | undefined; group: number }; const data = parse(raw); if (!data) { return undefined; @@ -167,7 +167,7 @@ class NotebookDiffEditorSerializer implements IEditorSerializer { } } -type SerializedNotebookEditorData = { resource: URI, viewType: string, options?: NotebookEditorInputOptions }; +type SerializedNotebookEditorData = { resource: URI; viewType: string; options?: NotebookEditorInputOptions }; class NotebookEditorSerializer implements IEditorSerializer { canSerialize(): boolean { return true; @@ -377,7 +377,7 @@ class CellInfoContentProvider { return result; } - private parseStreamOutput(op?: ICellOutput): { content: string, mode: ILanguageSelection } | undefined { + private parseStreamOutput(op?: ICellOutput): { content: string; mode: ILanguageSelection } | undefined { if (!op) { return; } @@ -398,7 +398,7 @@ class CellInfoContentProvider { handle: number; outputId?: string | undefined; }, cell: NotebookCellTextModel) { - let result: { content: string, mode: ILanguageSelection } | undefined = undefined; + let result: { content: string; mode: ILanguageSelection } | undefined = undefined; const mode = this._languageService.createById('json'); const op = cell.outputs.find(op => op.outputId === data.outputId); @@ -636,7 +636,7 @@ registerSingleton(INotebookRendererMessagingService, NotebookRendererMessagingSe registerSingleton(INotebookKeymapService, NotebookKeymapService, true); const schemas: IJSONSchemaMap = {}; -function isConfigurationPropertySchema(x: IConfigurationPropertySchema | { [path: string]: IConfigurationPropertySchema; }): x is IConfigurationPropertySchema { +function isConfigurationPropertySchema(x: IConfigurationPropertySchema | { [path: string]: IConfigurationPropertySchema }): x is IConfigurationPropertySchema { return (typeof x.type !== 'undefined' || typeof x.anyOf !== 'undefined'); } for (const editorOption of editorOptionsRegistry) { diff --git a/src/vs/workbench/contrib/notebook/browser/notebookBrowser.ts b/src/vs/workbench/contrib/notebook/browser/notebookBrowser.ts index 6378107dfd34c..887165d4fda66 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookBrowser.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookBrowser.ts @@ -220,10 +220,10 @@ export interface ICellViewModel extends IGenericCellViewModel { readonly model: NotebookCellTextModel; readonly id: string; readonly textBuffer: IReadonlyTextBuffer; - readonly layoutInfo: { totalHeight: number; bottomToolbarOffset: number; editorWidth: number; }; + readonly layoutInfo: { totalHeight: number; bottomToolbarOffset: number; editorWidth: number }; readonly onDidChangeLayout: Event; readonly onDidChangeCellStatusBarItems: Event; - readonly onCellDecorationsChanged: Event<{ added: INotebookCellDecorationOptions[], removed: INotebookCellDecorationOptions[] }>; + readonly onCellDecorationsChanged: Event<{ added: INotebookCellDecorationOptions[]; removed: INotebookCellDecorationOptions[] }>; readonly onDidChangeState: Event; readonly editStateSource: string; readonly editorAttached: boolean; @@ -332,16 +332,16 @@ export interface INotebookWebviewMessage { //#region Notebook View Model export interface INotebookEditorViewState { - editingCells: { [key: number]: boolean; }; - collapsedInputCells: { [key: number]: boolean; }; - collapsedOutputCells: { [key: number]: boolean; }; - editorViewStates: { [key: number]: editorCommon.ICodeEditorViewState | null; }; + editingCells: { [key: number]: boolean }; + collapsedInputCells: { [key: number]: boolean }; + collapsedOutputCells: { [key: number]: boolean }; + editorViewStates: { [key: number]: editorCommon.ICodeEditorViewState | null }; hiddenFoldingRanges?: ICellRange[]; - cellTotalHeights?: { [key: number]: number; }; - scrollPosition?: { left: number; top: number; }; + cellTotalHeights?: { [key: number]: number }; + scrollPosition?: { left: number; top: number }; focus?: number; editorFocused?: boolean; - contributionsState?: { [id: string]: unknown; }; + contributionsState?: { [id: string]: unknown }; } export interface ICellModelDecorations { @@ -734,7 +734,7 @@ export function getNotebookEditorFromEditorPane(editorPane?: IEditorPane): INote const input = editorPane.input; if (input && isCompositeNotebookEditorInput(input)) { - return (editorPane.getControl() as { notebookEditor: INotebookEditor | undefined; }).notebookEditor; + return (editorPane.getControl() as { notebookEditor: INotebookEditor | undefined }).notebookEditor; } return undefined; diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts index aa1ae2f59870b..2ff8bbc520c9c 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts @@ -233,14 +233,14 @@ export class NotebookEditor extends EditorPane { mark(input.resource, 'editorLoaded'); type WorkbenchNotebookOpenClassification = { - scheme: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - ext: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - viewType: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - extensionActivated: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - inputLoaded: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - webviewCommLoaded: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - customMarkdownLoaded: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - editorLoaded: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; + scheme: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + ext: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + viewType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + extensionActivated: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + inputLoaded: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + webviewCommLoaded: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + customMarkdownLoaded: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + editorLoaded: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; type WorkbenchNotebookOpenEvent = { diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.ts index fff65d1b5b1ef..25211785f0e51 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.ts @@ -15,7 +15,7 @@ class EditorContributionRegistry { this.editorContributions = []; } - public registerEditorContribution(id: string, ctor: { new(editor: INotebookEditor, ...services: Services): INotebookEditorContribution; }): void { + public registerEditorContribution(id: string, ctor: { new(editor: INotebookEditor, ...services: Services): INotebookEditorContribution }): void { this.editorContributions.push({ id, ctor: ctor as INotebookEditorContributionCtor }); } @@ -24,7 +24,7 @@ class EditorContributionRegistry { } } -export function registerNotebookContribution(id: string, ctor: { new(editor: INotebookEditor, ...services: Services): INotebookEditorContribution; }): void { +export function registerNotebookContribution(id: string, ctor: { new(editor: INotebookEditor, ...services: Services): INotebookEditorContribution }): void { EditorContributionRegistry.INSTANCE.registerEditorContribution(id, ctor); } diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditorServiceImpl.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditorServiceImpl.ts index 23d2d20fe4fb2..da77b9fc7e90c 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookEditorServiceImpl.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookEditorServiceImpl.ts @@ -30,7 +30,7 @@ export class NotebookEditorWidgetService implements INotebookEditorService { readonly onDidAddNotebookEditor = this._onNotebookEditorAdd.event; readonly onDidRemoveNotebookEditor = this._onNotebookEditorsRemove.event; - private readonly _borrowableEditors = new Map>(); + private readonly _borrowableEditors = new Map>(); constructor( @IEditorGroupsService editorGroupService: IEditorGroupsService, @@ -156,7 +156,7 @@ export class NotebookEditorWidgetService implements INotebookEditorService { return this._createBorrowValue(value.token!, value); } - private _createBorrowValue(myToken: number, widget: { widget: NotebookEditorWidget, token: number | undefined; }): IBorrowValue { + private _createBorrowValue(myToken: number, widget: { widget: NotebookEditorWidget; token: number | undefined }): IBorrowValue { return { get value() { return widget.token === myToken ? widget.widget : undefined; diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts index 07cc255339037..4218eec231a43 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts @@ -327,7 +327,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD private _localCellStateListeners: DisposableStore[] = []; private _fontInfo: FontInfo | undefined; private _dimension: DOM.Dimension | null = null; - private _shadowElementViewInfo: { height: number, width: number, top: number; left: number; } | null = null; + private _shadowElementViewInfo: { height: number; width: number; top: number; left: number } | null = null; private readonly _editorFocus: IContextKey; private readonly _outputFocus: IContextKey; @@ -1146,9 +1146,9 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD this._webview?.updateOptions(this.notebookOptions.computeWebviewOptions()); } type WorkbenchNotebookOpenClassification = { - scheme: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - ext: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; - viewType: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; + scheme: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + ext: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + viewType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; type WorkbenchNotebookOpenEvent = { @@ -1631,7 +1631,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD // no cached view state so we are rendering the first viewport // after above async call, we already get init height for markdown cells, we can update their offset let offset = 0; - const offsetUpdateRequests: { id: string, top: number; }[] = []; + const offsetUpdateRequests: { id: string; top: number }[] = []; const scrollBottom = Math.max(this._dimension?.height ?? 0, 1080); for (const cell of viewModel.viewCells) { if (cell.cellKind === CellKind.Markup) { @@ -1708,7 +1708,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD if (this._list) { state.scrollPosition = { left: this._list.scrollLeft, top: this._list.scrollTop }; - const cellHeights: { [key: number]: number; } = {}; + const cellHeights: { [key: number]: number } = {}; for (let i = 0; i < this.viewModel!.length; i++) { const elm = this.viewModel!.cellAt(i) as CellViewModel; if (elm.cellKind === CellKind.Code) { @@ -1734,7 +1734,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD } // Save contribution view states - const contributionsState: { [key: string]: unknown; } = {}; + const contributionsState: { [key: string]: unknown } = {}; for (const [id, contribution] of this._contributions) { if (typeof contribution.saveViewState === 'function') { contributionsState[id] = contribution.saveViewState(); @@ -2782,7 +2782,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD this._webview.removeInsets(removedItems); - const markdownUpdateItems: { id: string, top: number; }[] = []; + const markdownUpdateItems: { id: string; top: number }[] = []; for (const cellId of this._webview.markupPreviewMapping.keys()) { const cell = this.viewModel?.viewCells.find(cell => cell.id === cellId); if (cell) { @@ -2857,7 +2857,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD } } - private _didStartDragMarkupCell(cellId: string, event: { dragOffsetY: number; }): void { + private _didStartDragMarkupCell(cellId: string, event: { dragOffsetY: number }): void { const cell = this._getCellById(cellId); if (cell instanceof MarkupCellViewModel) { const webviewOffset = this._list.webviewElement ? -parseInt(this._list.webviewElement.domNode.style.top, 10) : 0; @@ -2865,7 +2865,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD } } - private _didDragMarkupCell(cellId: string, event: { dragOffsetY: number; }): void { + private _didDragMarkupCell(cellId: string, event: { dragOffsetY: number }): void { const cell = this._getCellById(cellId); if (cell instanceof MarkupCellViewModel) { const webviewOffset = this._list.webviewElement ? -parseInt(this._list.webviewElement.domNode.style.top, 10) : 0; @@ -2873,7 +2873,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD } } - private _didDropMarkupCell(cellId: string, event: { dragOffsetY: number, ctrlKey: boolean, altKey: boolean; }): void { + private _didDropMarkupCell(cellId: string, event: { dragOffsetY: number; ctrlKey: boolean; altKey: boolean }): void { const cell = this._getCellById(cellId); if (cell instanceof MarkupCellViewModel) { const webviewOffset = this._list.webviewElement ? -parseInt(this._list.webviewElement.domNode.style.top, 10) : 0; @@ -2931,7 +2931,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD super.dispose(); } - toJSON(): { notebookUri: URI | undefined; } { + toJSON(): { notebookUri: URI | undefined } { return { notebookUri: this.viewModel?.uri, }; diff --git a/src/vs/workbench/contrib/notebook/browser/notebookKernelServiceImpl.ts b/src/vs/workbench/contrib/notebook/browser/notebookKernelServiceImpl.ts index c87b6bb596aa7..250e502801f0c 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookKernelServiceImpl.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookKernelServiceImpl.ts @@ -167,7 +167,7 @@ export class NotebookKernelService extends Disposable implements INotebookKernel getMatchingKernel(notebook: INotebookTextModelLike): INotebookKernelMatchResult { // all applicable kernels - const kernels: { kernel: INotebookKernel, instanceAffinity: number, typeAffinity: number, score: number }[] = []; + const kernels: { kernel: INotebookKernel; instanceAffinity: number; typeAffinity: number; score: number }[] = []; for (const info of this._kernels.values()) { const score = NotebookKernelService._score(info.kernel, notebook); if (score) { diff --git a/src/vs/workbench/contrib/notebook/browser/notebookServiceImpl.ts b/src/vs/workbench/contrib/notebook/browser/notebookServiceImpl.ts index a780d57ebae0c..eaceb109e27ed 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookServiceImpl.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookServiceImpl.ts @@ -327,7 +327,7 @@ export class NotebookOutputRendererInfoStore { const preferred = notebookProviderInfo && this.preferredMimetype.getValue()[notebookProviderInfo.id]?.[mimeType]; const notebookExtId = notebookProviderInfo?.extension?.value; const notebookId = notebookProviderInfo?.id; - const renderers: { ordered: IOrderedMimeType, score: number }[] = Array.from(this.contributedRenderers.values()) + const renderers: { ordered: IOrderedMimeType; score: number }[] = Array.from(this.contributedRenderers.values()) .map(renderer => { const ownScore = kernelProvides === undefined ? renderer.matchesWithoutKernel(mimeType) @@ -719,7 +719,7 @@ export class NotebookService extends Disposable implements INotebookService { this._lastClipboardIsCopy = isCopy; } - getToCopy(): { items: NotebookCellTextModel[], isCopy: boolean; } | undefined { + getToCopy(): { items: NotebookCellTextModel[]; isCopy: boolean } | undefined { if (this._cutItems) { return { items: this._cutItems, isCopy: this._lastClipboardIsCopy }; } diff --git a/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.ts b/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.ts index e9e4422f1a12d..026490e84046b 100644 --- a/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.ts +++ b/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.ts @@ -64,8 +64,8 @@ export interface IWorkerClient { } export class NotebookEditorModelManager extends Disposable { - private _syncedModels: { [modelUrl: string]: IDisposable; } = Object.create(null); - private _syncedModelsLastUsedTime: { [modelUrl: string]: number; } = Object.create(null); + private _syncedModels: { [modelUrl: string]: IDisposable } = Object.create(null); + private _syncedModelsLastUsedTime: { [modelUrl: string]: number } = Object.create(null); constructor( private readonly _proxy: NotebookEditorSimpleWorker, diff --git a/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.ts b/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.ts index d69b228395a01..2563807acf366 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.ts @@ -204,7 +204,7 @@ export class CellDragAndDropController extends Disposable { } } - private _dropImpl(draggedCell: ICellViewModel, dropDirection: 'above' | 'below', ctx: { ctrlKey: boolean, altKey: boolean; }, draggedOverCell: ICellViewModel) { + private _dropImpl(draggedCell: ICellViewModel, dropDirection: 'above' | 'below', ctx: { ctrlKey: boolean; altKey: boolean }, draggedOverCell: ICellViewModel) { const cellTop = this.list.getAbsoluteTopOfElement(draggedOverCell); const cellHeight = this.list.elementHeight(draggedOverCell); const insertionIndicatorAbsolutePos = dropDirection === 'above' ? cellTop : cellTop + cellHeight; @@ -393,7 +393,7 @@ export class CellDragAndDropController extends Disposable { this.setInsertIndicatorVisibility(false); } - public explicitDrop(cell: ICellViewModel, ctx: { dragOffsetY: number, ctrlKey: boolean, altKey: boolean; }) { + public explicitDrop(cell: ICellViewModel, ctx: { dragOffsetY: number; ctrlKey: boolean; altKey: boolean }) { this.currentDraggedCell = undefined; this.setInsertIndicatorVisibility(false); diff --git a/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.ts b/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.ts index e284e387cb5e0..09cc47e96e8cf 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.ts @@ -117,7 +117,7 @@ export class CellEditorOptions extends CellPart { const editorOptions = deepClone(this.configurationService.getValue('editor', { overrideIdentifier: this.language })); const layoutConfig = this.notebookOptions.getLayoutConfiguration(); const editorOptionsOverrideRaw = layoutConfig.editorOptionsCustomizations ?? {}; - const editorOptionsOverride: { [key: string]: any; } = {}; + const editorOptionsOverride: { [key: string]: any } = {}; for (const key in editorOptionsOverrideRaw) { if (key.indexOf('editor.') === 0) { editorOptionsOverride[key.substring(7)] = editorOptionsOverrideRaw[key]; diff --git a/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.ts b/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.ts index ba812ce14b83e..2c1275c7bb267 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.ts @@ -569,7 +569,7 @@ export class CellOutputContainer extends CellPart { private notebookEditor: INotebookEditorDelegate, private viewCell: CodeCellViewModel, private readonly templateData: CodeCellRenderTemplate, - private options: { limit: number; }, + private options: { limit: number }, @IOpenerService private readonly openerService: IOpenerService, @IInstantiationService private readonly instantiationService: IInstantiationService, ) { diff --git a/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.ts b/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.ts index dc2cc2d3b7786..13dd8dc5e1345 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.ts @@ -216,7 +216,7 @@ export class CellTitleToolbarPart extends CellPart { } } -function getCellToolbarActions(menu: IMenu): { primary: IAction[], secondary: IAction[]; disposable: IDisposable; } { +function getCellToolbarActions(menu: IMenu): { primary: IAction[]; secondary: IAction[]; disposable: IDisposable } { const primary: IAction[] = []; const secondary: IAction[] = []; const result = { primary, secondary }; diff --git a/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.ts b/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.ts index f5edaed7ad94c..dd40996cb37d7 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.ts @@ -72,7 +72,7 @@ export class RunToolbar extends CellPart { // no op } - getCellToolbarActions(menu: IMenu): { primary: IAction[], secondary: IAction[]; } { + getCellToolbarActions(menu: IMenu): { primary: IAction[]; secondary: IAction[] } { const primary: IAction[] = []; const secondary: IAction[] = []; const result = { primary, secondary }; diff --git a/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts b/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts index c58ffa5351d0b..c359aed94056a 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts @@ -69,9 +69,9 @@ export interface INotebookDelegateForWebview { scheduleOutputHeightAck(cellInfo: ICommonCellInfo, outputId: string, height: number): void; updateMarkupCellHeight(cellId: string, height: number, isInit: boolean): void; setMarkupCellEditState(cellId: string, editState: CellEditState): void; - didStartDragMarkupCell(cellId: string, event: { dragOffsetY: number; }): void; - didDragMarkupCell(cellId: string, event: { dragOffsetY: number; }): void; - didDropMarkupCell(cellId: string, event: { dragOffsetY: number, ctrlKey: boolean, altKey: boolean; }): void; + didStartDragMarkupCell(cellId: string, event: { dragOffsetY: number }): void; + didDragMarkupCell(cellId: string, event: { dragOffsetY: number }): void; + didDropMarkupCell(cellId: string, event: { dragOffsetY: number; ctrlKey: boolean; altKey: boolean }): void; didEndDragMarkupCell(cellId: string): void; setScrollTop(scrollTop: number): void; triggerScroll(event: IMouseWheelEvent): void; @@ -415,7 +415,7 @@ export class BackLayerWebView extends Disposable { }); } - private resolveOutputId(id: string): { cellInfo: T, output: ICellOutputViewModel } | undefined { + private resolveOutputId(id: string): { cellInfo: T; output: ICellOutputViewModel } | undefined { const output = this.reversedInsetMapping.get(id); if (!output) { return; @@ -820,7 +820,7 @@ var requirejs = (function() { case 'telemetryFoundUnrenderedMarkdownMath': { type Classification = { - latexDirective: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; + latexDirective: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; type TelemetryEvent = { @@ -948,7 +948,7 @@ var requirejs = (function() { }); } - updateScrollTops(outputRequests: IDisplayOutputLayoutUpdateRequest[], markupPreviews: { id: string, top: number }[]) { + updateScrollTops(outputRequests: IDisplayOutputLayoutUpdateRequest[], markupPreviews: { id: string; top: number }[]) { if (this._disposed) { return; } @@ -1287,7 +1287,7 @@ var requirejs = (function() { }, 50); } - async find(query: string, options: { wholeWord?: boolean; caseSensitive?: boolean; includeMarkup: boolean; includeOutput: boolean; }): Promise { + async find(query: string, options: { wholeWord?: boolean; caseSensitive?: boolean; includeMarkup: boolean; includeOutput: boolean }): Promise { if (query === '') { return []; } diff --git a/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewMessages.ts b/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewMessages.ts index 84e0286eef325..ec1ee2646ef9f 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewMessages.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewMessages.ts @@ -58,7 +58,7 @@ export interface IWheelMessage extends BaseToWebviewMessage { export interface IScrollAckMessage extends BaseToWebviewMessage { readonly type: 'scroll-ack'; - readonly data: { top: number; }; + readonly data: { top: number }; readonly version: number; } @@ -167,22 +167,22 @@ export interface IOutputRequestMetadata { /** * Additional attributes of a cell metadata. */ - readonly custom?: { readonly [key: string]: unknown; }; + readonly custom?: { readonly [key: string]: unknown }; } export interface IOutputRequestDto { /** * { mime_type: value } */ - readonly data: { readonly [key: string]: unknown; }; + readonly data: { readonly [key: string]: unknown }; readonly metadata?: IOutputRequestMetadata; readonly outputId: string; } export type ICreationContent = - | { readonly type: RenderOutputType.Html; readonly htmlContent: string; } - | { readonly type: RenderOutputType.Extension; readonly outputId: string; readonly valueBytes: Uint8Array; readonly metadata: unknown; readonly mimeType: string; }; + | { readonly type: RenderOutputType.Html; readonly htmlContent: string } + | { readonly type: RenderOutputType.Extension; readonly outputId: string; readonly valueBytes: Uint8Array; readonly metadata: unknown; readonly mimeType: string }; export interface ICreationRequestMessage { readonly type: 'html'; @@ -367,7 +367,7 @@ export interface ITokenizedStylesChangedMessage { export interface IFindMessage { readonly type: 'find'; readonly query: string; - readonly options: { wholeWord?: boolean; caseSensitive?: boolean; includeMarkup: boolean; includeOutput: boolean; } + readonly options: { wholeWord?: boolean; caseSensitive?: boolean; includeMarkup: boolean; includeOutput: boolean }; } diff --git a/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts b/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts index 5c58ae72ee854..92a107f0e1338 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts @@ -14,14 +14,14 @@ import type * as webviewMessages from 'vs/workbench/contrib/notebook/browser/vie declare module globalThis { const acquireVsCodeApi: () => ({ - getState(): { [key: string]: unknown; }; - setState(data: { [key: string]: unknown; }): void; + getState(): { [key: string]: unknown }; + setState(data: { [key: string]: unknown }): void; postMessage: (msg: unknown) => void; }); } declare class ResizeObserver { - constructor(onChange: (entries: { target: HTMLElement, contentRect?: ClientRect; }[]) => void); + constructor(onChange: (entries: { target: HTMLElement; contentRect?: ClientRect }[]) => void); observe(element: Element): void; disconnect(): void; } @@ -41,7 +41,7 @@ declare namespace CSS { } -type Listener = { fn: (evt: T) => void; thisArg: unknown; }; +type Listener = { fn: (evt: T) => void; thisArg: unknown }; interface EmitterLike { fire(data: T): void; @@ -277,7 +277,7 @@ async function webviewPreloads(ctx: PreloadContext) { private readonly _observer: ResizeObserver; - private readonly _observedElements = new WeakMap(); + private readonly _observedElements = new WeakMap(); constructor() { this._observer = new ResizeObserver(entries => { @@ -340,7 +340,7 @@ async function webviewPreloads(ctx: PreloadContext) { return false; } - const handleWheel = (event: WheelEvent & { wheelDeltaX?: number, wheelDeltaY?: number, wheelDelta?: number }) => { + const handleWheel = (event: WheelEvent & { wheelDeltaX?: number; wheelDeltaY?: number; wheelDelta?: number }) => { if (event.defaultPrevented || scrollWillGoToParent(event)) { return; } @@ -540,18 +540,18 @@ async function webviewPreloads(ctx: PreloadContext) { } interface ICommonRange { - collapsed: boolean, - commonAncestorContainer: Node, - endContainer: Node, - endOffset: number, - startContainer: Node, - startOffset: number + collapsed: boolean; + commonAncestorContainer: Node; + endContainer: Node; + endOffset: number; + startContainer: Node; + startOffset: number; } interface IHighlightResult { range: ICommonRange; - dispose: () => void, + dispose: () => void; update: (color: string | undefined, className: string | undefined) => void; } @@ -785,13 +785,13 @@ async function webviewPreloads(ctx: PreloadContext) { window.addEventListener('wheel', handleWheel); interface IFindMatch { - type: 'preview' | 'output', - id: string, - cellId: string, - container: Node, - originalRange: Range, - isShadow: boolean, - highlightResult?: IHighlightResult + type: 'preview' | 'output'; + id: string; + cellId: string; + container: Node; + originalRange: Range; + isShadow: boolean; + highlightResult?: IHighlightResult; } interface IHighlighter { @@ -920,7 +920,7 @@ async function webviewPreloads(ctx: PreloadContext) { } } - const find = (query: string, options: { wholeWord?: boolean; caseSensitive?: boolean; includeMarkup: boolean; includeOutput: boolean; }) => { + const find = (query: string, options: { wholeWord?: boolean; caseSensitive?: boolean; includeMarkup: boolean; includeOutput: boolean }) => { let find = true; let matches: IFindMatch[] = []; @@ -1060,7 +1060,7 @@ async function webviewPreloads(ctx: PreloadContext) { }; window.addEventListener('message', async rawEvent => { - const event = rawEvent as ({ data: webviewMessages.ToWebviewMessage; }); + const event = rawEvent as ({ data: webviewMessages.ToWebviewMessage }); switch (event.data.type) { case 'initializeMarkup': @@ -1785,7 +1785,7 @@ async function webviewPreloads(ctx: PreloadContext) { } } - const codeBlocks: Array<{ value: string, lang: string, id: string }> = []; + const codeBlocks: Array<{ value: string; lang: string; id: string }> = []; let i = 0; for (const el of root.querySelectorAll('.vscode-code-block')) { const lang = el.getAttribute('data-vscode-code-block-lang'); @@ -2001,7 +2001,7 @@ async function webviewPreloads(ctx: PreloadContext) { public readonly element: HTMLElement; - private _content?: { content: webviewMessages.ICreationContent, preloadsAndErrors: unknown[] }; + private _content?: { content: webviewMessages.ICreationContent; preloadsAndErrors: unknown[] }; private hasResizeObserver = false; constructor( @@ -2072,7 +2072,7 @@ async function webviewPreloads(ctx: PreloadContext) { const markupCellDragManager = new class MarkupCellDragManager { - private currentDrag: { cellId: string, clientY: number } | undefined; + private currentDrag: { cellId: string; clientY: number } | undefined; // Transparent overlay that prevents elements from inside the webview from eating // drag events. diff --git a/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.ts b/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.ts index e41fcf8a70516..a5f73d4c62679 100644 --- a/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.ts +++ b/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.ts @@ -120,8 +120,8 @@ export abstract class BaseCellViewModel extends Disposable { private _editorTransientState: IWordWrapTransientState | null = null; private _resolvedCellDecorations = new Map(); - private readonly _cellDecorationsChanged = this._register(new Emitter<{ added: INotebookCellDecorationOptions[], removed: INotebookCellDecorationOptions[] }>()); - onCellDecorationsChanged: Event<{ added: INotebookCellDecorationOptions[], removed: INotebookCellDecorationOptions[] }> = this._cellDecorationsChanged.event; + private readonly _cellDecorationsChanged = this._register(new Emitter<{ added: INotebookCellDecorationOptions[]; removed: INotebookCellDecorationOptions[] }>()); + onCellDecorationsChanged: Event<{ added: INotebookCellDecorationOptions[]; removed: INotebookCellDecorationOptions[] }> = this._cellDecorationsChanged.event; private _resolvedDecorations = new Map { if (cell.getEditState() === CellEditState.Editing) { @@ -765,7 +765,7 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD collapsedOutputCells[i] = true; } }); - const editorViewStates: { [key: number]: editorCommon.ICodeEditorViewState; } = {}; + const editorViewStates: { [key: number]: editorCommon.ICodeEditorViewState } = {}; this._viewCells.map(cell => ({ handle: cell.model.handle, state: cell.saveEditorViewState() })).forEach((viewState, i) => { if (viewState.state) { editorViewStates[i] = viewState.state; @@ -826,7 +826,7 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD private _deltaModelDecorationsImpl(oldDecorations: ICellModelDecorations[], newDecorations: ICellModelDeltaDecorations[]): ICellModelDecorations[] { - const mapping = new Map(); + const mapping = new Map(); oldDecorations.forEach(oldDecoration => { const ownerId = oldDecoration.ownerId; diff --git a/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorDecorations.ts b/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorDecorations.ts index eb50c355dbcb7..fbdba52e8a880 100644 --- a/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorDecorations.ts +++ b/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorDecorations.ts @@ -16,7 +16,7 @@ export class NotebookRefCountedStyleSheet { private readonly _styleSheet: HTMLStyleElement; private _refCount: number; - constructor(readonly widget: { removeEditorStyleSheets: (key: string) => void; }, key: string, styleSheet: HTMLStyleElement) { + constructor(readonly widget: { removeEditorStyleSheets: (key: string) => void }, key: string, styleSheet: HTMLStyleElement) { this._key = key; this._styleSheet = styleSheet; this._refCount = 0; diff --git a/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.ts b/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.ts index 2a459128f4fc0..a7c0e4d2cc3ba 100644 --- a/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.ts +++ b/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.ts @@ -50,7 +50,7 @@ const ACTION_PADDING = 8; interface IActionLayoutStrategy { actionProvider: IActionViewItemProvider; - calculateActions(leftToolbarContainerMaxWidth: number): { primaryActions: IAction[], secondaryActions: IAction[] }; + calculateActions(leftToolbarContainerMaxWidth: number): { primaryActions: IAction[]; secondaryActions: IAction[] }; } class FixedLabelStrategy implements IActionLayoutStrategy { diff --git a/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.ts b/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.ts index 33ac46a531927..92d6c18e45ff3 100644 --- a/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.ts +++ b/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.ts @@ -83,7 +83,7 @@ export class ListTopCellToolbar extends Disposable { } } - private getCellToolbarActions(menu: IMenu, alwaysFillSecondaryActions: boolean): { primary: IAction[], secondary: IAction[]; } { + private getCellToolbarActions(menu: IMenu, alwaysFillSecondaryActions: boolean): { primary: IAction[]; secondary: IAction[] } { type NewType = IAction; const primary: NewType[] = []; diff --git a/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.ts b/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.ts index 8a0c01930f326..1ff7632b371d2 100644 --- a/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.ts +++ b/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.ts @@ -240,7 +240,7 @@ export class NotebookCellTextModel extends Disposable implements ICell { } private _getPersisentMetadata() { - const filteredMetadata: { [key: string]: any; } = {}; + const filteredMetadata: { [key: string]: any } = {}; const transientCellMetadata = this.transientOptions.transientCellMetadata; const keys = new Set([...Object.keys(this.metadata)]); diff --git a/src/vs/workbench/contrib/notebook/common/notebookCellStatusBarService.ts b/src/vs/workbench/contrib/notebook/common/notebookCellStatusBarService.ts index 7cec507be08f5..133fa494d7bce 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookCellStatusBarService.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookCellStatusBarService.ts @@ -16,7 +16,7 @@ export interface INotebookCellStatusBarService { readonly _serviceBrand: undefined; readonly onDidChangeProviders: Event; - readonly onDidChangeItems: Event + readonly onDidChangeItems: Event; registerCellStatusBarItemProvider(provider: INotebookCellStatusBarItemProvider): IDisposable; diff --git a/src/vs/workbench/contrib/notebook/common/notebookCommon.ts b/src/vs/workbench/contrib/notebook/common/notebookCommon.ts index fae60493ef377..fed8c151731ba 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookCommon.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookCommon.ts @@ -75,7 +75,7 @@ export const RENDERER_EQUIVALENT_EXTENSIONS: ReadonlyMap | NotebookDocumentChangeMetadataEvent | NotebookCellContentChangeEvent | NotebookCellsModelChangedEvent | NotebookCellsModelMoveEvent | NotebookOutputChangedEvent | NotebookOutputItemChangedEvent | NotebookCellsChangeLanguageEvent | NotebookCellsChangeMimeEvent | NotebookCellsChangeMetadataEvent | NotebookCellsChangeInternalMetadataEvent | NotebookDocumentUnknownChangeEvent) & { transient: boolean; }; +export type NotebookRawContentEvent = (NotebookCellsInitializeEvent | NotebookDocumentChangeMetadataEvent | NotebookCellContentChangeEvent | NotebookCellsModelChangedEvent | NotebookCellsModelMoveEvent | NotebookOutputChangedEvent | NotebookOutputItemChangedEvent | NotebookCellsChangeLanguageEvent | NotebookCellsChangeMimeEvent | NotebookCellsChangeMetadataEvent | NotebookCellsChangeInternalMetadataEvent | NotebookDocumentUnknownChangeEvent) & { transient: boolean }; export enum SelectionStateType { Handle = 0, @@ -496,7 +496,7 @@ export interface NotebookData { export interface INotebookContributionData { - extension?: ExtensionIdentifier, + extension?: ExtensionIdentifier; providerDisplayName: string; displayName: string; filenamePattern: (string | glob.IRelativePattern | INotebookExclusiveDocumentFilter)[]; @@ -517,7 +517,7 @@ export namespace CellUri { }); } - export function parse(cell: URI): { notebook: URI, handle: number; } | undefined { + export function parse(cell: URI): { notebook: URI; handle: number } | undefined { if (cell.scheme !== scheme) { return undefined; } @@ -542,7 +542,7 @@ export namespace CellUri { }); } - export function parseCellOutputUri(uri: URI): { notebook: URI, handle: number; outputId?: string } | undefined { + export function parseCellOutputUri(uri: URI): { notebook: URI; handle: number; outputId?: string } | undefined { if (uri.scheme !== Schemas.vscodeNotebookCellOutput) { return; } @@ -848,7 +848,7 @@ export interface INotebookDocumentFilter { //TODO@rebornix test -export function isDocumentExcludePattern(filenamePattern: string | glob.IRelativePattern | INotebookExclusiveDocumentFilter): filenamePattern is { include: string | glob.IRelativePattern; exclude: string | glob.IRelativePattern; } { +export function isDocumentExcludePattern(filenamePattern: string | glob.IRelativePattern | INotebookExclusiveDocumentFilter): filenamePattern is { include: string | glob.IRelativePattern; exclude: string | glob.IRelativePattern } { const arg = filenamePattern as INotebookExclusiveDocumentFilter; if ((typeof arg.include === 'string' || glob.isRelativePattern(arg.include)) @@ -907,8 +907,8 @@ export class CellSequence implements ISequence { } export interface INotebookDiffResult { - cellsDiff: IDiffResult, - linesDiff?: { originalCellhandle: number, modifiedCellhandle: number, lineChanges: ILineChange[]; }[]; + cellsDiff: IDiffResult; + linesDiff?: { originalCellhandle: number; modifiedCellhandle: number; lineChanges: ILineChange[] }[]; } export interface INotebookCellStatusBarItem { diff --git a/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts b/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts index 2205ff7822272..a951d5740818f 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts @@ -197,7 +197,7 @@ export class NotebookEditorInput extends AbstractResourceEditorInput { return undefined; } - private _move(_group: GroupIdentifier, newResource: URI): { editor: EditorInput; } { + private _move(_group: GroupIdentifier, newResource: URI): { editor: EditorInput } { const editorInput = NotebookEditorInput.create(this._instantiationService, newResource, this.viewType); return { editor: editorInput }; } diff --git a/src/vs/workbench/contrib/notebook/common/notebookExecutionService.ts b/src/vs/workbench/contrib/notebook/common/notebookExecutionService.ts index 5b4ae7695ebbe..f95ed7b6e3026 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookExecutionService.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookExecutionService.ts @@ -16,14 +16,14 @@ export enum CellExecutionUpdateType { export interface ICellExecuteOutputEdit { editType: CellExecutionUpdateType.Output; append?: boolean; - outputs: IOutputDto[] + outputs: IOutputDto[]; } export interface ICellExecuteOutputItemEdit { editType: CellExecutionUpdateType.OutputItems; append?: boolean; outputId: string; - items: IOutputItemDto[] + items: IOutputItemDto[]; } export const INotebookExecutionService = createDecorator('INotebookExecutionService'); diff --git a/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.ts b/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.ts index 260fe24cd55ba..b3146bfcab3f3 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.ts @@ -47,7 +47,7 @@ export interface INotebookExecutionStateService { onDidChangeCellExecution: Event; - forceCancelNotebookExecutions(notebookUri: URI): void + forceCancelNotebookExecutions(notebookUri: URI): void; getCellExecutionStatesForNotebook(notebook: URI): INotebookCellExecution[]; getCellExecution(cellUri: URI): INotebookCellExecution | undefined; createCellExecution(controllerId: string, notebook: URI, cellHandle: number): INotebookCellExecution; diff --git a/src/vs/workbench/contrib/notebook/common/notebookKernelService.ts b/src/vs/workbench/contrib/notebook/common/notebookKernelService.ts index 85c1ab380fcc6..2ca0bbd0ac9a4 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookKernelService.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookKernelService.ts @@ -54,7 +54,7 @@ export interface INotebookKernel { cancelNotebookCellExecution(uri: URI, cellHandles: number[]): Promise; } -export interface INotebookTextModelLike { uri: URI; viewType: string; } +export interface INotebookTextModelLike { uri: URI; viewType: string } export const INotebookKernelService = createDecorator('INotebookKernelService'); @@ -64,7 +64,7 @@ export interface INotebookKernelService { readonly onDidAddKernel: Event; readonly onDidRemoveKernel: Event; readonly onDidChangeSelectedNotebooks: Event; - readonly onDidChangeNotebookAffinity: Event + readonly onDidChangeNotebookAffinity: Event; registerKernel(kernel: INotebookKernel): IDisposable; diff --git a/src/vs/workbench/contrib/notebook/common/notebookOptions.ts b/src/vs/workbench/contrib/notebook/common/notebookOptions.ts index aabc9d778560c..0de3b93ed33ab 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookOptions.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookOptions.ts @@ -50,7 +50,7 @@ export interface NotebookLayoutConfiguration { collapsedIndicatorHeight: number; showCellStatusBar: ShowCellStatusBarType; cellStatusBarHeight: number; - cellToolbarLocation: string | { [key: string]: string; }; + cellToolbarLocation: string | { [key: string]: string }; cellToolbarInteraction: string; compactView: boolean; focusIndicator: 'border' | 'gutter'; @@ -117,7 +117,7 @@ export class NotebookOptions extends Disposable { constructor( private readonly configurationService: IConfigurationService, private readonly notebookExecutionStateService: INotebookExecutionStateService, - private readonly overrides?: { cellToolbarInteraction: string, globalToolbar: boolean, defaultCellCollapseConfig?: NotebookCellDefaultCollapseConfig } + private readonly overrides?: { cellToolbarInteraction: string; globalToolbar: boolean; defaultCellCollapseConfig?: NotebookCellDefaultCollapseConfig } ) { super(); const showCellStatusBar = this.configurationService.getValue(NotebookSetting.showCellStatusBar); @@ -125,7 +125,7 @@ export class NotebookOptions extends Disposable { const consolidatedOutputButton = this.configurationService.getValue(NotebookSetting.consolidatedOutputButton) ?? true; const consolidatedRunButton = this.configurationService.getValue(NotebookSetting.consolidatedRunButton) ?? false; const dragAndDropEnabled = this.configurationService.getValue(NotebookSetting.dragAndDropEnabled) ?? true; - const cellToolbarLocation = this.configurationService.getValue(NotebookSetting.cellToolbarLocation) ?? { 'default': 'right' }; + const cellToolbarLocation = this.configurationService.getValue(NotebookSetting.cellToolbarLocation) ?? { 'default': 'right' }; const cellToolbarInteraction = overrides?.cellToolbarInteraction ?? this.configurationService.getValue(NotebookSetting.cellToolbarVisibility); const compactView = this.configurationService.getValue(NotebookSetting.compactView) ?? true; const focusIndicator = this._computeFocusIndicatorOption(); @@ -230,7 +230,7 @@ export class NotebookOptions extends Disposable { } if (cellToolbarLocation) { - configuration.cellToolbarLocation = this.configurationService.getValue(NotebookSetting.cellToolbarLocation) ?? { 'default': 'right' }; + configuration.cellToolbarLocation = this.configurationService.getValue(NotebookSetting.cellToolbarLocation) ?? { 'default': 'right' }; } if (cellToolbarInteraction && !this.overrides?.cellToolbarInteraction) { @@ -384,7 +384,7 @@ export class NotebookOptions extends Disposable { return this._layoutConfiguration.cellStatusBarHeight; } - private _computeBottomToolbarDimensions(compactView: boolean, insertToolbarPosition: 'betweenCells' | 'notebookToolbar' | 'both' | 'hidden', insertToolbarAlignment: 'left' | 'center', cellToolbar: 'right' | 'left' | 'hidden'): { bottomToolbarGap: number, bottomToolbarHeight: number; } { + private _computeBottomToolbarDimensions(compactView: boolean, insertToolbarPosition: 'betweenCells' | 'notebookToolbar' | 'both' | 'hidden', insertToolbarAlignment: 'left' | 'center', cellToolbar: 'right' | 'left' | 'hidden'): { bottomToolbarGap: number; bottomToolbarHeight: number } { if (insertToolbarAlignment === 'left' || cellToolbar !== 'hidden') { return { bottomToolbarGap: 18, @@ -408,7 +408,7 @@ export class NotebookOptions extends Disposable { } } - computeBottomToolbarDimensions(viewType?: string): { bottomToolbarGap: number, bottomToolbarHeight: number; } { + computeBottomToolbarDimensions(viewType?: string): { bottomToolbarGap: number; bottomToolbarHeight: number } { const configuration = this._layoutConfiguration; const cellToolbarPosition = this.computeCellToolbarLocation(viewType); const { bottomToolbarGap, bottomToolbarHeight } = this._computeBottomToolbarDimensions(configuration.compactView, configuration.insertToolbarPosition, configuration.insertToolbarAlignment, cellToolbarPosition); diff --git a/src/vs/workbench/contrib/notebook/common/notebookProvider.ts b/src/vs/workbench/contrib/notebook/common/notebookProvider.ts index f3ef53e63da0c..1b3847139a15d 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookProvider.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookProvider.ts @@ -13,10 +13,10 @@ import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; type NotebookSelector = string | glob.IRelativePattern | INotebookExclusiveDocumentFilter; export interface NotebookEditorDescriptor { - readonly extension?: ExtensionIdentifier, + readonly extension?: ExtensionIdentifier; readonly id: string; readonly displayName: string; - readonly selectors: readonly { filenamePattern?: string; excludeFileNamePattern?: string; }[]; + readonly selectors: readonly { filenamePattern?: string; excludeFileNamePattern?: string }[]; readonly priority: RegisteredEditorPriority; readonly providerDisplayName: string; readonly exclusive: boolean; diff --git a/src/vs/workbench/contrib/notebook/common/notebookService.ts b/src/vs/workbench/contrib/notebook/common/notebookService.ts index 32132d064389a..b8b830de8738c 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookService.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookService.ts @@ -22,7 +22,7 @@ export const INotebookService = createDecorator('notebookServi export interface INotebookContentProvider { options: TransientOptions; - open(uri: URI, backupId: string | VSBuffer | undefined, untitledDocumentData: VSBuffer | undefined, token: CancellationToken): Promise<{ data: NotebookData, transientOptions: TransientOptions; }>; + open(uri: URI, backupId: string | VSBuffer | undefined, untitledDocumentData: VSBuffer | undefined, token: CancellationToken): Promise<{ data: NotebookData; transientOptions: TransientOptions }>; save(uri: URI, token: CancellationToken): Promise; saveAs(uri: URI, target: URI, token: CancellationToken): Promise; backup(uri: URI, token: CancellationToken): Promise; @@ -30,7 +30,7 @@ export interface INotebookContentProvider { export interface INotebookSerializer { options: TransientOptions; - dataToNotebook(data: VSBuffer): Promise + dataToNotebook(data: VSBuffer): Promise; notebookToData(data: NotebookData): Promise; } @@ -91,6 +91,6 @@ export interface INotebookService { getNotebookProviderResourceRoots(): URI[]; setToCopy(items: NotebookCellTextModel[], isCopy: boolean): void; - getToCopy(): { items: NotebookCellTextModel[], isCopy: boolean; } | undefined; + getToCopy(): { items: NotebookCellTextModel[]; isCopy: boolean } | undefined; clearEditorCache(): void; } diff --git a/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.ts b/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.ts index 1a98e97b93034..ace5f4f4c1588 100644 --- a/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.ts +++ b/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.ts @@ -178,7 +178,7 @@ export class CellSequence implements ISequence { export class NotebookEditorSimpleWorker implements IRequestHandler, IDisposable { _requestHandlerBrand: any; - private _models: { [uri: string]: MirrorNotebookDocument; }; + private _models: { [uri: string]: MirrorNotebookDocument }; constructor() { this._models = Object.create(null); diff --git a/src/vs/workbench/contrib/notebook/test/browser/notebookExecutionStateService.test.ts b/src/vs/workbench/contrib/notebook/test/browser/notebookExecutionStateService.test.ts index 33dc381a181d8..004ee1e2b9f13 100644 --- a/src/vs/workbench/contrib/notebook/test/browser/notebookExecutionStateService.test.ts +++ b/src/vs/workbench/contrib/notebook/test/browser/notebookExecutionStateService.test.ts @@ -152,7 +152,7 @@ class TestNotebookKernel implements INotebookKernel { async executeNotebookCellsRequest(): Promise { } async cancelNotebookCellExecution(): Promise { } - constructor(opts?: { languages?: string[], id?: string }) { + constructor(opts?: { languages?: string[]; id?: string }) { this.supportedLanguages = opts?.languages ?? [PLAINTEXT_LANGUAGE_ID]; if (opts?.id) { this.id = opts?.id; diff --git a/src/vs/workbench/contrib/notebook/test/browser/notebookKernelService.test.ts b/src/vs/workbench/contrib/notebook/test/browser/notebookKernelService.test.ts index 801588e6ce779..b1ebabc1db227 100644 --- a/src/vs/workbench/contrib/notebook/test/browser/notebookKernelService.test.ts +++ b/src/vs/workbench/contrib/notebook/test/browser/notebookKernelService.test.ts @@ -178,7 +178,7 @@ class TestNotebookKernel implements INotebookKernel { throw new Error('Method not implemented.'); } - constructor(opts?: { languages?: string[], label?: string, viewType?: string }) { + constructor(opts?: { languages?: string[]; label?: string; viewType?: string }) { this.supportedLanguages = opts?.languages ?? [PLAINTEXT_LANGUAGE_ID]; this.label = opts?.label ?? this.label; this.viewType = opts?.viewType ?? this.viewType; diff --git a/src/vs/workbench/contrib/notebook/test/browser/testNotebookEditor.ts b/src/vs/workbench/contrib/notebook/test/browser/testNotebookEditor.ts index 86848e2664b25..19f9d37654593 100644 --- a/src/vs/workbench/contrib/notebook/test/browser/testNotebookEditor.ts +++ b/src/vs/workbench/contrib/notebook/test/browser/testNotebookEditor.ts @@ -179,7 +179,7 @@ export function setupInstantiationService(disposables = new DisposableStore()) { return instantiationService; } -function _createTestNotebookEditor(instantiationService: TestInstantiationService, cells: [source: string, lang: string, kind: CellKind, output?: IOutputDto[], metadata?: NotebookCellMetadata][]): { editor: IActiveNotebookEditorDelegate, viewModel: NotebookViewModel; } { +function _createTestNotebookEditor(instantiationService: TestInstantiationService, cells: [source: string, lang: string, kind: CellKind, output?: IOutputDto[], metadata?: NotebookCellMetadata][]): { editor: IActiveNotebookEditorDelegate; viewModel: NotebookViewModel } { const viewType = 'notebook'; const notebook = instantiationService.createInstance(NotebookTextModel, viewType, URI.parse('test'), cells.map(cell => { @@ -301,7 +301,7 @@ function _createTestNotebookEditor(instantiationService: TestInstantiationServic return { editor: notebookEditor, viewModel }; } -export function createTestNotebookEditor(instantiationService: TestInstantiationService, cells: [source: string, lang: string, kind: CellKind, output?: IOutputDto[], metadata?: NotebookCellMetadata][]): { editor: INotebookEditorDelegate, viewModel: NotebookViewModel; } { +export function createTestNotebookEditor(instantiationService: TestInstantiationService, cells: [source: string, lang: string, kind: CellKind, output?: IOutputDto[], metadata?: NotebookCellMetadata][]): { editor: INotebookEditorDelegate; viewModel: NotebookViewModel } { return _createTestNotebookEditor(instantiationService, cells); } diff --git a/src/vs/workbench/contrib/outline/browser/outlinePane.ts b/src/vs/workbench/contrib/outline/browser/outlinePane.ts index 8e0c9f370795d..8a345e3f73b74 100644 --- a/src/vs/workbench/contrib/outline/browser/outlinePane.ts +++ b/src/vs/workbench/contrib/outline/browser/outlinePane.ts @@ -325,7 +325,7 @@ export class OutlinePane extends ViewPane { this._editorControlDisposables.add(newOutline.onDidChange(revealActiveElement)); // feature: update view when user state changes - this._editorControlDisposables.add(this._outlineViewState.onDidChange((e: { followCursor?: boolean, sortBy?: boolean, filterOnType?: boolean }) => { + this._editorControlDisposables.add(this._outlineViewState.onDidChange((e: { followCursor?: boolean; sortBy?: boolean; filterOnType?: boolean }) => { this._outlineViewState.persist(this._storageService); if (e.filterOnType) { tree.updateOptions({ filterOnType: this._outlineViewState.filterOnType }); diff --git a/src/vs/workbench/contrib/outline/browser/outlineViewState.ts b/src/vs/workbench/contrib/outline/browser/outlineViewState.ts index 89f95e5717085..1d970d9056768 100644 --- a/src/vs/workbench/contrib/outline/browser/outlineViewState.ts +++ b/src/vs/workbench/contrib/outline/browser/outlineViewState.ts @@ -19,7 +19,7 @@ export class OutlineViewState { private _filterOnType = true; private _sortBy = OutlineSortOrder.ByPosition; - private readonly _onDidChange = new Emitter<{ followCursor?: boolean, sortBy?: boolean, filterOnType?: boolean }>(); + private readonly _onDidChange = new Emitter<{ followCursor?: boolean; sortBy?: boolean; filterOnType?: boolean }>(); readonly onDidChange = this._onDidChange.event; dispose(): void { diff --git a/src/vs/workbench/contrib/output/browser/output.contribution.ts b/src/vs/workbench/contrib/output/browser/output.contribution.ts index 2bd5d53595343..b6dbbb8caf7f9 100644 --- a/src/vs/workbench/contrib/output/browser/output.contribution.ts +++ b/src/vs/workbench/contrib/output/browser/output.contribution.ts @@ -232,7 +232,7 @@ registerAction2(class extends Action2 { async run(accessor: ServicesAccessor): Promise { const outputService = accessor.get(IOutputService); const quickInputService = accessor.get(IQuickInputService); - const entries: { id: string, label: string }[] = outputService.getChannelDescriptors().filter(c => c.file && c.log) + const entries: { id: string; label: string }[] = outputService.getChannelDescriptors().filter(c => c.file && c.log) .map(({ id, label }) => ({ id, label })); const entry = await quickInputService.pick(entries, { placeHolder: nls.localize('selectlog', "Select Log") }); diff --git a/src/vs/workbench/contrib/performance/browser/performance.web.contribution.ts b/src/vs/workbench/contrib/performance/browser/performance.web.contribution.ts index c603cb67efa69..d54886aee2e90 100644 --- a/src/vs/workbench/contrib/performance/browser/performance.web.contribution.ts +++ b/src/vs/workbench/contrib/performance/browser/performance.web.contribution.ts @@ -12,10 +12,10 @@ class ResourcePerformanceMarks { constructor(@ITelemetryService telemetryService: ITelemetryService) { - type Entry = { name: string; duration: number; }; + type Entry = { name: string; duration: number }; type EntryClassifify = { - name: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; }; - duration: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; }; + name: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + duration: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; }; for (const item of performance.getEntriesByType('resource')) { telemetryService.publicLog2('startup.resource.perf', { diff --git a/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts index 05a30925139da..e047966c95bad 100644 --- a/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts @@ -51,8 +51,8 @@ import { IEditorOptions } from 'vs/platform/editor/common/editor'; import { ToolBar } from 'vs/base/browser/ui/toolbar/toolbar'; type KeybindingEditorActionClassification = { - action: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - command: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + action: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + command: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; const $ = DOM.$; @@ -775,7 +775,7 @@ export class KeybindingsEditor extends EditorPane implements IKeybindingsEditorP } private reportKeybindingAction(action: string, command: string): void { - this.telemetryService.publicLog2<{ action: string, command: string }, KeybindingEditorActionClassification>('keybindingsEditor.action', { command, action }); + this.telemetryService.publicLog2<{ action: string; command: string }, KeybindingEditorActionClassification>('keybindingsEditor.action', { command, action }); } private onKeybindingEditingError(error: any): void { @@ -987,7 +987,7 @@ interface IWhenColumnTemplateData { readonly element: HTMLElement; readonly whenContainer: HTMLElement; readonly whenLabel: HighlightedLabel; - readonly whenInput: InputBox + readonly whenInput: InputBox; readonly renderDisposables: DisposableStore; readonly onDidAccept: Event; readonly onDidReject: Event; diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts index 163cd8864768f..554dac3d73ba2 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts @@ -170,8 +170,8 @@ class EditSettingRenderer extends Disposable { associatedPreferencesModel!: IPreferencesEditorModel; private toggleEditPreferencesForMouseMoveDelayer: Delayer; - private readonly _onUpdateSetting: Emitter<{ key: string, value: any, source: IIndexedSetting }> = new Emitter<{ key: string, value: any, source: IIndexedSetting }>(); - readonly onUpdateSetting: Event<{ key: string, value: any, source: IIndexedSetting }> = this._onUpdateSetting.event; + private readonly _onUpdateSetting: Emitter<{ key: string; value: any; source: IIndexedSetting }> = new Emitter<{ key: string; value: any; source: IIndexedSetting }>(); + readonly onUpdateSetting: Event<{ key: string; value: any; source: IIndexedSetting }> = this._onUpdateSetting.event; constructor(private editor: ICodeEditor, private primarySettingsModel: ISettingsEditorModel, private settingHighlighter: SettingHighlighter, @@ -372,7 +372,7 @@ class EditSettingRenderer extends Disposable { return true; } - private toAbsoluteCoords(position: Position): { x: number, y: number } { + private toAbsoluteCoords(position: Position): { x: number; y: number } { const positionCoords = this.editor.getScrolledVisiblePosition(position); const editorCoords = getDomNodePagePosition(this.editor.getDomNode()!); const x = editorCoords.left + positionCoords!.left; diff --git a/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts b/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts index 45486f1ee8d8b..dae73cd80eaf3 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts @@ -161,7 +161,7 @@ export class SettingsEditor2 extends EditorPane { private settingFastUpdateDelayer: Delayer; private settingSlowUpdateDelayer: Delayer; - private pendingSettingUpdate: { key: string, value: any; } | null = null; + private pendingSettingUpdate: { key: string; value: any } | null = null; private readonly viewState: ISettingsEditorViewState; private _searchResultModel: SearchResultModel | null = null; @@ -931,7 +931,7 @@ export class SettingsEditor2 extends EditorPane { }); } - private reportModifiedSetting(props: { key: string, query: string, searchResults: ISearchResult[] | null, rawResults: ISearchResult[] | null, showConfiguredOnly: boolean, isReset: boolean, settingsTarget: SettingsTarget; }): void { + private reportModifiedSetting(props: { key: string; query: string; searchResults: ISearchResult[] | null; rawResults: ISearchResult[] | null; showConfiguredOnly: boolean; isReset: boolean; settingsTarget: SettingsTarget }): void { this.pendingSettingUpdate = null; let groupId: string | undefined = undefined; @@ -1291,7 +1291,7 @@ export class SettingsEditor2 extends EditorPane { }; // Count unique results - const counts: { nlpResult?: number, filterResult?: number; } = {}; + const counts: { nlpResult?: number; filterResult?: number } = {}; const filterResult = results[SearchResultIdx.Local]; if (filterResult) { counts['filterResult'] = filterResult.filterMatches.length; diff --git a/src/vs/workbench/contrib/preferences/browser/settingsTree.ts b/src/vs/workbench/contrib/preferences/browser/settingsTree.ts index 4a39c64f8674b..799c845783347 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsTree.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsTree.ts @@ -382,7 +382,7 @@ function getShowAddButtonList(dataElement: SettingsTreeSettingElement, listDispl } } -export function resolveSettingsTree(tocData: ITOCEntry, coreSettingsGroups: ISettingsGroup[], logService: ILogService): { tree: ITOCEntry, leftoverSettings: Set } { +export function resolveSettingsTree(tocData: ITOCEntry, coreSettingsGroups: ISettingsGroup[], logService: ILogService): { tree: ITOCEntry; leftoverSettings: Set } { const allSettings = getFlatSettings(coreSettingsGroups); return { tree: _resolveSettingsTree(tocData, allSettings, logService), @@ -625,7 +625,7 @@ interface ISettingExcludeItemTemplate extends ISettingItemTemplate { } interface ISettingObjectItemTemplate extends ISettingItemTemplate | undefined> { - objectDropdownWidget?: ObjectSettingDropdownWidget, + objectDropdownWidget?: ObjectSettingDropdownWidget; objectCheckboxWidget?: ObjectSettingCheckboxWidget; validationErrorMessageElement: HTMLElement; } @@ -779,7 +779,7 @@ export abstract class AbstractSettingRenderer extends Disposable implements ITre return syncIgnoredElement; } - protected createDefaultOverrideIndicator(container: HTMLElement): { element: HTMLElement, label: SimpleIconLabel } { + protected createDefaultOverrideIndicator(container: HTMLElement): { element: HTMLElement; label: SimpleIconLabel } { const defaultOverrideIndicator = DOM.append(container, $('span.setting-item-default-overridden')); const defaultOverrideLabel = new SimpleIconLabel(defaultOverrideIndicator); return { element: defaultOverrideIndicator, label: defaultOverrideLabel }; diff --git a/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts b/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts index 27b1cbbc00b39..f4d426c0b36b5 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts @@ -503,7 +503,7 @@ function sanitizeId(id: string): string { return id.replace(/[\.\/]/, '_'); } -export function settingKeyToDisplayFormat(key: string, groupId = ''): { category: string, label: string; } { +export function settingKeyToDisplayFormat(key: string, groupId = ''): { category: string; label: string } { const lastDotIdx = key.lastIndexOf('.'); let category = ''; if (lastDotIdx >= 0) { diff --git a/src/vs/workbench/contrib/preferences/browser/settingsWidgets.ts b/src/vs/workbench/contrib/preferences/browser/settingsWidgets.ts index c894c09dfb472..ca809fc3390a7 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsWidgets.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsWidgets.ts @@ -324,9 +324,9 @@ export abstract class AbstractListSettingWidget extend protected abstract isItemNew(item: TDataItem): boolean; protected abstract addTooltipsToRow(rowElement: RowElementGroup, item: TDataItem): void; protected abstract getLocalizedStrings(): { - deleteActionTooltip: string - editActionTooltip: string - addButtonLabel: string + deleteActionTooltip: string; + editActionTooltip: string; + addButtonLabel: string; }; protected renderHeader(): HTMLElement | undefined { @@ -528,8 +528,8 @@ interface IListSetValueOptions { } export interface IListDataItem { - value: ObjectKey, - sibling?: string + value: ObjectKey; + sibling?: string; } interface ListSettingWidgetDragDetails { @@ -897,7 +897,7 @@ interface IObjectStringData { export interface IObjectEnumOption { value: string; - description?: string + description?: string; } interface IObjectEnumData { diff --git a/src/vs/workbench/contrib/preferences/common/preferences.ts b/src/vs/workbench/contrib/preferences/common/preferences.ts index 307d275b99c46..6318c87aa7e5c 100644 --- a/src/vs/workbench/contrib/preferences/common/preferences.ts +++ b/src/vs/workbench/contrib/preferences/common/preferences.ts @@ -18,7 +18,7 @@ export interface IWorkbenchSettingsConfiguration { useNaturalLanguageSearchPost: boolean; enableNaturalLanguageSearch: boolean; enableNaturalLanguageSearchFeedback: boolean; - } + }; }; } diff --git a/src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts b/src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts index a1884ae713680..68d4d3cd727ad 100644 --- a/src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts +++ b/src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts @@ -22,7 +22,7 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/ import { IProductService } from 'vs/platform/product/common/productService'; interface IConfiguration extends IWindowsConfiguration { - update?: { mode?: string; }; + update?: { mode?: string }; debug?: { console?: { wordWrap?: boolean } }; editor?: { accessibilitySupport?: 'on' | 'off' | 'auto' }; security?: { workspace?: { trust?: { enabled?: boolean } } }; diff --git a/src/vs/workbench/contrib/remote/browser/remote.ts b/src/vs/workbench/contrib/remote/browser/remote.ts index 4b90e5a49c02b..430fa601d9740 100644 --- a/src/vs/workbench/contrib/remote/browser/remote.ts +++ b/src/vs/workbench/contrib/remote/browser/remote.ts @@ -146,7 +146,7 @@ class HelpDataSource implements IAsyncDataSource { } } interface IHelpItem { - icon: ThemeIcon, + icon: ThemeIcon; iconClasses: string[]; label: string; handleClick(): Promise; @@ -723,7 +723,7 @@ export class RemoteAgentConnectionStatusListener extends Disposable implements I let reconnectWaitEvent: ReconnectionWaitEvent | null = null; let disposableListener: IDisposable | null = null; - function showProgress(location: ProgressLocation.Dialog | ProgressLocation.Notification | null, buttons: { label: string, callback: () => void }[], initialReport: string | null = null): VisibleProgress { + function showProgress(location: ProgressLocation.Dialog | ProgressLocation.Notification | null, buttons: { label: string; callback: () => void }[], initialReport: string | null = null): VisibleProgress { if (visibleProgress) { visibleProgress.dispose(); visibleProgress = null; @@ -775,10 +775,10 @@ export class RemoteAgentConnectionStatusListener extends Disposable implements I callback: () => { type ReconnectReloadClassification = { - remoteName: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - reconnectionToken: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - millisSinceLastIncomingData: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - attempt: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + remoteName: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + reconnectionToken: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + millisSinceLastIncomingData: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + attempt: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type ReconnectReloadEvent = { remoteName: string | undefined; @@ -819,8 +819,8 @@ export class RemoteAgentConnectionStatusListener extends Disposable implements I reconnectionAttempts = 0; type RemoteConnectionLostClassification = { - remoteName: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - reconnectionToken: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + remoteName: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + reconnectionToken: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type RemoteConnectionLostEvent = { remoteName: string | undefined; @@ -853,10 +853,10 @@ export class RemoteAgentConnectionStatusListener extends Disposable implements I reconnectionAttempts = e.attempt; type RemoteReconnectionRunningClassification = { - remoteName: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - reconnectionToken: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - millisSinceLastIncomingData: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - attempt: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + remoteName: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + reconnectionToken: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + millisSinceLastIncomingData: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + attempt: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type RemoteReconnectionRunningEvent = { remoteName: string | undefined; @@ -892,11 +892,11 @@ export class RemoteAgentConnectionStatusListener extends Disposable implements I reconnectionAttempts = e.attempt; type RemoteReconnectionPermanentFailureClassification = { - remoteName: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - reconnectionToken: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - millisSinceLastIncomingData: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - attempt: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - handled: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + remoteName: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + reconnectionToken: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + millisSinceLastIncomingData: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + attempt: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + handled: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type RemoteReconnectionPermanentFailureEvent = { remoteName: string | undefined; @@ -935,10 +935,10 @@ export class RemoteAgentConnectionStatusListener extends Disposable implements I reconnectionAttempts = e.attempt; type RemoteConnectionGainClassification = { - remoteName: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - reconnectionToken: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - millisSinceLastIncomingData: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - attempt: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + remoteName: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + reconnectionToken: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + millisSinceLastIncomingData: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + attempt: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type RemoteConnectionGainEvent = { remoteName: string | undefined; diff --git a/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts b/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts index e4748579291aa..935ba605c076c 100644 --- a/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts +++ b/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts @@ -613,7 +613,7 @@ class ProcAutomaticPortForwarding extends Disposable { return allTunnels; } - private async handleCandidateUpdate(removed: Map) { + private async handleCandidateUpdate(removed: Map) { const removedPorts: number[] = []; for (const removedPort of removed) { const key = removedPort[0]; diff --git a/src/vs/workbench/contrib/remote/browser/tunnelView.ts b/src/vs/workbench/contrib/remote/browser/tunnelView.ts index 298de73ffbd29..4ea1dc4cbb60b 100644 --- a/src/vs/workbench/contrib/remote/browser/tunnelView.ts +++ b/src/vs/workbench/contrib/remote/browser/tunnelView.ts @@ -569,7 +569,7 @@ class TunnelItem implements ITunnelItem { public tunnelType: TunnelType, public remoteHost: string, public remotePort: number, - public source: { source: TunnelSource, description: string }, + public source: { source: TunnelSource; description: string }, public hasRunningProcess: boolean, public protocol: TunnelProtocol, public localUri?: URI, @@ -1040,7 +1040,7 @@ namespace LabelTunnelAction { } export function handler(): ICommandHandler { - return async (accessor, arg): Promise<{ port: number, label: string } | undefined> => { + return async (accessor, arg): Promise<{ port: number; label: string } | undefined> => { const context = isITunnelItem(arg) ? arg : accessor.get(IContextKeyService).getContextKeyValue(TunnelViewSelectionKeyName); if (context) { return new Promise(resolve => { @@ -1080,7 +1080,7 @@ export namespace ForwardPortAction { export const TREEITEM_LABEL = nls.localize('remote.tunnel.forwardItem', "Forward Port"); const forwardPrompt = nls.localize('remote.tunnel.forwardPrompt', "Port number or address (eg. 3000 or 10.10.10.10:2000)."); - function validateInput(remoteExplorerService: IRemoteExplorerService, value: string, canElevate: boolean): { content: string, severity: Severity } | null { + function validateInput(remoteExplorerService: IRemoteExplorerService, value: string, canElevate: boolean): { content: string; severity: Severity } | null { const parsed = parseAddress(value); if (!parsed) { return { content: invalidPortString, severity: Severity.Error }; @@ -1108,7 +1108,7 @@ export namespace ForwardPortAction { remoteExplorerService.setEditable(undefined, TunnelEditId.New, { onFinish: async (value, success) => { remoteExplorerService.setEditable(undefined, TunnelEditId.New, null); - let parsed: { host: string, port: number } | undefined; + let parsed: { host: string; port: number } | undefined; if (success && (parsed = parseAddress(value))) { remoteExplorerService.forward({ remote: { host: parsed.host, port: parsed.port }, @@ -1134,7 +1134,7 @@ export namespace ForwardPortAction { prompt: forwardPrompt, validateInput: (value) => Promise.resolve(validateInput(remoteExplorerService, value, tunnelService.canElevate)) }); - let parsed: { host: string, port: number } | undefined; + let parsed: { host: string; port: number } | undefined; if (value && (parsed = parseAddress(value))) { remoteExplorerService.forward({ remote: { host: parsed.host, port: parsed.port }, @@ -1146,7 +1146,7 @@ export namespace ForwardPortAction { } interface QuickPickTunnel extends IQuickPickItem { - tunnel?: ITunnelItem + tunnel?: ITunnelItem; } function makeTunnelPicks(tunnels: Tunnel[], remoteExplorerService: IRemoteExplorerService, tunnelService: ITunnelService): QuickPickInput[] { @@ -1360,7 +1360,7 @@ namespace ChangeLocalPortAction { export const ID = 'remote.tunnel.changeLocalPort'; export const LABEL = nls.localize('remote.tunnel.changeLocalPort', "Change Local Address Port"); - function validateInput(value: string, canElevate: boolean): { content: string, severity: Severity } | null { + function validateInput(value: string, canElevate: boolean): { content: string; severity: Severity } | null { if (!value.match(/^[0-9]+$/)) { return { content: invalidPortString, severity: Severity.Error }; } else if (Number(value) >= maxPortNumber) { diff --git a/src/vs/workbench/contrib/remote/browser/urlFinder.ts b/src/vs/workbench/contrib/remote/browser/urlFinder.ts index 0d85ddb8b1e78..8eaaf1a715667 100644 --- a/src/vs/workbench/contrib/remote/browser/urlFinder.ts +++ b/src/vs/workbench/contrib/remote/browser/urlFinder.ts @@ -26,7 +26,7 @@ export class UrlFinder extends Disposable { private static readonly excludeTerminals = ['Dev Containers']; - private _onDidMatchLocalUrl: Emitter<{ host: string, port: number }> = new Emitter(); + private _onDidMatchLocalUrl: Emitter<{ host: string; port: number }> = new Emitter(); public readonly onDidMatchLocalUrl = this._onDidMatchLocalUrl.event; private listeners: Map = new Map(); @@ -68,7 +68,7 @@ export class UrlFinder extends Disposable { } } - private replPositions: Map = new Map(); + private replPositions: Map = new Map(); private processNewReplElements(session: IDebugSession) { const oldReplPosition = this.replPositions.get(session.getId()); const replElements = session.getReplElements(); diff --git a/src/vs/workbench/contrib/remote/electron-sandbox/remote.contribution.ts b/src/vs/workbench/contrib/remote/electron-sandbox/remote.contribution.ts index 172063360b9c0..2f2a01b942076 100644 --- a/src/vs/workbench/contrib/remote/electron-sandbox/remote.contribution.ts +++ b/src/vs/workbench/contrib/remote/electron-sandbox/remote.contribution.ts @@ -53,7 +53,7 @@ class RemoteAgentDiagnosticListener implements IWorkbenchContribution { @IRemoteAgentService remoteAgentService: IRemoteAgentService, @ILabelService labelService: ILabelService ) { - ipcRenderer.on('vscode:getDiagnosticInfo', (event: unknown, request: { replyChannel: string, args: IDiagnosticInfoOptions }): void => { + ipcRenderer.on('vscode:getDiagnosticInfo', (event: unknown, request: { replyChannel: string; args: IDiagnosticInfoOptions }): void => { const connection = remoteAgentService.getConnection(); if (connection) { const hostName = labelService.getHostLabel(Schemas.vscodeRemote, connection.remoteAuthority); diff --git a/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts b/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts index 6e4c8c8d69fba..b37bc3a192d44 100644 --- a/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts @@ -890,7 +890,7 @@ export const overviewRulerDeletedForeground = registerColor('editorOverviewRuler class DirtyDiffDecorator extends Disposable { - static createDecoration(className: string, options: { gutter: boolean, overview: { active: boolean, color: string }, minimap: { active: boolean, color: string }, isWholeLine: boolean }): ModelDecorationOptions { + static createDecoration(className: string, options: { gutter: boolean; overview: { active: boolean; color: string }; minimap: { active: boolean; color: string }; isWholeLine: boolean }): ModelDecorationOptions { const decorationOptions: IModelDecorationOptions = { description: 'dirty-diff-decoration', isWholeLine: options.isWholeLine, @@ -1078,8 +1078,8 @@ export class DirtyDiffModel extends Disposable { private readonly originalModelDisposables = this._register(new DisposableStore()); private _disposed = false; - private readonly _onDidChange = new Emitter<{ changes: IChange[], diff: ISplice[] }>(); - readonly onDidChange: Event<{ changes: IChange[], diff: ISplice[] }> = this._onDidChange.event; + private readonly _onDidChange = new Emitter<{ changes: IChange[]; diff: ISplice[] }>(); + readonly onDidChange: Event<{ changes: IChange[]; diff: ISplice[] }> = this._onDidChange.event; private _changes: IChange[] = []; get changes(): IChange[] { return this._changes; } diff --git a/src/vs/workbench/contrib/scm/browser/menus.ts b/src/vs/workbench/contrib/scm/browser/menus.ts index 0fcef83e992af..d3665c383ccbe 100644 --- a/src/vs/workbench/contrib/scm/browser/menus.ts +++ b/src/vs/workbench/contrib/scm/browser/menus.ts @@ -234,7 +234,7 @@ export class SCMMenus implements ISCMMenus, IDisposable { readonly titleMenu: SCMTitleMenu; private readonly disposables = new DisposableStore(); - private readonly menus = new Map void }>(); + private readonly menus = new Map void }>(); constructor( @ISCMService scmService: ISCMService, diff --git a/src/vs/workbench/contrib/scm/browser/scmViewPane.ts b/src/vs/workbench/contrib/scm/browser/scmViewPane.ts index e325909b30ba5..9e09f00c3b619 100644 --- a/src/vs/workbench/contrib/scm/browser/scmViewPane.ts +++ b/src/vs/workbench/contrib/scm/browser/scmViewPane.ts @@ -741,7 +741,7 @@ export class SCMTreeKeyboardNavigationLabelProvider implements ICompressibleKeyb @ILabelService private readonly labelService: ILabelService, ) { } - getKeyboardNavigationLabel(element: TreeElement): { toString(): string; } | { toString(): string; }[] | undefined { + getKeyboardNavigationLabel(element: TreeElement): { toString(): string } | { toString(): string }[] | undefined { if (ResourceTree.isResourceNode(element)) { return element.name; } else if (isSCMRepository(element) || isSCMInput(element) || isSCMActionButton(element)) { @@ -766,7 +766,7 @@ export class SCMTreeKeyboardNavigationLabelProvider implements ICompressibleKeyb } } - getCompressedNodeKeyboardNavigationLabel(elements: TreeElement[]): { toString(): string | undefined; } | undefined { + getCompressedNodeKeyboardNavigationLabel(elements: TreeElement[]): { toString(): string | undefined } | undefined { const folders = elements as IResourceNode[]; return folders.map(e => e.name).join('/'); } @@ -1603,7 +1603,7 @@ class SCMInputWidget extends Disposable { private placeholderTextContainer: HTMLElement; private inputEditor: CodeEditorWidget; - private model: { readonly input: ISCMInput; readonly textModel: ITextModel; } | undefined; + private model: { readonly input: ISCMInput; readonly textModel: ITextModel } | undefined; private repositoryContextKey: IContextKey; private repositoryDisposables = new DisposableStore(); diff --git a/src/vs/workbench/contrib/scm/common/scm.ts b/src/vs/workbench/contrib/scm/common/scm.ts index f69a318677990..1056cbab75ad7 100644 --- a/src/vs/workbench/contrib/scm/common/scm.ts +++ b/src/vs/workbench/contrib/scm/common/scm.ts @@ -99,7 +99,7 @@ export interface ISCMInputChangeEvent { export interface ISCMActionButtonDescriptor { command: Command; - description?: string + description?: string; } export interface ISCMActionButton { diff --git a/src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts b/src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts index fc3c337ddd392..4fe36be379c8b 100644 --- a/src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts +++ b/src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts @@ -57,7 +57,7 @@ interface IAnythingQuickPickItem extends IPickerQuickAccessItem, IQuickPickItemW interface IEditorSymbolAnythingQuickPickItem extends IAnythingQuickPickItem { resource: URI; - range: { decoration: IRange, selection: IRange } + range: { decoration: IRange; selection: IRange }; } function isEditorSymbolQuickPickItem(pick?: IAnythingQuickPickItem): pick is IEditorSymbolAnythingQuickPickItem { @@ -83,9 +83,9 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider | undefined = undefined; editorViewState: { - editor: EditorInput, - group: IEditorGroup, - state: ICodeEditorViewState | IDiffEditorViewState | undefined + editor: EditorInput; + group: IEditorGroup; + state: ICodeEditorViewState | IDiffEditorViewState | undefined; } | undefined = undefined; scorerCache: FuzzyScorerCache = Object.create(null); @@ -644,7 +644,7 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider { + private async openAnything(resourceOrEditor: URI | EditorInput | IResourceEditorInput, options: { keyMods?: IKeyMods; preserveFocus?: boolean; range?: IRange; forceOpenSideBySide?: boolean; forcePinned?: boolean }): Promise { // Craft some editor options based on quick access usage const editorOptions: ITextEditorOptions = { diff --git a/src/vs/workbench/contrib/search/browser/searchActions.ts b/src/vs/workbench/contrib/search/browser/searchActions.ts index 37764e4645540..becdd37f5511e 100644 --- a/src/vs/workbench/contrib/search/browser/searchActions.ts +++ b/src/vs/workbench/contrib/search/browser/searchActions.ts @@ -667,7 +667,7 @@ function matchToString(match: Match, indent = 0): string { } const lineDelimiter = isWindows ? '\r\n' : '\n'; -function fileMatchToString(fileMatch: FileMatch, labelService: ILabelService): { text: string, count: number } { +function fileMatchToString(fileMatch: FileMatch, labelService: ILabelService): { text: string; count: number } { const matchTextRows = fileMatch.matches() .sort(searchMatchComparer) .map(match => matchToString(match, 2)); @@ -678,7 +678,7 @@ function fileMatchToString(fileMatch: FileMatch, labelService: ILabelService): { }; } -function folderMatchToString(folderMatch: FolderMatchWithResource | FolderMatch, labelService: ILabelService): { text: string, count: number } { +function folderMatchToString(folderMatch: FolderMatchWithResource | FolderMatch, labelService: ILabelService): { text: string; count: number } { const fileResults: string[] = []; let numMatches = 0; diff --git a/src/vs/workbench/contrib/search/browser/searchView.ts b/src/vs/workbench/contrib/search/browser/searchView.ts index c726b0a5c6933..6c8df7d641709 100644 --- a/src/vs/workbench/contrib/search/browser/searchView.ts +++ b/src/vs/workbench/contrib/search/browser/searchView.ts @@ -1292,7 +1292,7 @@ export class SearchView extends ViewPane { this.searchWidget.focus(false); } - triggerQueryChange(_options?: { preserveFocus?: boolean, triggeredOnType?: boolean, delay?: number; }) { + triggerQueryChange(_options?: { preserveFocus?: boolean; triggeredOnType?: boolean; delay?: number }) { const options = { preserveFocus: true, triggeredOnType: false, delay: 0, ..._options }; if (options.triggeredOnType && !this.searchConfig.searchOnType) { return; } diff --git a/src/vs/workbench/contrib/search/browser/searchWidget.ts b/src/vs/workbench/contrib/search/browser/searchWidget.ts index ac268615d95d3..9746dab23b430 100644 --- a/src/vs/workbench/contrib/search/browser/searchWidget.ts +++ b/src/vs/workbench/contrib/search/browser/searchWidget.ts @@ -118,8 +118,8 @@ export class SearchWidget extends Widget { private ignoreGlobalFindBufferOnNextFocus = false; private previousGlobalFindBufferValue: string | null = null; - private _onSearchSubmit = this._register(new Emitter<{ triggeredOnType: boolean, delay: number }>()); - readonly onSearchSubmit: Event<{ triggeredOnType: boolean, delay: number }> = this._onSearchSubmit.event; + private _onSearchSubmit = this._register(new Emitter<{ triggeredOnType: boolean; delay: number }>()); + readonly onSearchSubmit: Event<{ triggeredOnType: boolean; delay: number }> = this._onSearchSubmit.event; private _onSearchCancel = this._register(new Emitter<{ focus: boolean }>()); readonly onSearchCancel: Event<{ focus: boolean }> = this._onSearchCancel.event; diff --git a/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.ts b/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.ts index 14c42043c8b32..bdcfb57f9e8a3 100644 --- a/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.ts +++ b/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.ts @@ -87,7 +87,7 @@ export class SymbolsQuickAccessProvider extends PickerQuickAccessProvider> { + async getSymbolPicks(filter: string, options: { skipLocal?: boolean; skipSorting?: boolean; delay?: number } | undefined, token: CancellationToken): Promise> { return this.delayer.trigger(async () => { if (token.isCancellationRequested) { return []; @@ -97,7 +97,7 @@ export class SymbolsQuickAccessProvider extends PickerQuickAccessProvider> { + private async doGetSymbolPicks(query: IPreparedQuery, options: { skipLocal?: boolean; skipSorting?: boolean } | undefined, token: CancellationToken): Promise> { // Split between symbol and container query let symbolQuery: IPreparedQuery; @@ -224,7 +224,7 @@ export class SymbolsQuickAccessProvider extends PickerQuickAccessProvider { + private async openSymbol(provider: IWorkspaceSymbolProvider, symbol: IWorkspaceSymbol, token: CancellationToken, options: { keyMods: IKeyMods; forceOpenSideBySide?: boolean; preserveFocus?: boolean; forcePinned?: boolean }): Promise { // Resolve actual symbol to open for providers that can resolve let symbolToOpen = symbol; diff --git a/src/vs/workbench/contrib/search/common/search.ts b/src/vs/workbench/contrib/search/common/search.ts index 843e7dd30bda6..49d1e61bf0388 100644 --- a/src/vs/workbench/contrib/search/common/search.ts +++ b/src/vs/workbench/contrib/search/common/search.ts @@ -124,8 +124,8 @@ export interface IWorkbenchSearchConfigurationProperties extends ISearchConfigur includeSymbols: boolean; includeHistory: boolean; history: { - filterSortOrder: 'default' | 'recency' - } + filterSortOrder: 'default' | 'recency'; + }; }; } diff --git a/src/vs/workbench/contrib/search/common/searchModel.ts b/src/vs/workbench/contrib/search/common/searchModel.ts index 33602186910aa..f2cd3e29dd411 100644 --- a/src/vs/workbench/contrib/search/common/searchModel.ts +++ b/src/vs/workbench/contrib/search/common/searchModel.ts @@ -80,7 +80,7 @@ export class Match { } @memoize - preview(): { before: string; inside: string; after: string; } { + preview(): { before: string; inside: string; after: string } { let before = this._oneLinePreviewText.substring(0, this._rangeInPreviewText.startColumn - 1), inside = this.getMatchString(), after = this._oneLinePreviewText.substring(this._rangeInPreviewText.endColumn - 1); @@ -195,8 +195,8 @@ export class FileMatch extends Disposable implements IFileMatch { return (selected ? FileMatch._CURRENT_FIND_MATCH : FileMatch._FIND_MATCH); } - private _onChange = this._register(new Emitter<{ didRemove?: boolean; forceUpdateModel?: boolean; }>()); - readonly onChange: Event<{ didRemove?: boolean; forceUpdateModel?: boolean; }> = this._onChange.event; + private _onChange = this._register(new Emitter<{ didRemove?: boolean; forceUpdateModel?: boolean }>()); + readonly onChange: Event<{ didRemove?: boolean; forceUpdateModel?: boolean }> = this._onChange.event; private _onDispose = this._register(new Emitter()); readonly onDispose: Event = this._onDispose.event; @@ -944,7 +944,7 @@ export class SearchResult extends Disposable { }); } - private groupFilesByFolder(fileMatches: IFileMatch[]): { byFolder: ResourceMap, other: IFileMatch[]; } { + private groupFilesByFolder(fileMatches: IFileMatch[]): { byFolder: ResourceMap; other: IFileMatch[] } { const rawPerFolder = new ResourceMap(); const otherFileMatches: IFileMatch[] = []; this._folderMatches.forEach(fm => rawPerFolder.set(fm.resource, [])); diff --git a/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.ts b/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.ts index a8f53a66c0d81..4d0742dc00a66 100644 --- a/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.ts +++ b/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.ts @@ -101,7 +101,7 @@ workbenchContributionsRegistry.registerWorkbenchContribution(SearchEditorContrib //#endregion //#region Input Serializer -type SerializedSearchEditor = { modelUri: string | undefined, dirty: boolean, config: SearchConfiguration, name: string, matchRanges: Range[], backingUri: string }; +type SerializedSearchEditor = { modelUri: string | undefined; dirty: boolean; config: SearchConfiguration; name: string; matchRanges: Range[]; backingUri: string }; class SearchEditorInputSerializer implements IEditorSerializer { @@ -170,18 +170,18 @@ CommandsRegistry.registerCommand( const category = { value: localize('search', "Search Editor"), original: 'Search Editor' }; export type LegacySearchEditorArgs = Partial<{ - query: string, - includes: string, - excludes: string, - contextLines: number, - wholeWord: boolean, - caseSensitive: boolean, - regexp: boolean, - useIgnores: boolean, - showIncludesExcludes: boolean, - triggerSearch: boolean, - focusResults: boolean, - location: 'reuse' | 'new' + query: string; + includes: string; + excludes: string; + contextLines: number; + wholeWord: boolean; + caseSensitive: boolean; + regexp: boolean; + useIgnores: boolean; + showIncludesExcludes: boolean; + triggerSearch: boolean; + focusResults: boolean; + location: 'reuse' | 'new'; }>; const translateLegacyConfig = (legacyConfig: LegacySearchEditorArgs & OpenSearchEditorArgs = {}): OpenSearchEditorArgs => { @@ -200,7 +200,7 @@ const translateLegacyConfig = (legacyConfig: LegacySearchEditorArgs & OpenSearch return config; }; -export type OpenSearchEditorArgs = Partial; +export type OpenSearchEditorArgs = Partial; const openArgDescription = { description: 'Open a new search editor. Arguments passed can include variables like ${relativeFileDirname}.', args: [{ diff --git a/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts b/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts index 16720d79af0a2..00c9ce82e5024 100644 --- a/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts +++ b/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts @@ -34,16 +34,16 @@ import { IResourceEditorInput } from 'vs/platform/editor/common/editor'; import { IDisposable } from 'vs/base/common/lifecycle'; export type SearchConfiguration = { - query: string, - filesToInclude: string, - filesToExclude: string, - contextLines: number, - matchWholeWord: boolean, - isCaseSensitive: boolean, - isRegexp: boolean, - useExcludeSettingsAndIgnoreFiles: boolean, - showIncludesExcludes: boolean, - onlyOpenEditors: boolean, + query: string; + filesToInclude: string; + filesToExclude: string; + contextLines: number; + matchWholeWord: boolean; + isCaseSensitive: boolean; + isRegexp: boolean; + useExcludeSettingsAndIgnoreFiles: boolean; + showIncludesExcludes: boolean; + onlyOpenEditors: boolean; }; export const SEARCH_EDITOR_EXT = '.code-search'; @@ -304,9 +304,9 @@ export class SearchEditorInput extends EditorInput { export const getOrMakeSearchEditorInput = ( accessor: ServicesAccessor, existingData: ( - | { from: 'model', config?: Partial, modelUri: URI, backupOf?: URI } - | { from: 'rawData', resultsContents: string | undefined, config: Partial } - | { from: 'existingFile', fileUri: URI }) + | { from: 'model'; config?: Partial; modelUri: URI; backupOf?: URI } + | { from: 'rawData'; resultsContents: string | undefined; config: Partial } + | { from: 'existingFile'; fileUri: URI }) ): SearchEditorInput => { const storageService = accessor.get(IStorageService); diff --git a/src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.ts b/src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.ts index 7e47427d01330..2100486f38db3 100644 --- a/src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.ts +++ b/src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.ts @@ -17,7 +17,7 @@ import { SearchEditorWorkingCopyTypeId } from 'vs/workbench/contrib/searchEditor import { Emitter } from 'vs/base/common/event'; import { ResourceMap } from 'vs/base/common/map'; -export type SearchEditorData = { resultsModel: ITextModel, configurationModel: SearchConfigurationModel }; +export type SearchEditorData = { resultsModel: ITextModel; configurationModel: SearchConfigurationModel }; export class SearchConfigurationModel { private _onConfigDidUpdate = new Emitter(); diff --git a/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.ts b/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.ts index 3d2e7daaf3f21..ddaccc8641b87 100644 --- a/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.ts +++ b/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.ts @@ -23,13 +23,13 @@ const translateRangeLines = (range: Range) => new Range(range.startLineNumber + n, range.startColumn, range.endLineNumber + n, range.endColumn); -const matchToSearchResultFormat = (match: Match, longestLineNumber: number): { line: string, ranges: Range[], lineNumber: string }[] => { +const matchToSearchResultFormat = (match: Match, longestLineNumber: number): { line: string; ranges: Range[]; lineNumber: string }[] => { const getLinePrefix = (i: number) => `${match.range().startLineNumber + i}`; const fullMatchLines = match.fullPreviewLines(); - const results: { line: string, ranges: Range[], lineNumber: string }[] = []; + const results: { line: string; ranges: Range[]; lineNumber: string }[] = []; fullMatchLines .forEach((sourceLine, i) => { @@ -41,7 +41,7 @@ const matchToSearchResultFormat = (match: Match, longestLineNumber: number): { l // split instead of replace to avoid creating a new string object const line = prefix + (sourceLine.split(/\r?\n?$/, 1)[0] || ''); - const rangeOnThisLine = ({ start, end }: { start?: number; end?: number; }) => new Range(1, (start ?? 1) + prefixOffset, 1, (end ?? sourceLine.length + 1) + prefixOffset); + const rangeOnThisLine = ({ start, end }: { start?: number; end?: number }) => new Range(1, (start ?? 1) + prefixOffset, 1, (end ?? sourceLine.length + 1) + prefixOffset); const matchRange = match.rangeInPreview(); const matchIsSingleLine = matchRange.startLineNumber === matchRange.endLineNumber; @@ -58,7 +58,7 @@ const matchToSearchResultFormat = (match: Match, longestLineNumber: number): { l return results; }; -type SearchResultSerialization = { text: string[], matchRanges: Range[] }; +type SearchResultSerialization = { text: string[]; matchRanges: Range[] }; function fileMatchToSearchResultFormat(fileMatch: FileMatch, labelFormatter: (x: URI) => string): SearchResultSerialization { const sortedMatches = fileMatch.matches().sort(searchMatchComparer); @@ -70,7 +70,7 @@ function fileMatchToSearchResultFormat(fileMatch: FileMatch, labelFormatter: (x: const targetLineNumberToOffset: Record = {}; - const context: { line: string, lineNumber: number }[] = []; + const context: { line: string; lineNumber: number }[] = []; fileMatch.context.forEach((line, lineNumber) => context.push({ line, lineNumber })); context.sort((a, b) => a.lineNumber - b.lineNumber); @@ -213,7 +213,7 @@ export const extractSearchQueryFromLines = (lines: string[]): SearchConfiguratio }; export const serializeSearchResultForEditor = - (searchResult: SearchResult, rawIncludePattern: string, rawExcludePattern: string, contextLines: number, labelFormatter: (x: URI) => string, sortOrder: SearchSortOrder, limitHit?: boolean): { matchRanges: Range[], text: string, config: Partial } => { + (searchResult: SearchResult, rawIncludePattern: string, rawExcludePattern: string, contextLines: number, labelFormatter: (x: URI) => string, sortOrder: SearchSortOrder, limitHit?: boolean): { matchRanges: Range[]; text: string; config: Partial } => { if (!searchResult.query) { throw Error('Internal Error: Expected query, got null'); } const config = contentPatternToSearchConfiguration(searchResult.query, rawIncludePattern, rawExcludePattern, contextLines); diff --git a/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.ts b/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.ts index 2220a8df7c672..aa6e96d9afe94 100644 --- a/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.ts +++ b/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.ts @@ -25,14 +25,14 @@ export class SnippetCompletion implements CompletionItem { detail: string; insertText: string; documentation?: MarkdownString; - range: IRange | { insert: IRange, replace: IRange }; + range: IRange | { insert: IRange; replace: IRange }; sortText: string; kind: CompletionItemKind; insertTextRules: CompletionItemInsertTextRule; constructor( readonly snippet: Snippet, - range: IRange | { insert: IRange, replace: IRange } + range: IRange | { insert: IRange; replace: IRange } ) { this.label = { label: snippet.prefix, description: snippet.name }; this.detail = localize('detail.snippet', "{0} ({1})", snippet.description || snippet.name, snippet.source); diff --git a/src/vs/workbench/contrib/tags/common/javaWorkspaceTags.ts b/src/vs/workbench/contrib/tags/common/javaWorkspaceTags.ts index cebb545f54869..28bc098ac81db 100644 --- a/src/vs/workbench/contrib/tags/common/javaWorkspaceTags.ts +++ b/src/vs/workbench/contrib/tags/common/javaWorkspaceTags.ts @@ -11,7 +11,7 @@ export const MavenDependencyRegex = /([\s\S]*?)<\/dependency>/g; export const MavenGroupIdRegex = /([\s\S]*?)<\/groupId>/; export const MavenArtifactIdRegex = /([\s\S]*?)<\/artifactId>/; -export const JavaLibrariesToLookFor: { groupId: string, artifactId: string, tag: string }[] = [ +export const JavaLibrariesToLookFor: { groupId: string; artifactId: string; tag: string }[] = [ // azure { 'groupId': 'com.microsoft.azure', 'artifactId': 'azure', 'tag': 'azure' }, { 'groupId': 'com.microsoft.azure', 'artifactId': 'azure-mgmt-.*', 'tag': 'azure' }, diff --git a/src/vs/workbench/contrib/tags/electron-sandbox/workspaceTags.ts b/src/vs/workbench/contrib/tags/electron-sandbox/workspaceTags.ts index 594ca8f06713e..615e6b491e455 100644 --- a/src/vs/workbench/contrib/tags/electron-sandbox/workspaceTags.ts +++ b/src/vs/workbench/contrib/tags/electron-sandbox/workspaceTags.ts @@ -67,7 +67,7 @@ export class WorkspaceTags implements IWorkbenchContribution { value = 'Unknown'; } - this.telemetryService.publicLog2<{ edition: string }, { edition: { classification: 'SystemMetaData', purpose: 'BusinessInsight' } }>('windowsEdition', { edition: value }); + this.telemetryService.publicLog2<{ edition: string }, { edition: { classification: 'SystemMetaData'; purpose: 'BusinessInsight' } }>('windowsEdition', { edition: value }); } private async getWorkspaceInformation(): Promise { @@ -230,7 +230,7 @@ export class WorkspaceTags implements IWorkbenchContribution { type = 'UNKNOWN'; } type ResolveProxyStatsClassification = { - type: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + type: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; this.telemetryService.publicLog2<{ type: String }, ResolveProxyStatsClassification>('resolveProxy.stats', { type }); }).then(undefined, onUnexpectedError); diff --git a/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts b/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts index f01e507338dd6..cf3b63f9e8ffb 100644 --- a/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts +++ b/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts @@ -92,7 +92,7 @@ export namespace ConfigureTaskAction { export const TEXT = nls.localize('ConfigureTaskRunnerAction.label', "Configure Task"); } -type TaskQuickPickEntryType = (IQuickPickItem & { task: Task; }) | (IQuickPickItem & { folder: IWorkspaceFolder; }) | (IQuickPickItem & { settingType: string; }); +type TaskQuickPickEntryType = (IQuickPickItem & { task: Task }) | (IQuickPickItem & { folder: IWorkspaceFolder }) | (IQuickPickItem & { settingType: string }); class ProblemReporter implements TaskConfig.IProblemReporter { @@ -191,7 +191,7 @@ interface ProblemMatcherDisableMetrics { type: string; } type ProblemMatcherDisableMetricsClassification = { - type: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + type: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; export abstract class AbstractTaskService extends Disposable implements ITaskService { @@ -861,8 +861,8 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer return this._recentlyUsedTasks; } - private getFolderFromTaskKey(key: string): { folder: string | undefined, isWorkspaceFile: boolean | undefined } { - const keyValue: { folder: string | undefined, id: string | undefined } = JSON.parse(key); + private getFolderFromTaskKey(key: string): { folder: string | undefined; isWorkspaceFile: boolean | undefined } { + const keyValue: { folder: string | undefined; id: string | undefined } = JSON.parse(key); return { folder: keyValue.folder, isWorkspaceFile: keyValue.id?.endsWith(TaskSourceKind.WorkspaceFile) }; @@ -2115,7 +2115,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer problemReporter.fatal(nls.localize('TaskSystem.configurationErrors', 'Error: the provided task configuration has validation errors and can\'t not be used. Please correct the errors first.')); return { workspaceFolder, set: undefined, configurations: undefined, hasErrors }; } - let customizedTasks: { byIdentifier: IStringDictionary; } | undefined; + let customizedTasks: { byIdentifier: IStringDictionary } | undefined; if (parseResult.configured && parseResult.configured.length > 0) { customizedTasks = { byIdentifier: Object.create(null) @@ -2132,7 +2132,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer }); } - private testParseExternalConfig(config: TaskConfig.ExternalTaskRunnerConfiguration | undefined, location: string): { config: TaskConfig.ExternalTaskRunnerConfiguration | undefined, hasParseErrors: boolean } { + private testParseExternalConfig(config: TaskConfig.ExternalTaskRunnerConfiguration | undefined, location: string): { config: TaskConfig.ExternalTaskRunnerConfiguration | undefined; hasParseErrors: boolean } { if (!config) { return { config: undefined, hasParseErrors: false }; } @@ -2160,7 +2160,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer } const workspaceFileConfig = this.getConfiguration(workspaceFolder, TaskSourceKind.WorkspaceFile); const configuration = this.testParseExternalConfig(workspaceFileConfig.config, nls.localize('TasksSystem.locationWorkspaceConfig', 'workspace file')); - let customizedTasks: { byIdentifier: IStringDictionary; } = { + let customizedTasks: { byIdentifier: IStringDictionary } = { byIdentifier: Object.create(null) }; @@ -2180,7 +2180,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer } const userTasksConfig = this.getConfiguration(workspaceFolder, TaskSourceKind.User); const configuration = this.testParseExternalConfig(userTasksConfig.config, nls.localize('TasksSystem.locationUserConfig', 'user settings')); - let customizedTasks: { byIdentifier: IStringDictionary; } = { + let customizedTasks: { byIdentifier: IStringDictionary } = { byIdentifier: Object.create(null) }; @@ -2246,7 +2246,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer let workspaceFolder: IWorkspaceFolder = this.contextService.getWorkspace().folders[0]; workspaceFolders.push(workspaceFolder); executionEngine = this.computeExecutionEngine(workspaceFolder); - const telemetryData: { [key: string]: any; } = { + const telemetryData: { [key: string]: any } = { executionEngineVersion: executionEngine }; /* __GDPR__ @@ -2647,7 +2647,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer } } - private tasksAndGroupedTasks(filter?: TaskFilter): { tasks: Promise, grouped: Promise } { + private tasksAndGroupedTasks(filter?: TaskFilter): { tasks: Promise; grouped: Promise } { if (!this.versionAndEngineCompatible(filter)) { return { tasks: Promise.resolve([]), grouped: Promise.resolve(new TaskMap()) }; } @@ -2696,7 +2696,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer this.showIgnoredFoldersMessage().then(() => { if (this.configurationService.getValue(USE_SLOW_PICKER)) { - let taskResult: { tasks: Promise, grouped: Promise } | undefined = undefined; + let taskResult: { tasks: Promise; grouped: Promise } | undefined = undefined; if (!tasks) { taskResult = this.tasksAndGroupedTasks(); } @@ -2738,7 +2738,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer }); } - private splitPerGroupType(tasks: Task[]): { none: Task[], defaults: Task[] } { + private splitPerGroupType(tasks: Task[]): { none: Task[]; defaults: Task[] } { let none: Task[] = []; let defaults: Task[] = []; for (let task of tasks) { @@ -3024,8 +3024,8 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer } configFileCreated = true; type TaskServiceTemplateClassification = { - templateId?: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - autoDetect: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + templateId?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + autoDetect: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; type TaskServiceEvent = { templateId?: string; @@ -3357,7 +3357,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer return undefined; } - private upgradeTask(task: Task, suppressTaskName: boolean, globalConfig: { windows?: CommandUpgrade, osx?: CommandUpgrade, linux?: CommandUpgrade }): TaskConfig.CustomTask | TaskConfig.ConfiguringTask | undefined { + private upgradeTask(task: Task, suppressTaskName: boolean, globalConfig: { windows?: CommandUpgrade; osx?: CommandUpgrade; linux?: CommandUpgrade }): TaskConfig.CustomTask | TaskConfig.ConfiguringTask | undefined { if (!CustomTask.is(task)) { return; } diff --git a/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.ts b/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.ts index c50630bda7519..270dafb67c223 100644 --- a/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.ts +++ b/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.ts @@ -86,7 +86,7 @@ export class RunAutomaticTasks extends Disposable implements IWorkbenchContribut return undefined; } - private static findAutoTasks(taskService: ITaskService, workspaceTaskResult: Map): { tasks: Array>, taskNames: Array, locations: Map } { + private static findAutoTasks(taskService: ITaskService, workspaceTaskResult: Map): { tasks: Array>; taskNames: Array; locations: Map } { const tasks = new Array>(); const taskNames = new Array(); const locations = new Map(); diff --git a/src/vs/workbench/contrib/tasks/browser/taskQuickPick.ts b/src/vs/workbench/contrib/tasks/browser/taskQuickPick.ts index 517811539b988..c78e28e9d0c68 100644 --- a/src/vs/workbench/contrib/tasks/browser/taskQuickPick.ts +++ b/src/vs/workbench/contrib/tasks/browser/taskQuickPick.ts @@ -111,7 +111,7 @@ export class TaskQuickPick extends Disposable { return tasks; } - private dedupeConfiguredAndRecent(recentTasks: (Task | ConfiguringTask)[], configuredTasks: (Task | ConfiguringTask)[]): { configuredTasks: (Task | ConfiguringTask)[], recentTasks: (Task | ConfiguringTask)[] } { + private dedupeConfiguredAndRecent(recentTasks: (Task | ConfiguringTask)[], configuredTasks: (Task | ConfiguringTask)[]): { configuredTasks: (Task | ConfiguringTask)[]; recentTasks: (Task | ConfiguringTask)[] } { let dedupedConfiguredTasks: (Task | ConfiguringTask)[] = []; const foundRecentTasks: boolean[] = Array(recentTasks.length).fill(false); for (let j = 0; j < configuredTasks.length; j++) { @@ -142,7 +142,7 @@ export class TaskQuickPick extends Disposable { return { configuredTasks: dedupedConfiguredTasks, recentTasks: prunedRecentTasks }; } - public async getTopLevelEntries(defaultEntry?: TaskQuickPickEntry): Promise<{ entries: QuickPickInput[], isSingleConfigured?: Task | ConfiguringTask }> { + public async getTopLevelEntries(defaultEntry?: TaskQuickPickEntry): Promise<{ entries: QuickPickInput[]; isSingleConfigured?: Task | ConfiguringTask }> { if (this.topLevelEntries !== undefined) { return { entries: this.topLevelEntries }; } diff --git a/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts b/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts index 52905aed7be49..28b4d584b3d03 100644 --- a/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts +++ b/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts @@ -135,7 +135,7 @@ export class VerifiedTask { return verified; } - public getVerifiedTask(): { task: Task, resolver: ITaskResolver, trigger: string, resolvedVariables: ResolvedVariables, systemInfo: TaskSystemInfo, workspaceFolder: IWorkspaceFolder, shellLaunchConfig: IShellLaunchConfig } { + public getVerifiedTask(): { task: Task; resolver: ITaskResolver; trigger: string; resolvedVariables: ResolvedVariables; systemInfo: TaskSystemInfo; workspaceFolder: IWorkspaceFolder; shellLaunchConfig: IShellLaunchConfig } { if (this.verify()) { return { task: this.task, resolver: this.resolver, trigger: this.trigger, resolvedVariables: this.resolvedVariables!, systemInfo: this.systemInfo!, workspaceFolder: this.workspaceFolder!, shellLaunchConfig: this.shellLaunchConfig! }; } else { @@ -1270,7 +1270,7 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem { isFeatureTerminal: true }; } else { - let resolvedResult: { command: CommandString, args: CommandString[] } = await this.resolveCommandAndArgs(resolver, task.command); + let resolvedResult: { command: CommandString; args: CommandString[] } = await this.resolveCommandAndArgs(resolver, task.command); command = resolvedResult.command; args = resolvedResult.args; commandExecutable = CommandString.value(command); @@ -1565,7 +1565,7 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem { } while (matches); } - private async resolveCommandAndArgs(resolver: VariableResolver, commandConfig: CommandConfiguration): Promise<{ command: CommandString, args: CommandString[] }> { + private async resolveCommandAndArgs(resolver: VariableResolver, commandConfig: CommandConfiguration): Promise<{ command: CommandString; args: CommandString[] }> { // First we need to use the command args: let args: CommandString[] = commandConfig.args ? commandConfig.args.slice() : []; args = await this.resolveVariables(resolver, args); diff --git a/src/vs/workbench/contrib/tasks/common/problemCollectors.ts b/src/vs/workbench/contrib/tasks/common/problemCollectors.ts index 6d43b2e5ae763..081843db236fe 100644 --- a/src/vs/workbench/contrib/tasks/common/problemCollectors.ts +++ b/src/vs/workbench/contrib/tasks/common/problemCollectors.ts @@ -355,7 +355,7 @@ export class StartStopProblemCollector extends AbstractProblemCollector implemen constructor(problemMatchers: ProblemMatcher[], markerService: IMarkerService, modelService: IModelService, _strategy: ProblemHandlingStrategy = ProblemHandlingStrategy.Clean, fileService?: IFileService) { super(problemMatchers, markerService, modelService, fileService); - let ownerSet: { [key: string]: boolean; } = Object.create(null); + let ownerSet: { [key: string]: boolean } = Object.create(null); problemMatchers.forEach(description => ownerSet[description.owner] = true); this.owners = Object.keys(ownerSet); this.owners.forEach((owner) => { diff --git a/src/vs/workbench/contrib/tasks/common/taskConfiguration.ts b/src/vs/workbench/contrib/tasks/common/taskConfiguration.ts index a4f8b9f7bf4fc..c1aa3ed64eaff 100644 --- a/src/vs/workbench/contrib/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/contrib/tasks/common/taskConfiguration.ts @@ -223,7 +223,7 @@ export interface LegacyCommandProperties { isShellCommand?: boolean | ShellConfiguration; } -export type CommandString = string | string[] | { value: string | string[], quoting: 'escape' | 'strong' | 'weak' }; +export type CommandString = string | string[] | { value: string | string[]; quoting: 'escape' | 'strong' | 'weak' }; export namespace CommandString { export function value(value: CommandString): string { @@ -806,7 +806,7 @@ namespace CommandOptions { if (target.env === undefined) { target.env = source.env; } else if (source.env !== undefined) { - let env: { [key: string]: string; } = Object.create(null); + let env: { [key: string]: string } = Object.create(null); if (target.env !== undefined) { Object.keys(target.env).forEach(key => env[key] = target.env![key]); } @@ -1144,7 +1144,7 @@ namespace ProblemMatcherConverter { return result; } - export function fromWithOsConfig(this: void, external: ConfigurationProperties & { [key: string]: any; }, context: ParseContext): ProblemMatcher[] | undefined { + export function fromWithOsConfig(this: void, external: ConfigurationProperties & { [key: string]: any }, context: ParseContext): ProblemMatcher[] | undefined { let result: ProblemMatcher[] | undefined = undefined; if (external.windows && external.windows.problemMatcher && context.platform === Platform.Windows) { result = from(external.windows.problemMatcher, context); @@ -1303,11 +1303,11 @@ namespace ConfigurationProperties { { property: 'options' } ]; - export function from(this: void, external: ConfigurationProperties & { [key: string]: any; }, context: ParseContext, includeCommandOptions: boolean, source: TaskConfigSource, properties?: IJSONSchemaMap): Tasks.ConfigurationProperties | undefined { + export function from(this: void, external: ConfigurationProperties & { [key: string]: any }, context: ParseContext, includeCommandOptions: boolean, source: TaskConfigSource, properties?: IJSONSchemaMap): Tasks.ConfigurationProperties | undefined { if (!external) { return undefined; } - let result: Tasks.ConfigurationProperties & { [key: string]: any; } = {}; + let result: Tasks.ConfigurationProperties & { [key: string]: any } = {}; if (properties) { for (const propertyName of Object.keys(properties)) { @@ -1667,8 +1667,8 @@ namespace TaskParser { if (!externals) { return result; } - let defaultBuildTask: { task: Tasks.Task | undefined; rank: number; } = { task: undefined, rank: -1 }; - let defaultTestTask: { task: Tasks.Task | undefined; rank: number; } = { task: undefined, rank: -1 }; + let defaultBuildTask: { task: Tasks.Task | undefined; rank: number } = { task: undefined, rank: -1 }; + let defaultTestTask: { task: Tasks.Task | undefined; rank: number } = { task: undefined, rank: -1 }; let schema2_0_0: boolean = context.schemaVersion === Tasks.JsonSchemaVersion.V2_0_0; const baseLoadIssues = Objects.deepClone(context.taskLoadIssues); for (let index = 0; index < externals.length; index++) { diff --git a/src/vs/workbench/contrib/tasks/common/taskService.ts b/src/vs/workbench/contrib/tasks/common/taskService.ts index 808c12110aea2..68a2394a8801e 100644 --- a/src/vs/workbench/contrib/tasks/common/taskService.ts +++ b/src/vs/workbench/contrib/tasks/common/taskService.ts @@ -33,7 +33,7 @@ export interface ProblemMatcherRunOptions { } export interface CustomizationProperties { - group?: string | { kind?: string; isDefault?: boolean; }; + group?: string | { kind?: string; isDefault?: boolean }; problemMatcher?: string | string[]; isBackground?: boolean; } diff --git a/src/vs/workbench/contrib/tasks/common/tasks.ts b/src/vs/workbench/contrib/tasks/common/tasks.ts index 44120aa2f580a..cb475cae0ee44 100644 --- a/src/vs/workbench/contrib/tasks/common/tasks.ts +++ b/src/vs/workbench/contrib/tasks/common/tasks.ts @@ -112,7 +112,7 @@ export interface CommandOptions { * The environment of the executed program or shell. If omitted * the parent process' environment is used. */ - env?: { [key: string]: string; }; + env?: { [key: string]: string }; } export namespace CommandOptions { @@ -1153,7 +1153,7 @@ export namespace KeyedTaskIdentifier { } export namespace TaskDefinition { - export function createTaskIdentifier(external: TaskIdentifier, reporter: { error(message: string): void; }): KeyedTaskIdentifier | undefined { + export function createTaskIdentifier(external: TaskIdentifier, reporter: { error(message: string): void }): KeyedTaskIdentifier | undefined { let definition = TaskDefinitionRegistry.get(external.type); if (definition === undefined) { // We have no task definition so we can't sanitize the literal. Take it as is diff --git a/src/vs/workbench/contrib/tasks/test/common/configuration.test.ts b/src/vs/workbench/contrib/tasks/test/common/configuration.test.ts index 003ddc19be11c..c1ef36f8b17c1 100644 --- a/src/vs/workbench/contrib/tasks/test/common/configuration.test.ts +++ b/src/vs/workbench/contrib/tasks/test/common/configuration.test.ts @@ -441,8 +441,8 @@ function assertConfiguration(result: ParseResult, expected: Tasks.Task[]): void // We can't compare Ids since the parser uses UUID which are random // So create a new map using the name. - let actualTasks: { [key: string]: Tasks.Task; } = Object.create(null); - let actualId2Name: { [key: string]: string; } = Object.create(null); + let actualTasks: { [key: string]: Tasks.Task } = Object.create(null); + let actualId2Name: { [key: string]: string } = Object.create(null); let actualTaskGroups = new TaskGroupMap(); actual.forEach(task => { assert.ok(!actualTasks[task.configurationProperties.name!]); @@ -454,7 +454,7 @@ function assertConfiguration(result: ParseResult, expected: Tasks.Task[]): void actualTaskGroups.add(taskId, task); } }); - let expectedTasks: { [key: string]: Tasks.Task; } = Object.create(null); + let expectedTasks: { [key: string]: Tasks.Task } = Object.create(null); let expectedTaskGroup = new TaskGroupMap(); expected.forEach(task => { assert.ok(!expectedTasks[task.configurationProperties.name!]); diff --git a/src/vs/workbench/contrib/telemetry/browser/telemetry.contribution.ts b/src/vs/workbench/contrib/telemetry/browser/telemetry.contribution.ts index bc7e49a15edf7..adf6f60619f5a 100644 --- a/src/vs/workbench/contrib/telemetry/browser/telemetry.contribution.ts +++ b/src/vs/workbench/contrib/telemetry/browser/telemetry.contribution.ts @@ -35,11 +35,11 @@ type TelemetryData = { }; type FileTelemetryDataFragment = { - mimeType: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - ext: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - path: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - reason?: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - allowlistedjson?: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + mimeType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + ext: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + path: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + reason?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + allowlistedjson?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; export class TelemetryContribution extends Disposable implements IWorkbenchContribution { @@ -65,30 +65,30 @@ export class TelemetryContribution extends Disposable implements IWorkbenchContr const activeViewlet = paneCompositeService.getActivePaneComposite(ViewContainerLocation.Sidebar); type WindowSizeFragment = { - innerHeight: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - innerWidth: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - outerHeight: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - outerWidth: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + innerHeight: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + innerWidth: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + outerHeight: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + outerWidth: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; type WorkspaceLoadClassification = { - userAgent: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - emptyWorkbench: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + userAgent: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + emptyWorkbench: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; windowSize: WindowSizeFragment; - 'workbench.filesToOpenOrCreate': { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - 'workbench.filesToDiff': { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - customKeybindingsCount: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - theme: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - language: { classification: 'SystemMetaData', purpose: 'BusinessInsight' }; - pinnedViewlets: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - restoredViewlet?: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - restoredEditors: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - startupKind: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + 'workbench.filesToOpenOrCreate': { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + 'workbench.filesToDiff': { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + customKeybindingsCount: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + theme: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + language: { classification: 'SystemMetaData'; purpose: 'BusinessInsight' }; + pinnedViewlets: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + restoredViewlet?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + restoredEditors: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + startupKind: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; type WorkspaceLoadEvent = { userAgent: string; - windowSize: { innerHeight: number, innerWidth: number, outerHeight: number, outerWidth: number }; + windowSize: { innerHeight: number; innerWidth: number; outerHeight: number; outerWidth: number }; emptyWorkbench: boolean; 'workbench.filesToOpenOrCreate': number; 'workbench.filesToDiff': number; @@ -134,7 +134,7 @@ export class TelemetryContribution extends Disposable implements IWorkbenchContr const settingsType = this.getTypeIfSettings(e.model.resource); if (settingsType) { type SettingsReadClassification = { - settingsType: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + settingsType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; this.telemetryService.publicLog2<{ settingsType: string }, SettingsReadClassification>('settingsRead', { settingsType }); // Do not log read to user settings.json and .vscode folder as a fileGet event as it ruins our JSON usage data @@ -149,7 +149,7 @@ export class TelemetryContribution extends Disposable implements IWorkbenchContr const settingsType = this.getTypeIfSettings(e.model.resource); if (settingsType) { type SettingsWrittenClassification = { - settingsType: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + settingsType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; this.telemetryService.publicLog2<{ settingsType: string }, SettingsWrittenClassification>('settingsWritten', { settingsType }); // Do not log write to user settings.json and .vscode folder as a filePUT event as it ruins our JSON usage data } else { diff --git a/src/vs/workbench/contrib/terminal/browser/links/terminalLinkManager.ts b/src/vs/workbench/contrib/terminal/browser/links/terminalLinkManager.ts index 0c0483347586e..af8ebaee92df1 100644 --- a/src/vs/workbench/contrib/terminal/browser/links/terminalLinkManager.ts +++ b/src/vs/workbench/contrib/terminal/browser/links/terminalLinkManager.ts @@ -408,7 +408,7 @@ export class TerminalLinkManager extends DisposableStore { return link; } - private async _resolvePath(link: string): Promise<{ uri: URI, link: string, isDirectory: boolean } | undefined> { + private async _resolvePath(link: string): Promise<{ uri: URI; link: string; isDirectory: boolean } | undefined> { if (!this._processManager) { throw new Error('Process manager is required'); } diff --git a/src/vs/workbench/contrib/terminal/browser/links/terminalLinkQuickpick.ts b/src/vs/workbench/contrib/terminal/browser/links/terminalLinkQuickpick.ts index 3d0f1be775402..51e87dfeeb410 100644 --- a/src/vs/workbench/contrib/terminal/browser/links/terminalLinkQuickpick.ts +++ b/src/vs/workbench/contrib/terminal/browser/links/terminalLinkQuickpick.ts @@ -64,7 +64,7 @@ export class TerminalLinkQuickpick { } export interface ITerminalLinkQuickPickItem extends IQuickPickItem { - link: ILink + link: ILink; } type LinkQuickPickItem = ITerminalLinkQuickPickItem | IQuickPickSeparator; diff --git a/src/vs/workbench/contrib/terminal/browser/links/terminalProtocolLinkProvider.ts b/src/vs/workbench/contrib/terminal/browser/links/terminalProtocolLinkProvider.ts index 226b0a48aa90c..939405c752ed4 100644 --- a/src/vs/workbench/contrib/terminal/browser/links/terminalProtocolLinkProvider.ts +++ b/src/vs/workbench/contrib/terminal/browser/links/terminalProtocolLinkProvider.ts @@ -25,7 +25,7 @@ export class TerminalProtocolLinkProvider extends TerminalBaseLinkProvider { private readonly _activateCallback: (event: MouseEvent | undefined, uri: string) => Promise, private readonly _wrapLinkHandler: (handler: (event: MouseEvent | undefined, link: string) => void) => XtermLinkMatcherHandler, private readonly _tooltipCallback: (link: TerminalLink, viewportRange: IViewportRange, modifierDownCallback?: () => void, modifierUpCallback?: () => void) => void, - private readonly _validationCallback: (link: string, callback: (result: { uri: URI, isDirectory: boolean } | undefined) => void) => void, + private readonly _validationCallback: (link: string, callback: (result: { uri: URI; isDirectory: boolean } | undefined) => void) => void, @IInstantiationService private readonly _instantiationService: IInstantiationService, @ICommandService private readonly _commandService: ICommandService, @IWorkspaceContextService private readonly _workspaceContextService: IWorkspaceContextService, diff --git a/src/vs/workbench/contrib/terminal/browser/links/terminalValidatedLocalLinkProvider.ts b/src/vs/workbench/contrib/terminal/browser/links/terminalValidatedLocalLinkProvider.ts index 80c855c5b910a..2f75b8a7c6246 100644 --- a/src/vs/workbench/contrib/terminal/browser/links/terminalValidatedLocalLinkProvider.ts +++ b/src/vs/workbench/contrib/terminal/browser/links/terminalValidatedLocalLinkProvider.ts @@ -51,7 +51,7 @@ export const unixLineAndColumnMatchIndex = 11; export const lineAndColumnClauseGroupCount = 6; const MAX_LENGTH = 2000; -const cachedValidatedLinks = new Map(); +const cachedValidatedLinks = new Map(); export class TerminalValidatedLocalLinkProvider extends TerminalBaseLinkProvider { private _cacheTilTimeout = 0; @@ -63,7 +63,7 @@ export class TerminalValidatedLocalLinkProvider extends TerminalBaseLinkProvider private readonly _activateFileCallback: (event: MouseEvent | undefined, link: string) => void, private readonly _wrapLinkHandler: (handler: (event: MouseEvent | undefined, link: string) => void) => XtermLinkMatcherHandler, private readonly _tooltipCallback: (link: TerminalLink, viewportRange: IViewportRange, modifierDownCallback?: () => void, modifierUpCallback?: () => void) => void, - private readonly _validationCallback: (link: string[], callback: (result: { uri: URI, link: string, isDirectory: boolean } | undefined) => void) => void, + private readonly _validationCallback: (link: string[], callback: (result: { uri: URI; link: string; isDirectory: boolean } | undefined) => void) => void, @IInstantiationService private readonly _instantiationService: IInstantiationService, @ICommandService private readonly _commandService: ICommandService, @IWorkspaceContextService private readonly _workspaceContextService: IWorkspaceContextService, @@ -156,7 +156,7 @@ export class TerminalValidatedLocalLinkProvider extends TerminalBaseLinkProvider // The link isn't cached if (linkStat === undefined) { - linkStat = await new Promise<{ uri: URI, link: string, isDirectory: boolean } | undefined>(r => { + linkStat = await new Promise<{ uri: URI; link: string; isDirectory: boolean } | undefined>(r => { const linkCandidates = [link]; if (link.match(/^(\.\.[\/\\])+/)) { linkCandidates.push(link.replace(/^(\.\.[\/\\])+/, '')); diff --git a/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts b/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts index 76a3859140fed..716cb74198eb0 100644 --- a/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts +++ b/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts @@ -50,7 +50,7 @@ export class RemoteTerminalBackendContribution implements IWorkbenchContribution class RemoteTerminalBackend extends BaseTerminalBackend implements ITerminalBackend { private readonly _ptys: Map = new Map(); - private readonly _onDidRequestDetach = this._register(new Emitter<{ requestId: number, workspaceId: string, instanceId: number }>()); + private readonly _onDidRequestDetach = this._register(new Emitter<{ requestId: number; workspaceId: string; instanceId: number }>()); readonly onDidRequestDetach = this._onDidRequestDetach.event; constructor( diff --git a/src/vs/workbench/contrib/terminal/browser/terminal.ts b/src/vs/workbench/contrib/terminal/browser/terminal.ts index 5bba5cca64bd9..63dc6e98c0a92 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminal.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminal.ts @@ -76,8 +76,8 @@ export const enum Direction { } export interface IQuickPickTerminalObject { - config: IRegisterContributedProfileArgs | ITerminalProfile | { profile: IExtensionTerminalProfile, options: { icon?: string, color?: string } } | undefined, - keyMods: IKeyMods | undefined + config: IRegisterContributedProfileArgs | ITerminalProfile | { profile: IExtensionTerminalProfile; options: { icon?: string; color?: string } } | undefined; + keyMods: IKeyMods | undefined; } export interface ICommandTracker { @@ -203,7 +203,7 @@ export interface ITerminalService extends ITerminalInstanceHost { getInstanceHost(target: ITerminalLocationOptions | undefined): ITerminalInstanceHost; getFindHost(instance?: ITerminalInstance): ITerminalFindHost; - resolveLocation(location?: ITerminalLocationOptions): TerminalLocation | undefined + resolveLocation(location?: ITerminalLocationOptions): TerminalLocation | undefined; setNativeDelegate(nativeCalls: ITerminalServiceNativeDelegate): void; handleNewRegisteredBackend(backend: ITerminalBackend): void; toggleEscapeSequenceLogging(): Promise; @@ -262,8 +262,8 @@ export interface ICreateTerminalOptions { } export interface TerminalEditorLocation { - viewColumn: EditorGroupColumn, - preserveFocus?: boolean + viewColumn: EditorGroupColumn; + preserveFocus?: boolean; } /** @@ -593,7 +593,7 @@ export interface ITerminalInstance { description: string | undefined; - userHome: string | undefined + userHome: string | undefined; /** * Shows the environment information hover if the widget exists. */ @@ -723,7 +723,7 @@ export interface ITerminalInstance { * * @param dimension The dimensions of the container. */ - layout(dimension: { width: number, height: number }): void; + layout(dimension: { width: number; height: number }): void; /** * Sets whether the terminal instance's element is visible in the DOM. @@ -873,7 +873,7 @@ export interface IXtermTerminal { export interface IRequestAddInstanceToGroupEvent { uri: URI; - side: 'before' | 'after' + side: 'before' | 'after'; } export const enum LinuxDistro { diff --git a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts index 96131f72b68f8..0770e05598bac 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts @@ -2231,7 +2231,7 @@ function focusNext(accessor: ServicesAccessor): void { listService.lastFocusedList?.focusNext(); } -export function validateTerminalName(name: string): { content: string, severity: Severity } | null { +export function validateTerminalName(name: string): { content: string; severity: Severity } | null { if (!name || name.trim().length === 0) { return { content: localize('emptyTerminalNameInfo', "Providing no name will reset it to the default value"), diff --git a/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.ts b/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.ts index 0924eaa7f87ef..3f4cf09c9f713 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.ts @@ -12,7 +12,7 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView export function openContextMenu(event: MouseEvent, parent: HTMLElement, menu: IMenu, contextMenuService: IContextMenuService, extraActions?: Action[]): void { const standardEvent = new StandardMouseEvent(event); - const anchor: { x: number, y: number } = { x: standardEvent.posx, y: standardEvent.posy }; + const anchor: { x: number; y: number } = { x: standardEvent.posx, y: standardEvent.posy }; const actions: IAction[] = []; const actionsDisposable = createAndFillInContextMenuActions(menu, undefined, actions); diff --git a/src/vs/workbench/contrib/terminal/browser/terminalDecorationsProvider.ts b/src/vs/workbench/contrib/terminal/browser/terminalDecorationsProvider.ts index 5a1df8f6e8dbe..45c07c5484022 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalDecorationsProvider.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalDecorationsProvider.ts @@ -12,9 +12,9 @@ import { Schemas } from 'vs/base/common/network'; import { getColorForSeverity } from 'vs/workbench/contrib/terminal/browser/terminalStatusList'; export interface ITerminalDecorationData { - tooltip: string, - statusIcon: string, - color: string + tooltip: string; + statusIcon: string; + color: string; } export class TerminalDecorationsProvider implements IDecorationsProvider { diff --git a/src/vs/workbench/contrib/terminal/browser/terminalEditorSerializer.ts b/src/vs/workbench/contrib/terminal/browser/terminalEditorSerializer.ts index e49def31ff03f..543d6ab489e8e 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalEditorSerializer.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalEditorSerializer.ts @@ -61,9 +61,9 @@ interface TerminalEditorInputObject { } export interface SerializedTerminalEditorInput extends TerminalEditorInputObject { - readonly resource: string + readonly resource: string; } export interface DeserializedTerminalEditorInput extends TerminalEditorInputObject { - readonly resource: URI + readonly resource: URI; } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalGroupService.ts b/src/vs/workbench/contrib/terminal/browser/terminalGroupService.ts index 50abd19f762a6..2b5f704ff052f 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalGroupService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalGroupService.ts @@ -476,8 +476,8 @@ export class TerminalGroupService extends Disposable implements ITerminalGroupSe } interface IInstanceLocation { - group: ITerminalGroup, - groupIndex: number, - instance: ITerminalInstance, - instanceIndex: number + group: ITerminalGroup; + groupIndex: number; + instance: ITerminalInstance; + instanceIndex: number; } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index 49afe6fc0eca5..4fed21f37326d 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -184,7 +184,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance { private _messageTitleDisposable: IDisposable | undefined; private _widgetManager: TerminalWidgetManager = this._instantiationService.createInstance(TerminalWidgetManager); private _linkManager: TerminalLinkManager | undefined; - private _environmentInfo: { widget: EnvironmentVariableInfoWidget, disposable: IDisposable } | undefined; + private _environmentInfo: { widget: EnvironmentVariableInfoWidget; disposable: IDisposable } | undefined; private _navigationModeAddon: INavigationMode & ITerminalAddon | undefined; private _dndObserver: IDisposable | undefined; private _terminalLinkQuickpick: TerminalLinkQuickpick | undefined; @@ -2299,7 +2299,7 @@ export class TerminalLabelComputer extends Disposable { get title(): string | undefined { return this._title; } get description(): string | undefined { return this._description; } - private readonly _onDidChangeLabel = this._register(new Emitter<{ title: string, description: string }>()); + private readonly _onDidChangeLabel = this._register(new Emitter<{ title: string; description: string }>()); readonly onDidChangeLabel = this._onDidChangeLabel.event; constructor( private readonly _configHelper: TerminalConfigHelper, @@ -2350,7 +2350,7 @@ export class TerminalLabelComputer extends Disposable { } //Remove special characters that could mess with rendering - let label = template(labelTemplate, (templateProperties as unknown) as { [key: string]: string | ISeparator | undefined | null; }).replace(/[\n\r\t]/g, '').trim(); + let label = template(labelTemplate, (templateProperties as unknown) as { [key: string]: string | ISeparator | undefined | null }).replace(/[\n\r\t]/g, '').trim(); return label === '' && labelType === TerminalLabelType.Title ? (this._instance.processName || '') : label; } @@ -2382,7 +2382,7 @@ export function parseExitResult( processState: ProcessState, initialCwd: string | undefined, shellIntegrationAttempted?: boolean -): { code: number | undefined, message: string | undefined } | undefined { +): { code: number | undefined; message: string | undefined } | undefined { // Only return a message if the exit code is non-zero if (exitCodeOrError === undefined || exitCodeOrError === 0) { return { code: exitCodeOrError, message: undefined }; diff --git a/src/vs/workbench/contrib/terminal/browser/terminalMenus.ts b/src/vs/workbench/contrib/terminal/browser/terminalMenus.ts index 52e5a4e25a534..94bbabfc054e2 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalMenus.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalMenus.ts @@ -701,11 +701,11 @@ export function setupTerminalMenus(): void { } export function getTerminalActionBarArgs(location: ITerminalLocationOptions, profiles: ITerminalProfile[], defaultProfileName: string, contributedProfiles: readonly IExtensionTerminalProfile[], instantiationService: IInstantiationService, terminalService: ITerminalService, contextKeyService: IContextKeyService, commandService: ICommandService, dropdownMenu: IMenu): { - primaryAction: MenuItemAction, - dropdownAction: IAction, - dropdownMenuActions: IAction[], - className: string, - dropdownIcon?: string + primaryAction: MenuItemAction; + dropdownAction: IAction; + dropdownMenuActions: IAction[]; + className: string; + dropdownIcon?: string; } { let dropdownActions: IAction[] = []; let submenuActions: IAction[] = []; diff --git a/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.ts b/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.ts index 06a6f3f4d7061..0f9d9bc942d97 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.ts @@ -24,8 +24,8 @@ export class TerminalProcessExtHostProxy extends Disposable implements ITerminal readonly onInput: Event = this._onInput.event; private readonly _onBinary = this._register(new Emitter()); readonly onBinary: Event = this._onBinary.event; - private readonly _onResize: Emitter<{ cols: number, rows: number }> = this._register(new Emitter<{ cols: number, rows: number }>()); - readonly onResize: Event<{ cols: number, rows: number }> = this._onResize.event; + private readonly _onResize: Emitter<{ cols: number; rows: number }> = this._register(new Emitter<{ cols: number; rows: number }>()); + readonly onResize: Event<{ cols: number; rows: number }> = this._onResize.event; private readonly _onAcknowledgeDataEvent = this._register(new Emitter()); readonly onAcknowledgeDataEvent: Event = this._onAcknowledgeDataEvent.event; private readonly _onShutdown = this._register(new Emitter()); diff --git a/src/vs/workbench/contrib/terminal/browser/terminalProfileQuickpick.ts b/src/vs/workbench/contrib/terminal/browser/terminalProfileQuickpick.ts index 58b112505bd28..e715b730b66fe 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalProfileQuickpick.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalProfileQuickpick.ts @@ -251,5 +251,5 @@ export interface IProfileQuickPickItem extends IQuickPickItem { } export interface ITerminalQuickPickItem extends IPickerQuickAccessItem { - terminal: ITerminalInstance + terminal: ITerminalInstance; } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.ts b/src/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.ts index dfe9ddaa1f4d1..5885b71b3a3d4 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalProfileResolverService.ts @@ -181,7 +181,7 @@ export abstract class BaseTerminalProfileResolverService implements ITerminalPro return URI.revive(icon); } if (typeof icon === 'object' && icon && 'light' in icon && 'dark' in icon) { - const castedIcon = (icon as { light: unknown, dark: unknown }); + const castedIcon = (icon as { light: unknown; dark: unknown }); if ((URI.isUri(castedIcon.light) || isUriComponents(castedIcon.light)) && (URI.isUri(castedIcon.dark) || isUriComponents(castedIcon.dark))) { return { light: URI.revive(castedIcon.light), dark: URI.revive(castedIcon.dark) }; } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalService.ts b/src/vs/workbench/contrib/terminal/browser/terminalService.ts index e29246b5271a6..29807b254b627 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalService.ts @@ -74,7 +74,7 @@ export class TerminalService implements ITerminalService { private _nativeDelegate?: ITerminalServiceNativeDelegate; private _shutdownWindowCount?: number; - private _editable: { instance: ITerminalInstance, data: IEditableData } | undefined; + private _editable: { instance: ITerminalInstance; data: IEditableData } | undefined; get isProcessSupportRegistered(): boolean { return !!this._processSupportContextKey.get(); } get connectionState(): TerminalConnectionState { return this._connectionState; } @@ -949,7 +949,7 @@ export class TerminalService implements ITerminalService { // Launch the contributed profile if (contributedProfile) { const resolvedLocation = this.resolveLocation(options?.location); - let location: TerminalLocation | { viewColumn: number, preserveState?: boolean } | { splitActiveTerminal: boolean } | undefined; + let location: TerminalLocation | { viewColumn: number; preserveState?: boolean } | { splitActiveTerminal: boolean } | undefined; if (splitActiveTerminal) { location = resolvedLocation === TerminalLocation.Editor ? { viewColumn: SIDE_GROUP } : { splitActiveTerminal: true }; } else { diff --git a/src/vs/workbench/contrib/terminal/browser/widgets/terminalHoverWidget.ts b/src/vs/workbench/contrib/terminal/browser/widgets/terminalHoverWidget.ts index 36606fccb8119..66c7dcd9702a9 100644 --- a/src/vs/workbench/contrib/terminal/browser/widgets/terminalHoverWidget.ts +++ b/src/vs/workbench/contrib/terminal/browser/widgets/terminalHoverWidget.ts @@ -19,8 +19,8 @@ const $ = dom.$; export interface ILinkHoverTargetOptions { readonly viewportRange: IViewportRange; - readonly cellDimensions: { width: number, height: number }; - readonly terminalDimensions: { width: number, height: number }; + readonly cellDimensions: { width: number; height: number }; + readonly terminalDimensions: { width: number; height: number }; readonly modifierDownCallback?: () => void; readonly modifierUpCallback?: () => void; } diff --git a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts index 5df6123d96e5c..bda599c26d6ae 100644 --- a/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts +++ b/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts @@ -249,7 +249,7 @@ export class XtermTerminal extends DisposableStore implements IXtermTerminal { return maxLineLength; } - private _getWrappedLineCount(index: number, buffer: IBuffer): { lineCount: number, currentIndex: number, endSpaces: number } { + private _getWrappedLineCount(index: number, buffer: IBuffer): { lineCount: number; currentIndex: number; endSpaces: number } { let line = buffer.getLine(index); if (!line) { throw new Error('Could not get line'); diff --git a/src/vs/workbench/contrib/terminal/common/environmentVariableService.ts b/src/vs/workbench/contrib/terminal/common/environmentVariableService.ts index 05767afce2d65..834986a1e6193 100644 --- a/src/vs/workbench/contrib/terminal/common/environmentVariableService.ts +++ b/src/vs/workbench/contrib/terminal/common/environmentVariableService.ts @@ -13,8 +13,8 @@ import { IEnvironmentVariableCollectionWithPersistence, IEnvironmentVariableServ import { TerminalStorageKeys } from 'vs/workbench/contrib/terminal/common/terminalStorageKeys'; interface ISerializableExtensionEnvironmentVariableCollection { - extensionIdentifier: string, - collection: ISerializableEnvironmentVariableCollection + extensionIdentifier: string; + collection: ISerializableEnvironmentVariableCollection; } /** diff --git a/src/vs/workbench/contrib/terminal/common/remoteTerminalChannel.ts b/src/vs/workbench/contrib/terminal/common/remoteTerminalChannel.ts index 86d40c5509527..c0521b853b6d8 100644 --- a/src/vs/workbench/contrib/terminal/common/remoteTerminalChannel.ts +++ b/src/vs/workbench/contrib/terminal/common/remoteTerminalChannel.ts @@ -35,7 +35,7 @@ export interface IWorkspaceFolderData { export interface ICreateTerminalProcessArguments { configuration: ICompleteTerminalConfiguration; - resolvedVariables: { [name: string]: string; }; + resolvedVariables: { [name: string]: string }; envVariableCollections: ITerminalEnvironmentVariableCollections; shellLaunchConfig: IShellLaunchConfigDto; workspaceId: string; @@ -47,7 +47,7 @@ export interface ICreateTerminalProcessArguments { cols: number; rows: number; unicodeVersion: '6' | '11'; - resolverEnv: { [key: string]: string | null; } | undefined + resolverEnv: { [key: string]: string | null } | undefined; } export interface ICreateTerminalProcessResult { @@ -72,29 +72,29 @@ export class RemoteTerminalChannelClient implements IPtyHostController { get onPtyHostRequestResolveVariables(): Event { return this._channel.listen('$onPtyHostRequestResolveVariablesEvent'); } - get onProcessData(): Event<{ id: number, event: IProcessDataEvent | string }> { - return this._channel.listen<{ id: number, event: IProcessDataEvent | string }>('$onProcessDataEvent'); + get onProcessData(): Event<{ id: number; event: IProcessDataEvent | string }> { + return this._channel.listen<{ id: number; event: IProcessDataEvent | string }>('$onProcessDataEvent'); } - get onProcessExit(): Event<{ id: number, event: number | undefined }> { - return this._channel.listen<{ id: number, event: number | undefined }>('$onProcessExitEvent'); + get onProcessExit(): Event<{ id: number; event: number | undefined }> { + return this._channel.listen<{ id: number; event: number | undefined }>('$onProcessExitEvent'); } - get onProcessReady(): Event<{ id: number, event: { pid: number, cwd: string, requireWindowsMode?: boolean } }> { - return this._channel.listen<{ id: number, event: { pid: number, cwd: string, requiresWindowsMode?: boolean } }>('$onProcessReadyEvent'); + get onProcessReady(): Event<{ id: number; event: { pid: number; cwd: string; requireWindowsMode?: boolean } }> { + return this._channel.listen<{ id: number; event: { pid: number; cwd: string; requiresWindowsMode?: boolean } }>('$onProcessReadyEvent'); } - get onProcessReplay(): Event<{ id: number, event: IPtyHostProcessReplayEvent }> { - return this._channel.listen<{ id: number, event: IPtyHostProcessReplayEvent }>('$onProcessReplayEvent'); + get onProcessReplay(): Event<{ id: number; event: IPtyHostProcessReplayEvent }> { + return this._channel.listen<{ id: number; event: IPtyHostProcessReplayEvent }>('$onProcessReplayEvent'); } get onProcessOrphanQuestion(): Event<{ id: number }> { return this._channel.listen<{ id: number }>('$onProcessOrphanQuestion'); } - get onExecuteCommand(): Event<{ reqId: number, commandId: string, commandArgs: any[] }> { - return this._channel.listen<{ reqId: number, commandId: string, commandArgs: any[] }>('$onExecuteCommand'); + get onExecuteCommand(): Event<{ reqId: number; commandId: string; commandArgs: any[] }> { + return this._channel.listen<{ reqId: number; commandId: string; commandArgs: any[] }>('$onExecuteCommand'); } - get onDidRequestDetach(): Event<{ requestId: number, workspaceId: string, instanceId: number }> { - return this._channel.listen<{ requestId: number, workspaceId: string, instanceId: number }>('$onDidRequestDetach'); + get onDidRequestDetach(): Event<{ requestId: number; workspaceId: string; instanceId: number }> { + return this._channel.listen<{ requestId: number; workspaceId: string; instanceId: number }>('$onDidRequestDetach'); } - get onDidChangeProperty(): Event<{ id: number, property: IProcessProperty }> { - return this._channel.listen<{ id: number, property: IProcessProperty }>('$onDidChangeProperty'); + get onDidChangeProperty(): Event<{ id: number; property: IProcessProperty }> { + return this._channel.listen<{ id: number; property: IProcessProperty }>('$onDidChangeProperty'); } constructor( diff --git a/src/vs/workbench/contrib/terminal/common/terminal.ts b/src/vs/workbench/contrib/terminal/common/terminal.ts index a7ce8690a29f9..b766671fdb5ea 100644 --- a/src/vs/workbench/contrib/terminal/common/terminal.ts +++ b/src/vs/workbench/contrib/terminal/common/terminal.ts @@ -65,7 +65,7 @@ export interface ITerminalProfileResolverService { export const ShellIntegrationExitCode = 633; export interface IRegisterContributedProfileArgs { - extensionIdentifier: string, id: string, title: string, options: ICreateContributedTerminalProfileOptions; + extensionIdentifier: string; id: string; title: string; options: ICreateContributedTerminalProfileOptions; } export const ITerminalProfileService = createDecorator('terminalProfileService'); @@ -113,7 +113,7 @@ export interface ITerminalBackend { */ onPtyHostRestart: Event; - onDidRequestDetach: Event<{ requestId: number, workspaceId: string, instanceId: number }>; + onDidRequestDetach: Event<{ requestId: number; workspaceId: string; instanceId: number }>; attachToProcess(id: number): Promise; listProcesses(): Promise; @@ -283,7 +283,7 @@ export interface ITerminalConfiguration { title: string; description: string; separator: string; - }, + }; bellDuration: number; defaultLocation: TerminalLocationString; customGlyphs: boolean; @@ -321,7 +321,7 @@ export interface IRemoteTerminalAttachTarget { workspaceId: string; workspaceName: string; isOrphan: boolean; - icon: URI | { light: URI; dark: URI } | { id: string, color?: { id: string } } | undefined; + icon: URI | { light: URI; dark: URI } | { id: string; color?: { id: string } } | undefined; color: string | undefined; fixedDimensions: IFixedTerminalDimensions | undefined; } @@ -349,7 +349,7 @@ export interface IXtermMarker { dispose(): void; onDispose: { (listener: () => any): { dispose(): void }; - } + }; } export interface INavigationMode { @@ -446,7 +446,7 @@ export interface ITerminalProcessExtHostProxy extends IDisposable { onInput: Event; onBinary: Event; - onResize: Event<{ cols: number, rows: number }>; + onResize: Event<{ cols: number; rows: number }>; onAcknowledgeDataEvent: Event; onShutdown: Event; onRequestInitialCwd: Event; diff --git a/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts b/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts index 9df17f38d09de..e0b0ca34cb22a 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts @@ -43,7 +43,7 @@ export const TERMINAL_TAB_ACTIVE_BORDER = registerColor('terminal.tab.activeBord hc: TAB_ACTIVE_BORDER }, nls.localize('terminal.tab.activeBorder', 'Border on the side of the terminal tab in the panel. This defaults to tab.activeBorder.')); -export const ansiColorMap: { [key: string]: { index: number, defaults: ColorDefaults } } = { +export const ansiColorMap: { [key: string]: { index: number; defaults: ColorDefaults } } = { 'terminal.ansiBlack': { index: 0, defaults: { diff --git a/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts b/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts index 414ea6f12ad9f..818d1c26424fe 100644 --- a/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts +++ b/src/vs/workbench/contrib/terminal/common/terminalEnvironment.ts @@ -419,7 +419,7 @@ shellIntegrationArgs.set(ShellIntegrationExecutable.ZshLogin, ['-c', '"${execIns shellIntegrationArgs.set(ShellIntegrationExecutable.Bash, ['--init-file', '${execInstallFolder}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh']); const loginArgs = ['-login', '-l']; const pwshImpliedArgs = ['-nol', '-nologo']; -export function injectShellIntegrationArgs(logService: ILogService, env: IProcessEnvironment, enableShellIntegration: boolean, shellLaunchConfig: IShellLaunchConfig, os?: OperatingSystem): { args: string | string[] | undefined, enableShellIntegration: boolean } { +export function injectShellIntegrationArgs(logService: ILogService, env: IProcessEnvironment, enableShellIntegration: boolean, shellLaunchConfig: IShellLaunchConfig, os?: OperatingSystem): { args: string | string[] | undefined; enableShellIntegration: boolean } { // Shell integration arg injection is disabled when: // - The global setting is disabled // - There is no executable (not sure what script to run) diff --git a/src/vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend.ts b/src/vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend.ts index be0f897041e36..74fb08b2f0260 100644 --- a/src/vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend.ts +++ b/src/vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend.ts @@ -45,7 +45,7 @@ export class LocalTerminalBackendContribution implements IWorkbenchContribution class LocalTerminalBackend extends BaseTerminalBackend implements ITerminalBackend { private readonly _ptys: Map = new Map(); - private readonly _onDidRequestDetach = this._register(new Emitter<{ requestId: number, workspaceId: string, instanceId: number }>()); + private readonly _onDidRequestDetach = this._register(new Emitter<{ requestId: number; workspaceId: string; instanceId: number }>()); readonly onDidRequestDetach = this._onDidRequestDetach.event; constructor( @@ -131,7 +131,7 @@ class LocalTerminalBackend extends BaseTerminalBackend implements ITerminalBacke await this._localPtyService.updateTitle(id, title, titleSource); } - async updateIcon(id: number, icon: URI | { light: URI; dark: URI } | { id: string, color?: { id: string } }, color?: string): Promise { + async updateIcon(id: number, icon: URI | { light: URI; dark: URI } | { id: string; color?: { id: string } }, color?: string): Promise { await this._localPtyService.updateIcon(id, icon, color); } diff --git a/src/vs/workbench/contrib/terminal/test/browser/links/terminalLinkHelpers.test.ts b/src/vs/workbench/contrib/terminal/test/browser/links/terminalLinkHelpers.test.ts index 56c271e5825ae..400cfc3f5fa68 100644 --- a/src/vs/workbench/contrib/terminal/test/browser/links/terminalLinkHelpers.test.ts +++ b/src/vs/workbench/contrib/terminal/test/browser/links/terminalLinkHelpers.test.ts @@ -156,7 +156,7 @@ suite('Workbench - Terminal Link Helpers', () => { const TEST_WIDE_CHAR = 'æ–‡'; const TEST_NULL_CHAR = 'C'; -function createBufferLineArray(lines: { text: string, width: number }[]): IBufferLine[] { +function createBufferLineArray(lines: { text: string; width: number }[]): IBufferLine[] { const result: IBufferLine[] = []; lines.forEach((l, i) => { result.push(new TestBufferLine( diff --git a/src/vs/workbench/contrib/terminal/test/browser/links/terminalProtocolLinkProvider.test.ts b/src/vs/workbench/contrib/terminal/test/browser/links/terminalProtocolLinkProvider.test.ts index f1e6768423460..f4827084bf4c3 100644 --- a/src/vs/workbench/contrib/terminal/test/browser/links/terminalProtocolLinkProvider.test.ts +++ b/src/vs/workbench/contrib/terminal/test/browser/links/terminalProtocolLinkProvider.test.ts @@ -19,9 +19,9 @@ suite('Workbench - TerminalProtocolLinkProvider', () => { instantiationService.stub(IConfigurationService, TestConfigurationService); }); - async function assertLink(text: string, expected: { text: string, range: [number, number][] }[]) { + async function assertLink(text: string, expected: { text: string; range: [number, number][] }[]) { const xterm = new Terminal(); - const provider = instantiationService.createInstance(TerminalProtocolLinkProvider, xterm, () => { }, () => { }, () => { }, (text: string, cb: (result: { uri: URI, isDirectory: boolean } | undefined) => void) => { + const provider = instantiationService.createInstance(TerminalProtocolLinkProvider, xterm, () => { }, () => { }, () => { }, (text: string, cb: (result: { uri: URI; isDirectory: boolean } | undefined) => void) => { cb({ uri: URI.parse(text), isDirectory: false }); }); diff --git a/src/vs/workbench/contrib/terminal/test/browser/links/terminalValidatedLocalLinkProvider.test.ts b/src/vs/workbench/contrib/terminal/test/browser/links/terminalValidatedLocalLinkProvider.test.ts index 57e7c0d7a7182..f62faf01d0081 100644 --- a/src/vs/workbench/contrib/terminal/test/browser/links/terminalValidatedLocalLinkProvider.test.ts +++ b/src/vs/workbench/contrib/terminal/test/browser/links/terminalValidatedLocalLinkProvider.test.ts @@ -87,7 +87,7 @@ suite('Workbench - TerminalValidatedLocalLinkProvider', () => { instantiationService.stub(IConfigurationService, TestConfigurationService); }); - async function assertLink(text: string, os: OperatingSystem, expected: { text: string, range: [number, number][] }[]) { + async function assertLink(text: string, os: OperatingSystem, expected: { text: string; range: [number, number][] }[]) { const xterm = new Terminal(); const provider = instantiationService.createInstance( TestTerminalValidatedLocalLinkProvider, @@ -96,7 +96,7 @@ suite('Workbench - TerminalValidatedLocalLinkProvider', () => { () => { }, () => { }, () => { }, - (linkCandidates: string, cb: (result: { uri: URI, link: string, isDirectory: boolean } | undefined) => void) => { + (linkCandidates: string, cb: (result: { uri: URI; link: string; isDirectory: boolean } | undefined) => void) => { cb({ uri: URI.file('/'), link: linkCandidates[0], isDirectory: false }); } ); diff --git a/src/vs/workbench/contrib/terminal/test/browser/links/terminalWordLinkProvider.test.ts b/src/vs/workbench/contrib/terminal/test/browser/links/terminalWordLinkProvider.test.ts index 7ba8a7dfdc934..c90b2dff695c0 100644 --- a/src/vs/workbench/contrib/terminal/test/browser/links/terminalWordLinkProvider.test.ts +++ b/src/vs/workbench/contrib/terminal/test/browser/links/terminalWordLinkProvider.test.ts @@ -50,8 +50,8 @@ const defaultTerminalConfig: Partial = { }; export interface ITerminalLinkActivationResult { - source: 'editor' | 'search', - link: string + source: 'editor' | 'search'; + link: string; } class TestFileService extends FileService { @@ -142,7 +142,7 @@ suite('Workbench - TerminalWordLinkProvider', () => { capabilities.add(TerminalCapability.CommandDetection, commandDetection); }); - async function assertLink(text: string, expected: { text: string, range: [number, number][], linkActivationResult?: ITerminalLinkActivationResult }[], assertActicationResult?: boolean) { + async function assertLink(text: string, expected: { text: string; range: [number, number][]; linkActivationResult?: ITerminalLinkActivationResult }[], assertActicationResult?: boolean) { xterm.dispose(); xterm = instantiationService.createInstance(XtermTerminal, Terminal, configHelper, 80, 30, TerminalLocation.Panel, capabilities); // We don't want to cancel the event or anything from the tests so just pass in a wrapped diff --git a/src/vs/workbench/contrib/terminal/test/browser/terminalProfileService.test.ts b/src/vs/workbench/contrib/terminal/test/browser/terminalProfileService.test.ts index 5fb8a0c76ec4d..7e10e587c255a 100644 --- a/src/vs/workbench/contrib/terminal/test/browser/terminalProfileService.test.ts +++ b/src/vs/workbench/contrib/terminal/test/browser/terminalProfileService.test.ts @@ -65,8 +65,8 @@ class MockTerminalProfileService implements Partial{ class MockQuickInputService implements Partial { _pick: IProfileQuickPickItem = powershellPick; - pick(picks: QuickPickInput[] | Promise[]>, options?: IPickOptions & { canPickMany: true; }, token?: CancellationToken): Promise; - pick(picks: QuickPickInput[] | Promise[]>, options?: IPickOptions & { canPickMany: false; }, token?: CancellationToken): Promise; + pick(picks: QuickPickInput[] | Promise[]>, options?: IPickOptions & { canPickMany: true }, token?: CancellationToken): Promise; + pick(picks: QuickPickInput[] | Promise[]>, options?: IPickOptions & { canPickMany: false }, token?: CancellationToken): Promise; pick(picks: QuickPickInput[] | Promise[]>, options?: Omit, 'canPickMany'>, token?: CancellationToken): Promise; async pick(picks: any, options?: any, token?: any): Promise { Promise.resolve(picks); diff --git a/src/vs/workbench/contrib/terminal/test/browser/terminalTypeahead.test.ts b/src/vs/workbench/contrib/terminal/test/browser/terminalTypeahead.test.ts index 0f93b55fda79b..b718f9aa134a8 100644 --- a/src/vs/workbench/contrib/terminal/test/browser/terminalTypeahead.test.ts +++ b/src/vs/workbench/contrib/terminal/test/browser/terminalTypeahead.test.ts @@ -439,8 +439,8 @@ function stubPrediction(): IPrediction { } function createMockTerminal({ lines, cursorAttrs }: { - lines: string[], - cursorAttrs?: any, + lines: string[]; + cursorAttrs?: any; }) { const written: string[] = []; const cursor = { y: 1, x: 1 }; diff --git a/src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts b/src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts index 975e4e690ec09..47da41f9fc4bc 100644 --- a/src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts +++ b/src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts @@ -52,7 +52,7 @@ class TestXtermTerminal extends XtermTerminal { export class TestViewDescriptorService implements Partial { private _location = ViewContainerLocation.Panel; - private _onDidChangeLocation = new Emitter<{ views: IViewDescriptor[], from: ViewContainerLocation, to: ViewContainerLocation }>(); + private _onDidChangeLocation = new Emitter<{ views: IViewDescriptor[]; from: ViewContainerLocation; to: ViewContainerLocation }>(); onDidChangeLocation = this._onDidChangeLocation.event; getViewLocationById(id: string) { return this._location; diff --git a/src/vs/workbench/contrib/terminal/test/node/terminalProfiles.test.ts b/src/vs/workbench/contrib/terminal/test/node/terminalProfiles.test.ts index 3fc4cf03f2279..7f7430622c5be 100644 --- a/src/vs/workbench/contrib/terminal/test/node/terminalProfiles.test.ts +++ b/src/vs/workbench/contrib/terminal/test/node/terminalProfiles.test.ts @@ -238,5 +238,5 @@ suite('Workbench - TerminalProfiles', () => { export interface ITestTerminalConfig { profiles: ITerminalProfiles; - useWslProfiles: boolean + useWslProfiles: boolean; } diff --git a/src/vs/workbench/contrib/testing/browser/testingConfigurationUi.ts b/src/vs/workbench/contrib/testing/browser/testingConfigurationUi.ts index c4125d0573f23..809868c283bdf 100644 --- a/src/vs/workbench/contrib/testing/browser/testingConfigurationUi.ts +++ b/src/vs/workbench/contrib/testing/browser/testingConfigurationUi.ts @@ -100,7 +100,7 @@ const triggerButtonHandler = (service: ITestProfileService, resolve: (arg: undef CommandsRegistry.registerCommand({ id: 'vscode.pickMultipleTestProfiles', handler: async (accessor: ServicesAccessor, options: IConfigurationPickerOptions & { - selected?: ITestRunProfile[], + selected?: ITestRunProfile[]; }) => { const profileService = accessor.get(ITestProfileService); const quickpick = buildPicker(accessor, options); diff --git a/src/vs/workbench/contrib/testing/browser/testingDecorations.ts b/src/vs/workbench/contrib/testing/browser/testingDecorations.ts index 8c7f2d9ec06cc..33c87c36a1e99 100644 --- a/src/vs/workbench/contrib/testing/browser/testingDecorations.ts +++ b/src/vs/workbench/contrib/testing/browser/testingDecorations.ts @@ -198,7 +198,7 @@ export class TestingDecorationService extends Disposable implements ITestingDeco const newDecorations = new TestDecorations(); model.changeDecorations(accessor => { - const runDecorations = new TestDecorations<{ line: number; id: ''; test: IncrementalTestCollectionItem, resultItem: TestResultItem | undefined }>(); + const runDecorations = new TestDecorations<{ line: number; id: ''; test: IncrementalTestCollectionItem; resultItem: TestResultItem | undefined }>(); for (const test of this.testService.collection.all) { if (!test.item.range || test.item.uri?.toString() !== uriStr) { continue; @@ -607,8 +607,8 @@ abstract class RunTestDecoration { constructor( protected tests: readonly { - test: IncrementalTestCollectionItem, - resultItem: TestResultItem | undefined, + test: IncrementalTestCollectionItem; + resultItem: TestResultItem | undefined; }[], private visible: boolean, protected readonly model: ITextModel, @@ -657,8 +657,8 @@ abstract class RunTestDecoration { * @returns true if options were changed, false otherwise */ public replaceOptions(newTests: readonly { - test: IncrementalTestCollectionItem, - resultItem: TestResultItem | undefined, + test: IncrementalTestCollectionItem; + resultItem: TestResultItem | undefined; }[], visible: boolean): boolean { if (visible === this.visible && equals(this.tests.map(t => t.test.item.extId), newTests.map(t => t.test.item.extId)) diff --git a/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts b/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts index dad19799097f1..e9bb775e61e1c 100644 --- a/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts +++ b/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts @@ -552,7 +552,7 @@ export class TestingOutputPeekController extends Disposable implements IEditorCo return; } - let previous: { messageIndex: number, taskIndex: number, result: ITestResult, test: TestResultItem } | undefined; + let previous: { messageIndex: number; taskIndex: number; result: ITestResult; test: TestResultItem } | undefined; for (const m of allMessages(this.testResults.results)) { if (dto.test.extId === m.test.item.extId && dto.messageIndex === m.messageIndex && dto.taskIndex === m.taskIndex && dto.resultId === m.result.id) { if (!previous) { diff --git a/src/vs/workbench/contrib/testing/browser/theme.ts b/src/vs/workbench/contrib/testing/browser/theme.ts index 198416933a6f5..31eda025bb90d 100644 --- a/src/vs/workbench/contrib/testing/browser/theme.ts +++ b/src/vs/workbench/contrib/testing/browser/theme.ts @@ -66,8 +66,8 @@ export const testingPeekHeaderBackground = registerColor('testing.peekHeaderBack export const testMessageSeverityColors: { [K in TestMessageType]: { - decorationForeground: string, - marginBackground: string, + decorationForeground: string; + marginBackground: string; }; } = { [TestMessageType.Error]: { diff --git a/src/vs/workbench/contrib/testing/common/ownedTestCollection.ts b/src/vs/workbench/contrib/testing/common/ownedTestCollection.ts index 47ce59727e865..a6507011e1458 100644 --- a/src/vs/workbench/contrib/testing/common/ownedTestCollection.ts +++ b/src/vs/workbench/contrib/testing/common/ownedTestCollection.ts @@ -46,7 +46,7 @@ export class SingleUseTestCollection extends Disposable { public readonly root = new TestItemRootImpl(this.controllerId, this.controllerId); public readonly tree = new Map(); - private readonly tags = new Map(); + private readonly tags = new Map(); protected diff: TestsDiff = []; diff --git a/src/vs/workbench/contrib/testing/common/testCollection.ts b/src/vs/workbench/contrib/testing/common/testCollection.ts index 31a63d028178b..a05d34a908aba 100644 --- a/src/vs/workbench/contrib/testing/common/testCollection.ts +++ b/src/vs/workbench/contrib/testing/common/testCollection.ts @@ -76,7 +76,7 @@ export interface ExtensionRunTestsRequest { include: string[]; exclude: string[]; controllerId: string; - profile?: { group: TestRunProfileBitset, id: number }; + profile?: { group: TestRunProfileBitset; id: number }; persist: boolean; } @@ -221,7 +221,7 @@ export interface TestResultItem extends InternalTestItem { } export type SerializedTestResultItem = Omit - & { children: string[], retired: undefined }; + & { children: string[]; retired: undefined }; /** * Test results serialized for transport and storage. diff --git a/src/vs/workbench/contrib/testing/common/testCoverage.ts b/src/vs/workbench/contrib/testing/common/testCoverage.ts index 2abedf8ca9a9f..7bed594032d62 100644 --- a/src/vs/workbench/contrib/testing/common/testCoverage.ts +++ b/src/vs/workbench/contrib/testing/common/testCoverage.ts @@ -8,8 +8,8 @@ import { URI } from 'vs/base/common/uri'; import { IFileCoverage, CoverageDetails, ICoveredCount } from 'vs/workbench/contrib/testing/common/testCollection'; export interface ICoverageAccessor { - provideFileCoverage: (token: CancellationToken) => Promise, - resolveFileCoverage: (fileIndex: number, token: CancellationToken) => Promise, + provideFileCoverage: (token: CancellationToken) => Promise; + resolveFileCoverage: (fileIndex: number, token: CancellationToken) => Promise; } /** diff --git a/src/vs/workbench/contrib/testing/common/testProfileService.ts b/src/vs/workbench/contrib/testing/common/testProfileService.ts index 24b026dddcb23..7c83d34d371a5 100644 --- a/src/vs/workbench/contrib/testing/common/testProfileService.ts +++ b/src/vs/workbench/contrib/testing/common/testProfileService.ts @@ -56,8 +56,8 @@ export interface ITestProfileService { * Gets all registered controllers, grouping by controller. */ all(): Iterable>; /** @@ -106,8 +106,8 @@ export class TestProfileService implements ITestProfileService { private readonly capabilitiesContexts: { [K in TestRunProfileBitset]: IContextKey }; private readonly changeEmitter = new Emitter(); private readonly controllerProfiles = new Map(); /** @inheritdoc */ diff --git a/src/vs/workbench/contrib/testing/common/testResultStorage.ts b/src/vs/workbench/contrib/testing/common/testResultStorage.ts index 0f0c4953635b1..6c27218694919 100644 --- a/src/vs/workbench/contrib/testing/common/testResultStorage.ts +++ b/src/vs/workbench/contrib/testing/common/testResultStorage.ts @@ -53,7 +53,7 @@ const currentRevision = 1; export abstract class BaseTestResultStorage implements ITestResultStorage { declare readonly _serviceBrand: undefined; - protected readonly stored = new StoredValue>({ + protected readonly stored = new StoredValue>({ key: 'storedTestResults', scope: StorageScope.WORKSPACE, target: StorageTarget.MACHINE @@ -118,7 +118,7 @@ export abstract class BaseTestResultStorage implements ITestResultStorage { */ public async persist(results: ReadonlyArray): Promise { const toDelete = new Map(this.stored.get([]).map(({ id, bytes }) => [id, bytes])); - const toStore: { rev: number, id: string; bytes: number }[] = []; + const toStore: { rev: number; id: string; bytes: number }[] = []; const todo: Promise[] = []; let budget = RETAIN_MAX_BYTES; diff --git a/src/vs/workbench/contrib/testing/common/testService.ts b/src/vs/workbench/contrib/testing/common/testService.ts index 981b4f7814eef..c54409681ba22 100644 --- a/src/vs/workbench/contrib/testing/common/testService.ts +++ b/src/vs/workbench/contrib/testing/common/testService.ts @@ -209,7 +209,7 @@ export interface ITestService { * Fires when the user requests to cancel a test run -- or all runs, if no * runId is given. */ - readonly onDidCancelTestRun: Event<{ runId: string | undefined; }>; + readonly onDidCancelTestRun: Event<{ runId: string | undefined }>; /** * Event that fires when the excluded tests change. diff --git a/src/vs/workbench/contrib/testing/test/browser/testObjectTree.ts b/src/vs/workbench/contrib/testing/test/browser/testObjectTree.ts index f37944259f12c..d5dd271b36e2f 100644 --- a/src/vs/workbench/contrib/testing/test/browser/testObjectTree.ts +++ b/src/vs/workbench/contrib/testing/test/browser/testObjectTree.ts @@ -13,7 +13,7 @@ import { TestsDiff, TestsDiffOp } from 'vs/workbench/contrib/testing/common/test import { ITestService } from 'vs/workbench/contrib/testing/common/testService'; import { testStubs } from 'vs/workbench/contrib/testing/test/common/testStubs'; -type SerializedTree = { e: string; children?: SerializedTree[], data?: string }; +type SerializedTree = { e: string; children?: SerializedTree[]; data?: string }; const element = document.createElement('div'); element.style.height = '1000px'; diff --git a/src/vs/workbench/contrib/themes/browser/themes.contribution.ts b/src/vs/workbench/contrib/themes/browser/themes.contribution.ts index f695cd85c89e0..123df7995adcd 100644 --- a/src/vs/workbench/contrib/themes/browser/themes.contribution.ts +++ b/src/vs/workbench/contrib/themes/browser/themes.contribution.ts @@ -453,7 +453,7 @@ registerAction2(class extends Action2 { } }); -CommandsRegistry.registerCommand('workbench.action.previewColorTheme', async function (accessor: ServicesAccessor, extension: { publisher: string, name: string, version: string; }, themeSettingsId?: string) { +CommandsRegistry.registerCommand('workbench.action.previewColorTheme', async function (accessor: ServicesAccessor, extension: { publisher: string; name: string; version: string }, themeSettingsId?: string) { const themeService = accessor.get(IWorkbenchThemeService); const themes = await themeService.getMarketplaceColorThemes(extension.publisher, extension.name, extension.version); @@ -540,7 +540,7 @@ registerAction2(class extends Action2 { const theme = themeService.getColorTheme(); const colors = Registry.as(ColorRegistryExtensions.ColorContribution).getColors(); const colorIds = colors.map(c => c.id).sort(); - const resultingColors: { [key: string]: string | null; } = {}; + const resultingColors: { [key: string]: string | null } = {}; const inherited: string[] = []; for (const colorId of colorIds) { const color = theme.getColor(colorId, false); diff --git a/src/vs/workbench/contrib/themes/browser/themes.test.contribution.ts b/src/vs/workbench/contrib/themes/browser/themes.test.contribution.ts index 91c825ec22c59..2fbc546da955a 100644 --- a/src/vs/workbench/contrib/themes/browser/themes.test.contribution.ts +++ b/src/vs/workbench/contrib/themes/browser/themes.test.contribution.ts @@ -23,7 +23,7 @@ import { splitLines } from 'vs/base/common/strings'; interface IToken { c: string; t: string; - r: { [themeName: string]: string | undefined; }; + r: { [themeName: string]: string | undefined }; } interface IThemedToken { @@ -40,7 +40,7 @@ interface IThemesResult { class ThemeDocument { private readonly _theme: IWorkbenchColorTheme; - private readonly _cache: { [scopes: string]: ThemeRule; }; + private readonly _cache: { [scopes: string]: ThemeRule }; private readonly _defaultColor: string; constructor(theme: IWorkbenchColorTheme) { @@ -194,7 +194,7 @@ class Snapper { } private _enrichResult(result: IToken[], themesResult: IThemesResult): void { - let index: { [themeName: string]: number; } = {}; + let index: { [themeName: string]: number } = {}; let themeNames = Object.keys(themesResult); for (const themeName of themeNames) { index[themeName] = 0; diff --git a/src/vs/workbench/contrib/timeline/browser/timelinePane.ts b/src/vs/workbench/contrib/timeline/browser/timelinePane.ts index 712f52e702f47..aadf76edef4ea 100644 --- a/src/vs/workbench/contrib/timeline/browser/timelinePane.ts +++ b/src/vs/workbench/contrib/timeline/browser/timelinePane.ts @@ -1244,7 +1244,7 @@ class TimelinePaneCommands extends Disposable { return this.getActions(MenuId.TimelineItemContext, { key: 'timelineItem', value: element.contextValue }).secondary; } - private getActions(menuId: MenuId, context: { key: string, value?: string }): { primary: IAction[]; secondary: IAction[]; } { + private getActions(menuId: MenuId, context: { key: string; value?: string }): { primary: IAction[]; secondary: IAction[] } { const contextKeyService = this.contextKeyService.createOverlay([ ['view', this.pane.id], [context.key, context.value], diff --git a/src/vs/workbench/contrib/timeline/common/timeline.ts b/src/vs/workbench/contrib/timeline/common/timeline.ts index bc5f45e8ef67d..b5c6f69de2643 100644 --- a/src/vs/workbench/contrib/timeline/common/timeline.ts +++ b/src/vs/workbench/contrib/timeline/common/timeline.ts @@ -27,9 +27,9 @@ export interface TimelineItem { timestamp: number; label: string; accessibilityInformation?: IAccessibilityInformation; - icon?: URI, - iconDark?: URI, - themeIcon?: ThemeIcon, + icon?: URI; + iconDark?: URI; + themeIcon?: ThemeIcon; description?: string; detail?: string; command?: Command; @@ -42,7 +42,7 @@ export interface TimelineItem { export interface TimelineChangeEvent { id: string; uri: URI | undefined; - reset: boolean + reset: boolean; } export interface TimelineOptions { @@ -61,7 +61,7 @@ export interface Timeline { paging?: { cursor: string | undefined; - } + }; } export interface TimelineProvider extends TimelineProviderDescriptor, IDisposable { diff --git a/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.ts b/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.ts index b01ae609ba426..6a1e3e1466fb5 100644 --- a/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.ts +++ b/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.ts @@ -82,7 +82,7 @@ export class IdentityProvider implements IIdentityProvider { public getDirection: () => TypeHierarchyDirection ) { } - getId(element: Type): { toString(): string; } { + getId(element: Type): { toString(): string } { let res = this.getDirection() + JSON.stringify(element.item.uri) + JSON.stringify(element.item.range); if (element.parent) { res += this.getId(element.parent); diff --git a/src/vs/workbench/contrib/typeHierarchy/common/typeHierarchy.ts b/src/vs/workbench/contrib/typeHierarchy/common/typeHierarchy.ts index 6d2cbba30536a..6edb40c71f696 100644 --- a/src/vs/workbench/contrib/typeHierarchy/common/typeHierarchy.ts +++ b/src/vs/workbench/contrib/typeHierarchy/common/typeHierarchy.ts @@ -32,7 +32,7 @@ export interface TypeHierarchyItem { uri: URI; range: IRange; selectionRange: IRange; - tags?: SymbolTag[] + tags?: SymbolTag[]; } export interface TypeHierarchySession { diff --git a/src/vs/workbench/contrib/url/browser/trustedDomains.ts b/src/vs/workbench/contrib/url/browser/trustedDomains.ts index 166494f29f47f..5ef0bf7f30f19 100644 --- a/src/vs/workbench/contrib/url/browser/trustedDomains.ts +++ b/src/vs/workbench/contrib/url/browser/trustedDomains.ts @@ -35,10 +35,10 @@ export const manageTrustedDomainSettingsCommand = { } }; -type ConfigureTrustedDomainsQuickPickItem = IQuickPickItem & ({ id: 'manage'; } | { id: 'trust'; toTrust: string }); +type ConfigureTrustedDomainsQuickPickItem = IQuickPickItem & ({ id: 'manage' } | { id: 'trust'; toTrust: string }); type ConfigureTrustedDomainsChoiceClassification = { - choice: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + choice: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; export async function configureOpenerTrustedDomainsHandler( diff --git a/src/vs/workbench/contrib/url/browser/trustedDomainsValidator.ts b/src/vs/workbench/contrib/url/browser/trustedDomainsValidator.ts index 52121395377e4..6ecfb47ac6725 100644 --- a/src/vs/workbench/contrib/url/browser/trustedDomainsValidator.ts +++ b/src/vs/workbench/contrib/url/browser/trustedDomainsValidator.ts @@ -26,7 +26,7 @@ import { IWorkspaceTrustManagementService } from 'vs/platform/workspace/common/w import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; type TrustedDomainsDialogActionClassification = { - action: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + action: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; export class OpenerValidatorContributions implements IWorkbenchContribution { diff --git a/src/vs/workbench/contrib/userDataSync/browser/userDataSync.ts b/src/vs/workbench/contrib/userDataSync/browser/userDataSync.ts index 210308864eb0d..bcd8241a22bdb 100644 --- a/src/vs/workbench/contrib/userDataSync/browser/userDataSync.ts +++ b/src/vs/workbench/contrib/userDataSync/browser/userDataSync.ts @@ -63,11 +63,11 @@ import { IHostService } from 'vs/workbench/services/host/browser/host'; const CONTEXT_CONFLICTS_SOURCES = new RawContextKey('conflictsSources', ''); -type ConfigureSyncQuickPickItem = { id: SyncResource, label: string, description?: string; }; +type ConfigureSyncQuickPickItem = { id: SyncResource; label: string; description?: string }; type SyncConflictsClassification = { - source: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true; }; - action?: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true; }; + source: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + action?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; const turnOnSyncCommand = { id: 'workbench.userDataSync.actions.turnOn', title: localize('turn on sync with category', "{0}: Turn On...", SYNC_TITLE) }; @@ -241,21 +241,21 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo { label: localize('replace remote', "Replace Remote"), run: () => { - this.telemetryService.publicLog2<{ source: string, action: string; }, SyncConflictsClassification>('sync/handleConflicts', { source: syncResource, action: 'acceptLocal' }); + this.telemetryService.publicLog2<{ source: string; action: string }, SyncConflictsClassification>('sync/handleConflicts', { source: syncResource, action: 'acceptLocal' }); this.acceptLocal(syncResource, conflicts); } }, { label: localize('replace local', "Replace Local"), run: () => { - this.telemetryService.publicLog2<{ source: string, action: string; }, SyncConflictsClassification>('sync/handleConflicts', { source: syncResource, action: 'acceptRemote' }); + this.telemetryService.publicLog2<{ source: string; action: string }, SyncConflictsClassification>('sync/handleConflicts', { source: syncResource, action: 'acceptRemote' }); this.acceptRemote(syncResource, conflicts); } }, { label: localize('show conflicts', "Show Conflicts"), run: () => { - this.telemetryService.publicLog2<{ source: string, action?: string; }, SyncConflictsClassification>('sync/showConflicts', { source: syncResource }); + this.telemetryService.publicLog2<{ source: string; action?: string }, SyncConflictsClassification>('sync/showConflicts', { source: syncResource }); this.handleConflicts([syncResource, conflicts]); } } @@ -749,7 +749,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo private async selectSettingsSyncService(userDataSyncStore: IUserDataSyncStore): Promise { return new Promise((c, e) => { const disposables: DisposableStore = new DisposableStore(); - const quickPick = disposables.add(this.quickInputService.createQuickPick<{ id: UserDataSyncStoreType, label: string, description?: string; }>()); + const quickPick = disposables.add(this.quickInputService.createQuickPick<{ id: UserDataSyncStoreType; label: string; description?: string }>()); quickPick.title = localize('switchSyncService.title', "{0}: Select Service", SYNC_TITLE); quickPick.description = localize('switchSyncService.description', "Ensure you are using the same settings sync service when syncing with multiple environments"); quickPick.hideInput = true; @@ -1423,7 +1423,7 @@ class AcceptChangesContribution extends Disposable implements IEditorContributio this._register(this.acceptChangesButton.onClick(async () => { const model = this.editor.getModel(); if (model) { - this.telemetryService.publicLog2<{ source: string, action: string; }, SyncConflictsClassification>('sync/handleConflicts', { source: syncResource, action: isRemote ? 'acceptRemote' : 'acceptLocal' }); + this.telemetryService.publicLog2<{ source: string; action: string }, SyncConflictsClassification>('sync/handleConflicts', { source: syncResource, action: isRemote ? 'acceptRemote' : 'acceptLocal' }); const syncAreaLabel = getSyncAreaLabel(syncResource); const result = await this.dialogService.confirm({ type: 'info', diff --git a/src/vs/workbench/contrib/userDataSync/browser/userDataSyncViews.ts b/src/vs/workbench/contrib/userDataSync/browser/userDataSyncViews.ts index 5d5f0fc04b137..203488f2fff74 100644 --- a/src/vs/workbench/contrib/userDataSync/browser/userDataSyncViews.ts +++ b/src/vs/workbench/contrib/userDataSync/browser/userDataSyncViews.ts @@ -207,7 +207,7 @@ export class UserDataSyncDataViews extends Disposable { } async run(accessor: ServicesAccessor, handle: TreeViewItemHandleArg): Promise { const commandService = accessor.get(ICommandService); - const { resource, comparableResource } = <{ resource: string, comparableResource: string }>JSON.parse(handle.$treeItemHandle); + const { resource, comparableResource } = <{ resource: string; comparableResource: string }>JSON.parse(handle.$treeItemHandle); const remoteResource = URI.parse(resource); const localResource = URI.parse(comparableResource); return commandService.executeCommand(API_OPEN_DIFF_EDITOR_COMMAND_ID, @@ -235,7 +235,7 @@ export class UserDataSyncDataViews extends Disposable { async run(accessor: ServicesAccessor, handle: TreeViewItemHandleArg): Promise { const dialogService = accessor.get(IDialogService); const userDataSyncService = accessor.get(IUserDataSyncService); - const { resource, syncResource } = <{ resource: string, syncResource: SyncResource }>JSON.parse(handle.$treeItemHandle); + const { resource, syncResource } = <{ resource: string; syncResource: SyncResource }>JSON.parse(handle.$treeItemHandle); const result = await dialogService.confirm({ message: localize({ key: 'confirm replace', comment: ['A confirmation message to replace current user data (settings, extensions, keybindings, snippets) with selected version'] }, "Would you like to replace your current {0} with selected?", getSyncAreaLabel(syncResource)), type: 'info', diff --git a/src/vs/workbench/contrib/webview/browser/overlayWebview.ts b/src/vs/workbench/contrib/webview/browser/overlayWebview.ts index 3e898e16f14ea..bb25dfdc17107 100644 --- a/src/vs/workbench/contrib/webview/browser/overlayWebview.ts +++ b/src/vs/workbench/contrib/webview/browser/overlayWebview.ts @@ -21,7 +21,7 @@ export class OverlayWebview extends Disposable implements IOverlayWebview { private readonly _onDidWheel = this._register(new Emitter()); public readonly onDidWheel = this._onDidWheel.event; - private readonly _pendingMessages = new Set<{ readonly message: any, readonly transfer?: readonly ArrayBuffer[] }>(); + private readonly _pendingMessages = new Set<{ readonly message: any; readonly transfer?: readonly ArrayBuffer[] }>(); private readonly _webview = this._register(new MutableDisposable()); private readonly _webviewEvents = this._register(new DisposableStore()); @@ -256,8 +256,8 @@ export class OverlayWebview extends Disposable implements IOverlayWebview { private readonly _onDidReload = this._register(new Emitter()); public readonly onDidReload = this._onDidReload.event; - private readonly _onDidScroll = this._register(new Emitter<{ scrollYPercentage: number; }>()); - public readonly onDidScroll: Event<{ scrollYPercentage: number; }> = this._onDidScroll.event; + private readonly _onDidScroll = this._register(new Emitter<{ scrollYPercentage: number }>()); + public readonly onDidScroll: Event<{ scrollYPercentage: number }> = this._onDidScroll.event; private readonly _onDidUpdateState = this._register(new Emitter()); public readonly onDidUpdateState: Event = this._onDidUpdateState.event; diff --git a/src/vs/workbench/contrib/webview/browser/resourceLoading.ts b/src/vs/workbench/contrib/webview/browser/resourceLoading.ts index 4bc801d414c74..9d717dd0c1c83 100644 --- a/src/vs/workbench/contrib/webview/browser/resourceLoading.ts +++ b/src/vs/workbench/contrib/webview/browser/resourceLoading.ts @@ -45,7 +45,7 @@ export namespace WebviewResourceResponse { export async function loadLocalResource( requestUri: URI, options: { - ifNoneMatch: string | undefined, + ifNoneMatch: string | undefined; roots: ReadonlyArray; }, fileService: IFileService, diff --git a/src/vs/workbench/contrib/webview/browser/themeing.ts b/src/vs/workbench/contrib/webview/browser/themeing.ts index 46aa22104a8c6..815dba525eb5a 100644 --- a/src/vs/workbench/contrib/webview/browser/themeing.ts +++ b/src/vs/workbench/contrib/webview/browser/themeing.ts @@ -62,7 +62,7 @@ export class WebviewThemeDataProvider extends Disposable { colors['vscode-' + entry.id.replace('.', '-')] = color.toString(); } return colors; - }, {} as { [key: string]: string; }); + }, {} as { [key: string]: string }); const styles = { 'vscode-font-family': DEFAULT_FONT_FAMILY, diff --git a/src/vs/workbench/contrib/webview/browser/webview.ts b/src/vs/workbench/contrib/webview/browser/webview.ts index 32e53a531b8dd..0db26467cbac2 100644 --- a/src/vs/workbench/contrib/webview/browser/webview.ts +++ b/src/vs/workbench/contrib/webview/browser/webview.ts @@ -80,7 +80,7 @@ export const enum WebviewContentPurpose { WebviewView = 'webviewView', } -export type WebviewStyles = { readonly [key: string]: string | number; }; +export type WebviewStyles = { readonly [key: string]: string | number }; export interface WebviewOptions { /** diff --git a/src/vs/workbench/contrib/webview/browser/webviewElement.ts b/src/vs/workbench/contrib/webview/browser/webviewElement.ts index f789b966c9991..04a487087cc73 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewElement.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewElement.ts @@ -83,7 +83,7 @@ namespace WebviewState { readonly type = Type.Initializing; constructor( - public readonly pendingMessages: Array<{ readonly channel: string, readonly data?: any }> + public readonly pendingMessages: Array<{ readonly channel: string; readonly data?: any }> ) { } } @@ -224,7 +224,7 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD this._onDidClickLink.fire(uri); })); - this._register(this.on(WebviewMessageChannels.onmessage, (data: { message: any, transfer?: ArrayBuffer[] }) => { + this._register(this.on(WebviewMessageChannels.onmessage, (data: { message: any; transfer?: ArrayBuffer[] }) => { this._onMessage.fire({ message: data.message, transfer: data.transfer, @@ -275,7 +275,7 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD this.handleKeyEvent('keyup', data); })); - this._register(this.on(WebviewMessageChannels.didContextMenu, (data: { clientX: number, clientY: number }) => { + this._register(this.on(WebviewMessageChannels.didContextMenu, (data: { clientX: number; clientY: number }) => { if (!this.element) { return; } @@ -298,7 +298,7 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD }); })); - this._register(this.on(WebviewMessageChannels.loadResource, async (entry: { id: number, path: string, query: string, scheme: string, authority: string, ifNoneMatch?: string }) => { + this._register(this.on(WebviewMessageChannels.loadResource, async (entry: { id: number; path: string; query: string; scheme: string; authority: string; ifNoneMatch?: string }) => { try { // Restore the authority we previously encoded const authority = decodeAuthority(entry.authority); @@ -381,7 +381,7 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD private readonly _onMessage = this._register(new Emitter()); public readonly onMessage = this._onMessage.event; - private readonly _onDidScroll = this._register(new Emitter<{ readonly scrollYPercentage: number; }>()); + private readonly _onDidScroll = this._register(new Emitter<{ readonly scrollYPercentage: number }>()); public readonly onDidScroll = this._onDidScroll.event; private readonly _onDidWheel = this._register(new Emitter()); @@ -512,10 +512,10 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD } type TelemetryClassification = { - extension?: { classification: 'SystemMetaData', purpose: 'FeatureInsight'; }; + extension?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; type TelemetryData = { - extension?: string, + extension?: string; }; this._telemetryService.publicLog2('webviewMissingCsp', { diff --git a/src/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.ts b/src/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.ts index 836162dbe8433..45d5a74cdf65b 100644 --- a/src/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.ts +++ b/src/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.ts @@ -44,14 +44,14 @@ export interface IWebviewWorkbenchService { ): WebviewInput; reviveWebview(options: { - id: string, - viewType: string, - title: string, - iconPath: WebviewIcons | undefined, - state: any, - webviewOptions: WebviewOptions, - contentOptions: WebviewContentOptions, - extension: WebviewExtensionDescription | undefined, + id: string; + viewType: string; + title: string; + iconPath: WebviewIcons | undefined; + state: any; + webviewOptions: WebviewOptions; + contentOptions: WebviewContentOptions; + extension: WebviewExtensionDescription | undefined; group: number | undefined; }): WebviewInput; @@ -142,7 +142,7 @@ export class LazilyResolvedWebviewEditorInput extends WebviewInput { class RevivalPool { - private _awaitingRevival: Array<{ input: WebviewInput, resolve: () => void; }> = []; + private _awaitingRevival: Array<{ input: WebviewInput; resolve: () => void }> = []; public add(input: WebviewInput, resolve: () => void) { this._awaitingRevival.push({ input, resolve }); @@ -268,15 +268,15 @@ export class WebviewEditorService extends Disposable implements IWebviewWorkbenc } public reviveWebview(options: { - id: string, - viewType: string, - title: string, - iconPath: WebviewIcons | undefined, - state: any, - webviewOptions: WebviewOptions, - contentOptions: WebviewContentOptions, - extension: WebviewExtensionDescription | undefined, - group: number | undefined, + id: string; + viewType: string; + title: string; + iconPath: WebviewIcons | undefined; + state: any; + webviewOptions: WebviewOptions; + contentOptions: WebviewContentOptions; + extension: WebviewExtensionDescription | undefined; + group: number | undefined; }): WebviewInput { const webview = this._webviewService.createWebviewOverlay(options.id, options.webviewOptions, options.contentOptions, options.extension); webview.state = options.state; diff --git a/src/vs/workbench/contrib/webviewView/browser/webviewViewService.ts b/src/vs/workbench/contrib/webviewView/browser/webviewViewService.ts index 268e96fe4e133..c3565f919d5b5 100644 --- a/src/vs/workbench/contrib/webviewView/browser/webviewViewService.ts +++ b/src/vs/workbench/contrib/webviewView/browser/webviewViewService.ts @@ -46,7 +46,7 @@ export class WebviewViewService extends Disposable implements IWebviewViewServic private readonly _resolvers = new Map(); - private readonly _awaitingRevival = new Map void }>(); + private readonly _awaitingRevival = new Map void }>(); private readonly _onNewResolverRegistered = this._register(new Emitter<{ readonly viewType: string }>()); public readonly onNewResolverRegistered = this._onNewResolverRegistered.event; diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts index ed86703db2b70..0cd72b62fb0fd 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts @@ -49,7 +49,7 @@ registerAction2(class extends Action2 { }); } - public run(accessor: ServicesAccessor, walkthroughID: string | { category: string, step: string } | undefined, toSide: boolean | undefined) { + public run(accessor: ServicesAccessor, walkthroughID: string | { category: string; step: string } | undefined, toSide: boolean | undefined) { const editorGroupsService = accessor.get(IEditorGroupsService); const instantiationService = accessor.get(IInstantiationService); const editorService = accessor.get(IEditorService); diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts index 689dff33c0bc3..b79a4edd21a9e 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts @@ -83,13 +83,13 @@ export const inWelcomeContext = new RawContextKey('inWelcome', false); export const embedderIdentifierContext = new RawContextKey('embedderIdentifier', undefined); export interface IWelcomePageStartEntry { - id: string - title: string - description: string - command: string - order: number - icon: { type: 'icon', icon: ThemeIcon } - when: ContextKeyExpression + id: string; + title: string; + description: string; + command: string; + order: number; + icon: { type: 'icon'; icon: ThemeIcon }; + when: ContextKeyExpression; } const parsedStartEntries: IWelcomePageStartEntry[] = startEntries.map((e, i) => ({ @@ -103,8 +103,8 @@ const parsedStartEntries: IWelcomePageStartEntry[] = startEntries.map((e, i) => })); type GettingStartedActionClassification = { - command: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; - argument: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; + command: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; + argument: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; }; type GettingStartedActionEvent = { @@ -278,7 +278,7 @@ export class GettingStartedPage extends EditorPane { return !this.configurationService.getValue(REDUCED_MOTION_KEY); } - private getWalkthroughCompletionStats(walkthrough: IResolvedWalkthrough): { stepsComplete: number, stepsTotal: number } { + private getWalkthroughCompletionStats(walkthrough: IResolvedWalkthrough): { stepsComplete: number; stepsTotal: number } { const activeSteps = walkthrough.steps.filter(s => this.contextService.contextMatchesRules(s.when)); return { stepsComplete: activeSteps.filter(s => s.done).length, @@ -723,7 +723,7 @@ export class GettingStartedPage extends EditorPane { this.detailsScrollbar?.scanDomNode(); } - private updateMediaSourceForColorMode(element: HTMLImageElement, sources: { hc: URI, dark: URI, light: URI }) { + private updateMediaSourceForColorMode(element: HTMLImageElement, sources: { hc: URI; dark: URI; light: URI }) { const themeType = this.themeService.getColorTheme().type; const src = sources[themeType].toString(true).replace(/ /g, '%20'); element.srcset = src.toLowerCase().endsWith('.svg') ? src : (src + ' 1.5x'); @@ -1282,7 +1282,7 @@ export class GettingStartedPage extends EditorPane { }); } - private iconWidgetFor(category: IResolvedWalkthrough | { icon: { type: 'icon', icon: ThemeIcon } }) { + private iconWidgetFor(category: IResolvedWalkthrough | { icon: { type: 'icon'; icon: ThemeIcon } }) { const widget = category.icon.type === 'icon' ? $(ThemeIcon.asCSSSelector(category.icon.icon)) : $('img.category-icon', { src: category.icon.path }); widget.classList.add('icon-widget'); return widget; diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.ts index 915a6534e73bd..df617e9ad9785 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.ts @@ -37,7 +37,7 @@ export class GettingStartedInput extends EditorInput { } constructor( - options: { selectedCategory?: string, selectedStep?: string, showTelemetryNotice?: boolean, } + options: { selectedCategory?: string; selectedStep?: string; showTelemetryNotice?: boolean } ) { super(); this.selectedCategory = options.selectedCategory; diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedList.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedList.ts index ff8093649d348..6fef8b0769f0a 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedList.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedList.ts @@ -22,7 +22,7 @@ type GettingStartedIndexListOptions = { contextService: IContextKeyService; }; -export class GettingStartedIndexList extends Disposable { +export class GettingStartedIndexList extends Disposable { private readonly _onDidChangeEntries = new Emitter(); private readonly onDidChangeEntries: Event = this._onDidChangeEntries.event; diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts index 261ded6d6cf16..ed0b2c0d8b62a 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts @@ -46,59 +46,59 @@ export type WalkthroughMetaDataType = Map & { steps: (Omit & { description: string })[] }; export interface IResolvedWalkthrough extends IWalkthrough { - steps: IResolvedWalkthroughStep[] - newItems: boolean - recencyBonus: number - newEntry: boolean + steps: IResolvedWalkthroughStep[]; + newItems: boolean; + recencyBonus: number; + newEntry: boolean; } export interface IWalkthroughStep { - id: string - title: string - description: LinkedText[] - category: string - when: ContextKeyExpression - order: number - completionEvents: string[] + id: string; + title: string; + description: LinkedText[]; + category: string; + when: ContextKeyExpression; + order: number; + completionEvents: string[]; media: - | { type: 'image', path: { hc: URI, light: URI, dark: URI }, altText: string } - | { type: 'svg', path: URI, altText: string } - | { type: 'markdown', path: URI, base: URI, root: URI } + | { type: 'image'; path: { hc: URI; light: URI; dark: URI }; altText: string } + | { type: 'svg'; path: URI; altText: string } + | { type: 'markdown'; path: URI; base: URI; root: URI }; } -type StepProgress = { done: boolean; }; +type StepProgress = { done: boolean }; export interface IResolvedWalkthroughStep extends IWalkthroughStep, StepProgress { } export interface IWalkthroughsService { - _serviceBrand: undefined, + _serviceBrand: undefined; - readonly onDidAddWalkthrough: Event - readonly onDidRemoveWalkthrough: Event - readonly onDidChangeWalkthrough: Event - readonly onDidProgressStep: Event + readonly onDidAddWalkthrough: Event; + readonly onDidRemoveWalkthrough: Event; + readonly onDidChangeWalkthrough: Event; + readonly onDidProgressStep: Event; readonly installedExtensionsRegistered: Promise; - getWalkthroughs(): IResolvedWalkthrough[] - getWalkthrough(id: string): IResolvedWalkthrough + getWalkthroughs(): IResolvedWalkthrough[]; + getWalkthrough(id: string): IResolvedWalkthrough; registerWalkthrough(descriptor: IWalkthroughLoose): void; @@ -280,7 +280,7 @@ export class WalkthroughsService extends Disposable implements IWalkthroughsServ ? URI.parse(path, true) : FileAccess.asFileUri(joinPath(extension.extensionLocation, path)); - const convertExtensionRelativePathsToBrowserURIs = (path: string | { hc: string, dark: string, light: string }): { hc: URI, dark: URI, light: URI } => { + const convertExtensionRelativePathsToBrowserURIs = (path: string | { hc: string; dark: string; light: string }): { hc: URI; dark: URI; light: URI } => { const convertPath = (path: string) => path.startsWith('https://') ? URI.parse(path, true) : FileAccess.asBrowserUri(joinPath(extension.extensionLocation, path)); @@ -362,7 +362,7 @@ export class WalkthroughsService extends Disposable implements IWalkthroughsServ // Legacy media config else { - const legacyMedia = step.media as unknown as { path: string, altText: string }; + const legacyMedia = step.media as unknown as { path: string; altText: string }; if (typeof legacyMedia.path === 'string' && legacyMedia.path.endsWith('.md')) { media = { type: 'markdown', @@ -426,7 +426,7 @@ export class WalkthroughsService extends Disposable implements IWalkthroughsServ if (sectionToOpen && this.configurationService.getValue('workbench.welcomePage.walkthroughs.openOnInstall')) { type GettingStartedAutoOpenClassification = { - id: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight', }; + id: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; }; type GettingStartedAutoOpenEvent = { id: string; @@ -666,7 +666,7 @@ const convertInternalMediaPathToFileURI = (path: string) => path.startsWith('htt const convertInternalMediaPathToBrowserURI = (path: string) => path.startsWith('https://') ? URI.parse(path, true) : FileAccess.asBrowserUri('vs/workbench/contrib/welcomeGettingStarted/common/media/' + path, require); -const convertInternalMediaPathsToBrowserURIs = (path: string | { hc: string, dark: string, light: string }): { hc: URI, dark: URI, light: URI } => { +const convertInternalMediaPathsToBrowserURIs = (path: string | { hc: string; dark: string; light: string }): { hc: URI; dark: URI; light: URI } => { if (typeof path === 'string') { const converted = convertInternalMediaPathToBrowserURI(path); return { hc: converted, dark: converted, light: converted }; diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.ts b/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.ts index a05ce38f3a82f..71f0724e79e3d 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.ts +++ b/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.ts @@ -18,37 +18,37 @@ const intermediateIcon = registerIcon('getting-started-intermediate', Codicon.mo export type BuiltinGettingStartedStep = { - id: string - title: string, - description: string, - completionEvents?: string[] - when?: string, + id: string; + title: string; + description: string; + completionEvents?: string[]; + when?: string; media: - | { type: 'image', path: string | { hc: string, light: string, dark: string }, altText: string } - | { type: 'svg', path: string, altText: string } - | { type: 'markdown', path: string }, + | { type: 'image'; path: string | { hc: string; light: string; dark: string }; altText: string } + | { type: 'svg'; path: string; altText: string } + | { type: 'markdown'; path: string }; }; export type BuiltinGettingStartedCategory = { - id: string - title: string, - description: string, - isFeatured: boolean, - next?: string, - icon: ThemeIcon, - when?: string, + id: string; + title: string; + description: string; + isFeatured: boolean; + next?: string; + icon: ThemeIcon; + when?: string; content: - | { type: 'steps', steps: BuiltinGettingStartedStep[] } + | { type: 'steps'; steps: BuiltinGettingStartedStep[] }; }; export type BuiltinGettingStartedStartEntry = { - id: string - title: string, - description: string, - icon: ThemeIcon, - when?: string, + id: string; + title: string; + description: string; + icon: ThemeIcon; + when?: string; content: - | { type: 'startEntry', command: string } + | { type: 'startEntry'; command: string }; }; type GettingStartedWalkthroughContent = BuiltinGettingStartedCategory[]; diff --git a/src/vs/workbench/contrib/welcomePage/browser/welcomePage.ts b/src/vs/workbench/contrib/welcomePage/browser/welcomePage.ts index 96b443148c93d..3d7a08e1b3050 100644 --- a/src/vs/workbench/contrib/welcomePage/browser/welcomePage.ts +++ b/src/vs/workbench/contrib/welcomePage/browser/welcomePage.ts @@ -26,7 +26,7 @@ import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry'; import { IProductService } from 'vs/platform/product/common/productService'; export const restoreWalkthroughsConfigurationKey = 'workbench.welcomePage.restorableWalkthroughs'; -export type RestoreWalkthroughsConfigurationValue = { folder: string, category?: string, step?: string, }; +export type RestoreWalkthroughsConfigurationValue = { folder: string; category?: string; step?: string }; const configurationKey = 'workbench.startupEditor'; const oldConfigurationKey = 'workbench.welcome.enabled'; diff --git a/src/vs/workbench/contrib/welcomeViews/common/newFile.contribution.ts b/src/vs/workbench/contrib/welcomeViews/common/newFile.contribution.ts index 5eaa329ff5fa1..36d6b723bfd6f 100644 --- a/src/vs/workbench/contrib/welcomeViews/common/newFile.contribution.ts +++ b/src/vs/workbench/contrib/welcomeViews/common/newFile.contribution.ts @@ -48,7 +48,7 @@ registerAction2(class extends Action2 { } }); -type NewFileItem = { commandID: string, title: string, from: string, group: string }; +type NewFileItem = { commandID: string; title: string; from: string; group: string }; class NewFileTemplatesManager extends Disposable { static Instance: NewFileTemplatesManager | undefined; diff --git a/src/vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution.ts b/src/vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution.ts index 91f6b79e2e585..e296e0d82a177 100644 --- a/src/vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution.ts +++ b/src/vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution.ts @@ -68,7 +68,7 @@ export class ViewsWelcomeContribution extends Disposable implements IWorkbenchCo } } -function parseGroupAndOrder(welcome: ViewWelcome, contribution: IExtensionPointUser): { group: string | undefined, order: number | undefined } { +function parseGroupAndOrder(welcome: ViewWelcome, contribution: IExtensionPointUser): { group: string | undefined; order: number | undefined } { let group: string | undefined; let order: number | undefined; diff --git a/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput.ts b/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput.ts index 27194d314749d..84477197c4ac6 100644 --- a/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput.ts +++ b/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput.ts @@ -86,7 +86,7 @@ export class WalkThroughInput extends EditorInput { return this.options.telemetryFrom; } - override getTelemetryDescriptor(): { [key: string]: unknown; } { + override getTelemetryDescriptor(): { [key: string]: unknown } { const descriptor = super.getTelemetryDescriptor(); descriptor['target'] = this.getTelemetryFrom(); /* __GDPR__FRAGMENT__ diff --git a/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.ts b/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.ts index cb6127f7c7c0c..192fa0b0559dc 100644 --- a/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.ts +++ b/src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.ts @@ -366,14 +366,14 @@ export class WalkThroughPart extends EditorPane { })); type WalkThroughSnippetInteractionClassification = { - from?: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - type: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - snippet: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + from?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + type: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + snippet: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; type WalkThroughSnippetInteractionEvent = { - from?: string, - type: string, - snippet: number + from?: string; + type: string; + snippet: number; }; this.contentDisposables.push(Event.once(editor.onMouseDown)(() => { diff --git a/src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts b/src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts index 104b06e18a575..454844eabf62f 100644 --- a/src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts +++ b/src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts @@ -353,7 +353,7 @@ export class WorkspaceTrustUXHandler extends Disposable implements IWorkbenchCon //#region Dialog - private async doShowModal(question: string, trustedOption: { label: string, sublabel: string }, untrustedOption: { label: string, sublabel: string }, markdownStrings: string[], trustParentString?: string): Promise { + private async doShowModal(question: string, trustedOption: { label: string; sublabel: string }, untrustedOption: { label: string; sublabel: string }, markdownStrings: string[], trustParentString?: string): Promise { const startTime = Date.now(); const result = await this.dialogService.show( Severity.Info, @@ -768,9 +768,9 @@ Registry.as(ConfigurationExtensions.Configuration) * Telemetry */ type WorkspaceTrustDialogResultEventClassification = { - duration: { classification: 'SystemMetaData', purpose: 'FeatureInsight', expiration: '1.64', isMeasurement: true }; - choice: { classification: 'SystemMetaData', purpose: 'FeatureInsight', expiration: '1.64', isMeasurement: true }; - checkboxChecked?: { classification: 'SystemMetaData', purpose: 'FeatureInsight', expiration: '1.64', isMeasurement: true }; + duration: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; expiration: '1.64'; isMeasurement: true }; + choice: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; expiration: '1.64'; isMeasurement: true }; + checkboxChecked?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; expiration: '1.64'; isMeasurement: true }; }; type WorkspaceTrustDialogResultEvent = { @@ -806,11 +806,11 @@ class WorkspaceTrustTelemetryContribution extends Disposable implements IWorkben const disabledByCliFlag = this.environmentService.disableWorkspaceTrust; type WorkspaceTrustDisabledEventClassification = { - reason: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + reason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; type WorkspaceTrustDisabledEvent = { - reason: 'setting' | 'cli', + reason: 'setting' | 'cli'; }; this.telemetryService.publicLog2('workspaceTrustDisabled', { @@ -820,11 +820,11 @@ class WorkspaceTrustTelemetryContribution extends Disposable implements IWorkben } type WorkspaceTrustInfoEventClassification = { - trustedFoldersCount: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + trustedFoldersCount: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; type WorkspaceTrustInfoEvent = { - trustedFoldersCount: number, + trustedFoldersCount: number; }; this.telemetryService.publicLog2('workspaceTrustFolderCounts', { @@ -838,13 +838,13 @@ class WorkspaceTrustTelemetryContribution extends Disposable implements IWorkben } type WorkspaceTrustStateChangedEvent = { - workspaceId: string, - isTrusted: boolean + workspaceId: string; + isTrusted: boolean; }; type WorkspaceTrustStateChangedEventClassification = { - workspaceId: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - isTrusted: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + workspaceId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + isTrusted: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; this.telemetryService.publicLog2('workspaceTrustStateChanged', { @@ -854,15 +854,15 @@ class WorkspaceTrustTelemetryContribution extends Disposable implements IWorkben if (isTrusted) { type WorkspaceTrustFolderInfoEventClassification = { - trustedFolderDepth: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - workspaceFolderDepth: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - delta: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + trustedFolderDepth: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + workspaceFolderDepth: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + delta: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; type WorkspaceTrustFolderInfoEvent = { - trustedFolderDepth: number, - workspaceFolderDepth: number, - delta: number + trustedFolderDepth: number; + workspaceFolderDepth: number; + delta: number; }; const getDepth = (folder: string): number => { @@ -898,13 +898,13 @@ class WorkspaceTrustTelemetryContribution extends Disposable implements IWorkben } type WorkspaceTrustRequestedEventClassification = { - workspaceId: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - extensions: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + workspaceId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + extensions: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; type WorkspaceTrustRequestedEvent = { - workspaceId: string, - extensions: string[] + workspaceId: string; + extensions: string[]; }; this.telemetryService.publicLog2('workspaceTrustRequested', { diff --git a/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts b/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts index 6997cbeb8449f..279d059fdd2d9 100644 --- a/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts +++ b/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts @@ -1096,7 +1096,7 @@ export class WorkspaceTrustEditor extends EditorPane { } } - private layoutParticipants: { layout: () => void; }[] = []; + private layoutParticipants: { layout: () => void }[] = []; layout(dimension: Dimension): void { if (!this.isVisible()) { return; diff --git a/src/vs/workbench/electron-sandbox/desktop.main.ts b/src/vs/workbench/electron-sandbox/desktop.main.ts index f707a38d51dab..a8d5019d2eb1d 100644 --- a/src/vs/workbench/electron-sandbox/desktop.main.ts +++ b/src/vs/workbench/electron-sandbox/desktop.main.ts @@ -140,7 +140,7 @@ export class DesktopMain extends Disposable { this._register(workbench.onDidShutdown(() => this.dispose())); } - private async initServices(): Promise<{ serviceCollection: ServiceCollection, logService: ILogService, storageService: NativeStorageService }> { + private async initServices(): Promise<{ serviceCollection: ServiceCollection; logService: ILogService; storageService: NativeStorageService }> { const serviceCollection = new ServiceCollection(); diff --git a/src/vs/workbench/electron-sandbox/window.ts b/src/vs/workbench/electron-sandbox/window.ts index 2854bc58ff343..f0d72a584ea30 100644 --- a/src/vs/workbench/electron-sandbox/window.ts +++ b/src/vs/workbench/electron-sandbox/window.ts @@ -201,7 +201,7 @@ export class NativeWindow extends Disposable { ipcRenderer.on('vscode:leaveFullScreen', async () => setFullscreen(false)); // Proxy Login Dialog - ipcRenderer.on('vscode:openProxyAuthenticationDialog', async (event: unknown, payload: { authInfo: AuthInfo, username?: string, password?: string, replyChannel: string }) => { + ipcRenderer.on('vscode:openProxyAuthenticationDialog', async (event: unknown, payload: { authInfo: AuthInfo; username?: string; password?: string; replyChannel: string }) => { const rememberCredentials = this.storageService.getBoolean(NativeWindow.REMEMBER_PROXY_CREDENTIALS_KEY, StorageScope.GLOBAL); const result = await this.dialogService.input(Severity.Warning, localize('proxyAuthRequired', "Proxy Authentication Required"), [ diff --git a/src/vs/workbench/services/accessibility/electron-sandbox/accessibilityService.ts b/src/vs/workbench/services/accessibility/electron-sandbox/accessibilityService.ts index 11250faa762e1..4b6ca8c503980 100644 --- a/src/vs/workbench/services/accessibility/electron-sandbox/accessibilityService.ts +++ b/src/vs/workbench/services/accessibility/electron-sandbox/accessibilityService.ts @@ -21,7 +21,7 @@ interface AccessibilityMetrics { enabled: boolean; } type AccessibilityMetricsClassification = { - enabled: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + enabled: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; export class NativeAccessibilityService extends AccessibilityService implements IAccessibilityService { diff --git a/src/vs/workbench/services/actions/common/menusExtensionPoint.ts b/src/vs/workbench/services/actions/common/menusExtensionPoint.ts index 6f7fb8389cade..efdfd47f94907 100644 --- a/src/vs/workbench/services/actions/common/menusExtensionPoint.ts +++ b/src/vs/workbench/services/actions/common/menusExtensionPoint.ts @@ -465,7 +465,7 @@ namespace schema { icon?: IUserFriendlyIcon; } - export type IUserFriendlyIcon = string | { light: string; dark: string; }; + export type IUserFriendlyIcon = string | { light: string; dark: string }; export function isValidCommand(command: IUserFriendlyCommand, collector: ExtensionMessageCollector): boolean { if (!command) { @@ -598,7 +598,7 @@ commandsExtensionPoint.setHandler(extensions => { const { icon, enablement, category, title, shortTitle, command } = userFriendlyCommand; - let absoluteIcon: { dark: URI; light?: URI; } | ThemeIcon | undefined; + let absoluteIcon: { dark: URI; light?: URI } | ThemeIcon | undefined; if (icon) { if (typeof icon === 'string') { absoluteIcon = ThemeIcon.fromString(icon) ?? { dark: resources.joinPath(extension.description.extensionLocation, icon), light: resources.joinPath(extension.description.extensionLocation, icon) }; @@ -646,7 +646,7 @@ commandsExtensionPoint.setHandler(extensions => { interface IRegisteredSubmenu { readonly id: MenuId; readonly label: string; - readonly icon?: { dark: URI; light?: URI; } | ThemeIcon; + readonly icon?: { dark: URI; light?: URI } | ThemeIcon; } const _submenus = new Map(); @@ -681,7 +681,7 @@ submenusExtensionPoint.setHandler(extensions => { return; } - let absoluteIcon: { dark: URI; light?: URI; } | ThemeIcon | undefined; + let absoluteIcon: { dark: URI; light?: URI } | ThemeIcon | undefined; if (entry.value.icon) { if (typeof entry.value.icon === 'string') { absoluteIcon = ThemeIcon.fromString(entry.value.icon) || { dark: resources.joinPath(extension.description.extensionLocation, entry.value.icon) }; @@ -720,7 +720,7 @@ menusExtensionPoint.setHandler(extensions => { _menuRegistrations.clear(); _submenuMenuItems.clear(); - const items: { id: MenuId, item: IMenuItem | ISubmenuItem }[] = []; + const items: { id: MenuId; item: IMenuItem | ISubmenuItem }[] = []; for (let extension of extensions) { const { value, collector } = extension; diff --git a/src/vs/workbench/services/assignment/common/assignmentService.ts b/src/vs/workbench/services/assignment/common/assignmentService.ts index c7176e4a43c73..d04be1ca7edf0 100644 --- a/src/vs/workbench/services/assignment/common/assignmentService.ts +++ b/src/vs/workbench/services/assignment/common/assignmentService.ts @@ -103,8 +103,8 @@ export class WorkbenchAssignmentService extends BaseAssignmentService { }; type TASClientReadTreatmentClassification = { - treatmentValue: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', }; - treatmentName: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', }; + treatmentValue: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + treatmentName: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; this.telemetryService.publicLog2('tasClientReadTreatmentComplete', diff --git a/src/vs/workbench/services/authentication/browser/authenticationService.ts b/src/vs/workbench/services/authentication/browser/authenticationService.ts index 07cae5bf94af1..695c0f793ddf3 100644 --- a/src/vs/workbench/services/authentication/browser/authenticationService.ts +++ b/src/vs/workbench/services/authentication/browser/authenticationService.ts @@ -90,7 +90,7 @@ export function addAccountUsage(storageService: IStorageService, providerId: str storageService.store(accountKey, JSON.stringify(usages), StorageScope.GLOBAL, StorageTarget.MACHINE); } -export type AuthenticationSessionInfo = { readonly id: string, readonly accessToken: string, readonly providerId: string, readonly canSignOut?: boolean }; +export type AuthenticationSessionInfo = { readonly id: string; readonly accessToken: string; readonly providerId: string; readonly canSignOut?: boolean }; export async function getCurrentAuthenticationSessionInfo(credentialsService: ICredentialsService, productService: IProductService): Promise { const authenticationSessionValue = await credentialsService.getPassword(`${productService.urlProtocol}.login`, 'account'); if (authenticationSessionValue) { @@ -120,14 +120,14 @@ export interface IAuthenticationService { showGetSessionPrompt(providerId: string, accountName: string, extensionId: string, extensionName: string): Promise; selectSession(providerId: string, extensionId: string, extensionName: string, scopes: string[], possibleSessions: readonly AuthenticationSession[]): Promise; requestSessionAccess(providerId: string, extensionId: string, extensionName: string, scopes: string[], possibleSessions: readonly AuthenticationSession[]): void; - completeSessionAccessRequest(providerId: string, extensionId: string, extensionName: string, scopes: string[]): Promise + completeSessionAccessRequest(providerId: string, extensionId: string, extensionName: string, scopes: string[]): Promise; requestNewSession(providerId: string, scopes: string[], extensionId: string, extensionName: string): Promise; sessionsUpdate(providerId: string, event: AuthenticationSessionsChangeEvent): void; readonly onDidRegisterAuthenticationProvider: Event; readonly onDidUnregisterAuthenticationProvider: Event; - readonly onDidChangeSessions: Event<{ providerId: string, label: string, event: AuthenticationSessionsChangeEvent }>; + readonly onDidChangeSessions: Event<{ providerId: string; label: string; event: AuthenticationSessionsChangeEvent }>; // TODO @RMacfarlane completely remove this property declaredProviders: AuthenticationProviderInformation[]; @@ -144,9 +144,9 @@ export interface IAuthenticationService { } export interface IAuthenticationProvider { - readonly id: string, - readonly label: string, - readonly supportsMultipleAccounts: boolean, + readonly id: string; + readonly label: string; + readonly supportsMultipleAccounts: boolean; dispose(): void; manageTrustedExtensions(accountName: string): void; removeAccountSessions(accountName: string, sessions: AuthenticationSession[]): Promise; @@ -218,7 +218,7 @@ export class AuthenticationService extends Disposable implements IAuthentication declare readonly _serviceBrand: undefined; private _placeholderMenuItem: IDisposable | undefined; private _signInRequestItems = new Map(); - private _sessionAccessRequestItems = new Map(); + private _sessionAccessRequestItems = new Map(); private _accountBadgeDisposable = this._register(new MutableDisposable()); private _authenticationProviders: Map = new Map(); @@ -234,8 +234,8 @@ export class AuthenticationService extends Disposable implements IAuthentication private _onDidUnregisterAuthenticationProvider: Emitter = this._register(new Emitter()); readonly onDidUnregisterAuthenticationProvider: Event = this._onDidUnregisterAuthenticationProvider.event; - private _onDidChangeSessions: Emitter<{ providerId: string, label: string, event: AuthenticationSessionsChangeEvent }> = this._register(new Emitter<{ providerId: string, label: string, event: AuthenticationSessionsChangeEvent }>()); - readonly onDidChangeSessions: Event<{ providerId: string, label: string, event: AuthenticationSessionsChangeEvent }> = this._onDidChangeSessions.event; + private _onDidChangeSessions: Emitter<{ providerId: string; label: string; event: AuthenticationSessionsChangeEvent }> = this._register(new Emitter<{ providerId: string; label: string; event: AuthenticationSessionsChangeEvent }>()); + readonly onDidChangeSessions: Event<{ providerId: string; label: string; event: AuthenticationSessionsChangeEvent }> = this._onDidChangeSessions.event; private _onDidChangeDeclaredProviders: Emitter = this._register(new Emitter()); readonly onDidChangeDeclaredProviders: Event = this._onDidChangeDeclaredProviders.event; @@ -491,9 +491,9 @@ export class AuthenticationService extends Disposable implements IAuthentication reject('No available sessions'); } - const quickPick = this.quickInputService.createQuickPick<{ label: string, session?: AuthenticationSession }>(); + const quickPick = this.quickInputService.createQuickPick<{ label: string; session?: AuthenticationSession }>(); quickPick.ignoreFocusOut = true; - const items: { label: string, session?: AuthenticationSession }[] = availableSessions.map(session => { + const items: { label: string; session?: AuthenticationSession }[] = availableSessions.map(session => { return { label: session.account.label, session: session diff --git a/src/vs/workbench/services/configuration/browser/configuration.ts b/src/vs/workbench/services/configuration/browser/configuration.ts index 0cda3095bbfd0..7aaff71a2d4a2 100644 --- a/src/vs/workbench/services/configuration/browser/configuration.ts +++ b/src/vs/workbench/services/configuration/browser/configuration.ts @@ -35,7 +35,7 @@ export class DefaultConfiguration extends Disposable { private cachedConfigurationDefaultsOverrides: IStringDictionary = {}; private readonly cacheKey: ConfigurationKey = { type: 'defaults', key: 'configurationDefaultsOverrides' }; - private readonly _onDidChangeConfiguration = this._register(new Emitter<{ defaults: ConfigurationModel, properties: string[] }>()); + private readonly _onDidChangeConfiguration = this._register(new Emitter<{ defaults: ConfigurationModel; properties: string[] }>()); readonly onDidChangeConfiguration = this._onDidChangeConfiguration.event; private updateCache: boolean = false; diff --git a/src/vs/workbench/services/configuration/browser/configurationService.ts b/src/vs/workbench/services/configuration/browser/configurationService.ts index 5e616e7b75579..9f5d90fc78e24 100644 --- a/src/vs/workbench/services/configuration/browser/configurationService.ts +++ b/src/vs/workbench/services/configuration/browser/configurationService.ts @@ -96,7 +96,7 @@ export class WorkspaceService extends Disposable implements IWorkbenchConfigurat private cyclicDependency = new Promise(resolve => this.cyclicDependencyReady = resolve); constructor( - { remoteAuthority, configurationCache }: { remoteAuthority?: string, configurationCache: IConfigurationCache }, + { remoteAuthority, configurationCache }: { remoteAuthority?: string; configurationCache: IConfigurationCache }, environmentService: IWorkbenchEnvironmentService, fileService: IFileService, remoteAgentService: IRemoteAgentService, @@ -581,7 +581,7 @@ export class WorkspaceService extends Disposable implements IWorkbenchConfigurat mark('code/didInitWorkspaceConfiguration'); } - private async initializeUserConfiguration(): Promise<{ local: ConfigurationModel, remote: ConfigurationModel }> { + private async initializeUserConfiguration(): Promise<{ local: ConfigurationModel; remote: ConfigurationModel }> { const [local, remote] = await Promise.all([this.localUserConfiguration.initialize(), this.remoteUserConfiguration ? this.remoteUserConfiguration.initialize() : Promise.resolve(new ConfigurationModel())]); return { local, remote }; } @@ -590,7 +590,7 @@ export class WorkspaceService extends Disposable implements IWorkbenchConfigurat this.onDefaultConfigurationChanged(this.defaultConfiguration.reload()); } - private async reloadUserConfiguration(): Promise<{ local: ConfigurationModel, remote: ConfigurationModel }> { + private async reloadUserConfiguration(): Promise<{ local: ConfigurationModel; remote: ConfigurationModel }> { const [local, remote] = await Promise.all([this.reloadLocalUserConfiguration(true), this.reloadRemoteUserConfiguration(true)]); return { local, remote }; } @@ -938,7 +938,7 @@ export class WorkspaceService extends Disposable implements IWorkbenchConfigurat return [definedTargets[0] || ConfigurationTarget.USER]; } - private triggerConfigurationChange(change: IConfigurationChange, previous: { data: IConfigurationData, workspace?: Workspace } | undefined, target: ConfigurationTarget): void { + private triggerConfigurationChange(change: IConfigurationChange, previous: { data: IConfigurationData; workspace?: Workspace } | undefined, target: ConfigurationTarget): void { if (change.keys.length) { if (target !== ConfigurationTarget.DEFAULT) { this.logService.debug(`Configuration keys changed in ${ConfigurationTargetToString(target)} target`, ...change.keys); diff --git a/src/vs/workbench/services/configuration/common/configuration.ts b/src/vs/workbench/services/configuration/common/configuration.ts index af6490e619635..c3d97f0c5e66d 100644 --- a/src/vs/workbench/services/configuration/common/configuration.ts +++ b/src/vs/workbench/services/configuration/common/configuration.ts @@ -36,7 +36,7 @@ WORKSPACE_STANDALONE_CONFIGURATIONS[LAUNCH_CONFIGURATION_KEY] = `${FOLDER_CONFIG export const USER_STANDALONE_CONFIGURATIONS = Object.create(null); USER_STANDALONE_CONFIGURATIONS[TASKS_CONFIGURATION_KEY] = `${TASKS_CONFIGURATION_KEY}.json`; -export type ConfigurationKey = { type: 'defaults' | 'user' | 'workspaces' | 'folder', key: string }; +export type ConfigurationKey = { type: 'defaults' | 'user' | 'workspaces' | 'folder'; key: string }; export interface IConfigurationCache { diff --git a/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.ts b/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.ts index 0b4db70b1661a..2270a00f69347 100644 --- a/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.ts +++ b/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.ts @@ -27,8 +27,8 @@ export abstract class BaseConfigurationResolverService extends AbstractVariableR constructor( context: { - getAppRoot: () => string | undefined, - getExecPath: () => string | undefined + getAppRoot: () => string | undefined; + getExecPath: () => string | undefined; }, envVariablesPromise: Promise, editorService: IEditorService, diff --git a/src/vs/workbench/services/configurationResolver/common/configurationResolver.ts b/src/vs/workbench/services/configurationResolver/common/configurationResolver.ts index be8987984e416..d8ba161425b0b 100644 --- a/src/vs/workbench/services/configurationResolver/common/configurationResolver.ts +++ b/src/vs/workbench/services/configurationResolver/common/configurationResolver.ts @@ -31,7 +31,7 @@ export interface IConfigurationResolverService { * Returns a copy of it with substituted values and a map of variables and their resolution. * Keys in the map will be of the format input:variableName or command:variableName. */ - resolveAnyMap(folder: IWorkspaceFolder | undefined, config: any, commandValueMapping?: IStringDictionary): Promise<{ newConfig: any, resolvedVariables: Map }>; + resolveAnyMap(folder: IWorkspaceFolder | undefined, config: any, commandValueMapping?: IStringDictionary): Promise<{ newConfig: any; resolvedVariables: Map }>; /** * Recursively resolves all variables (including commands and user input) in the given config and returns a copy of it with substituted values. @@ -67,7 +67,7 @@ export interface PickStringInputInfo { id: string; type: 'pickString'; description: string; - options: (string | { value: string, label?: string })[]; + options: (string | { value: string; label?: string })[]; default?: string; } diff --git a/src/vs/workbench/services/configurationResolver/common/variableResolver.ts b/src/vs/workbench/services/configurationResolver/common/variableResolver.ts index 2621eff86f994..5f5a35e798fb8 100644 --- a/src/vs/workbench/services/configurationResolver/common/variableResolver.ts +++ b/src/vs/workbench/services/configurationResolver/common/variableResolver.ts @@ -99,7 +99,7 @@ export class AbstractVariableResolverService implements IConfigurationResolverSe return this.resolveAnyBase(workspaceFolder, config, commandValueMapping); } - public async resolveAnyMap(workspaceFolder: IWorkspaceFolder | undefined, config: any, commandValueMapping?: IStringDictionary): Promise<{ newConfig: any, resolvedVariables: Map }> { + public async resolveAnyMap(workspaceFolder: IWorkspaceFolder | undefined, config: any, commandValueMapping?: IStringDictionary): Promise<{ newConfig: any; resolvedVariables: Map }> { const resolvedVariables = new Map(); const newConfig = await this.resolveAnyBase(workspaceFolder, config, commandValueMapping, resolvedVariables); return { newConfig, resolvedVariables }; 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 9fdd805bf15c2..16c7dc60eee50 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 @@ -658,13 +658,13 @@ class MockCommandService implements ICommandService { class MockLabelService implements ILabelService { _serviceBrand: undefined; - getUriLabel(resource: uri, options?: { relative?: boolean | undefined; noPrefix?: boolean | undefined; endWithSeparator?: boolean | undefined; }): string { + getUriLabel(resource: uri, options?: { relative?: boolean | undefined; noPrefix?: boolean | undefined; endWithSeparator?: boolean | undefined }): string { return normalize(resource.fsPath); } getUriBasenameLabel(resource: uri): string { throw new Error('Method not implemented.'); } - getWorkspaceLabel(workspace: uri | IWorkspaceIdentifier | IWorkspace, options?: { verbose: boolean; }): string { + getWorkspaceLabel(workspace: uri | IWorkspaceIdentifier | IWorkspace, options?: { verbose: boolean }): string { throw new Error('Method not implemented.'); } getHostLabel(scheme: string, authority?: string): string { @@ -691,7 +691,7 @@ class MockPathService implements IPathService { fileURI(path: string): Promise { throw new Error('Method not implemented.'); } - userHome(options?: { preferLocal: boolean; }): Promise { + userHome(options?: { preferLocal: boolean }): Promise { throw new Error('Method not implemented.'); } hasValidBasename(resource: uri, basename?: string): Promise; diff --git a/src/vs/workbench/services/contextmenu/electron-sandbox/contextmenuService.ts b/src/vs/workbench/services/contextmenu/electron-sandbox/contextmenuService.ts index c7a18004dc902..177c2b863b94a 100644 --- a/src/vs/workbench/services/contextmenu/electron-sandbox/contextmenuService.ts +++ b/src/vs/workbench/services/contextmenu/electron-sandbox/contextmenuService.ts @@ -111,7 +111,7 @@ class NativeContextMenuService extends Disposable implements IContextMenuService y += 4 / zoom; } } else { - const pos: { x: number; y: number; } = anchor; + const pos: { x: number; y: number } = anchor; x = pos.x + 1; /* prevent first item from being selected automatically under mouse */ y = pos.y; } diff --git a/src/vs/workbench/services/credentials/browser/credentialsService.ts b/src/vs/workbench/services/credentials/browser/credentialsService.ts index 2f270a280e674..2ee077e32a212 100644 --- a/src/vs/workbench/services/credentials/browser/credentialsService.ts +++ b/src/vs/workbench/services/credentials/browser/credentialsService.ts @@ -67,7 +67,7 @@ export class BrowserCredentialsService extends Disposable implements ICredential return this.credentialsProvider.findPassword(service); } - findCredentials(service: string): Promise> { + findCredentials(service: string): Promise> { return this.credentialsProvider.findCredentials(service); } diff --git a/src/vs/workbench/services/dialogs/browser/abstractFileDialogService.ts b/src/vs/workbench/services/dialogs/browser/abstractFileDialogService.ts index 72527195529d3..c80852006549c 100644 --- a/src/vs/workbench/services/dialogs/browser/abstractFileDialogService.ts +++ b/src/vs/workbench/services/dialogs/browser/abstractFileDialogService.ts @@ -265,7 +265,7 @@ export abstract class AbstractFileDialogService implements IFileDialogService { return defaultUriScheme ?? this.pathService.defaultUriScheme; } - protected getFileSystemSchema(options: { availableFileSystems?: readonly string[], defaultUri?: URI }): string { + protected getFileSystemSchema(options: { availableFileSystems?: readonly string[]; defaultUri?: URI }): string { return options.availableFileSystems && options.availableFileSystems[0] || this.getSchemeFilterForWindow(options.defaultUri?.scheme); } @@ -295,7 +295,7 @@ export abstract class AbstractFileDialogService implements IFileDialogService { availableFileSystems }; - interface IFilter { name: string; extensions: string[]; } + interface IFilter { name: string; extensions: string[] } // Build the file filter by using our known languages const ext: string | undefined = defaultUri ? resources.extname(defaultUri) : undefined; diff --git a/src/vs/workbench/services/dialogs/electron-sandbox/fileDialogService.ts b/src/vs/workbench/services/dialogs/electron-sandbox/fileDialogService.ts index 34581dbc54fb2..ef2ac0fca5fa2 100644 --- a/src/vs/workbench/services/dialogs/electron-sandbox/fileDialogService.ts +++ b/src/vs/workbench/services/dialogs/electron-sandbox/fileDialogService.ts @@ -59,7 +59,7 @@ export class FileDialogService extends AbstractFileDialogService implements IFil }; } - private shouldUseSimplified(schema: string): { useSimplified: boolean, isSetting: boolean } { + private shouldUseSimplified(schema: string): { useSimplified: boolean; isSetting: boolean } { const setting = (this.configurationService.getValue('files.simpleDialog.enable') === true); const newWindowSetting = (this.configurationService.getValue('window.openFilesInNewWindow') === 'on'); return { diff --git a/src/vs/workbench/services/editor/browser/editorResolverService.ts b/src/vs/workbench/services/editor/browser/editorResolverService.ts index e9cccc9fcad8c..c3f986154789b 100644 --- a/src/vs/workbench/services/editor/browser/editorResolverService.ts +++ b/src/vs/workbench/services/editor/browser/editorResolverService.ts @@ -31,12 +31,12 @@ import { Emitter } from 'vs/base/common/event'; import { IFileService } from 'vs/platform/files/common/files'; interface RegisteredEditor { - globPattern: string | glob.IRelativePattern, - editorInfo: RegisteredEditorInfo, - options?: RegisteredEditorOptions, - createEditorInput: EditorInputFactoryFunction, - createUntitledEditorInput?: UntitledEditorInputFactoryFunction | undefined, - createDiffEditorInput?: DiffEditorInputFactoryFunction + globPattern: string | glob.IRelativePattern; + editorInfo: RegisteredEditorInfo; + options?: RegisteredEditorOptions; + createEditorInput: EditorInputFactoryFunction; + createUntitledEditorInput?: UntitledEditorInputFactoryFunction | undefined; + createDiffEditorInput?: DiffEditorInputFactoryFunction; } type RegisteredEditors = Array; @@ -382,7 +382,7 @@ export class EditorResolverService extends Disposable implements IEditorResolver * Given a resource and an editorId selects the best possible editor * @returns The editor and whether there was another default which conflicted with it */ - private getEditor(resource: URI, editorId: string | EditorResolution.EXCLUSIVE_ONLY | undefined): { editor: RegisteredEditor | undefined, conflictingDefault: boolean } { + private getEditor(resource: URI, editorId: string | EditorResolution.EXCLUSIVE_ONLY | undefined): { editor: RegisteredEditor | undefined; conflictingDefault: boolean } { const findMatchingEditor = (editors: RegisteredEditors, viewType: string) => { return editors.find((editor) => { @@ -531,8 +531,8 @@ export class EditorResolverService extends Disposable implements IEditorResolver private findExistingEditorsForResource( resource: URI, editorId: string, - ): Array<{ editor: EditorInput, group: IEditorGroup }> { - const out: Array<{ editor: EditorInput, group: IEditorGroup }> = []; + ): Array<{ editor: EditorInput; group: IEditorGroup }> { + const out: Array<{ editor: EditorInput; group: IEditorGroup }> = []; const orderedGroups = distinct([ ...this.editorGroupService.groups, ]); @@ -752,10 +752,10 @@ export class EditorResolverService extends Disposable implements IEditorResolver private sendEditorResolutionTelemetry(chosenInput: EditorInput): void { type editorResolutionClassification = { - viewType: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; + viewType: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; }; type editorResolutionEvent = { - viewType: string + viewType: string; }; if (chosenInput.editorId) { this.telemetryService.publicLog2('override.viewType', { viewType: chosenInput.editorId }); diff --git a/src/vs/workbench/services/editor/browser/editorService.ts b/src/vs/workbench/services/editor/browser/editorService.ts index 0f8515956170a..af368e9b00c26 100644 --- a/src/vs/workbench/services/editor/browser/editorService.ts +++ b/src/vs/workbench/services/editor/browser/editorService.ts @@ -358,7 +358,7 @@ export class EditorService extends Disposable implements EditorServiceImpl { } } - private getAllNonDirtyEditors(options: { includeUntitled: boolean, supportSideBySide: boolean }): EditorInput[] { + private getAllNonDirtyEditors(options: { includeUntitled: boolean; supportSideBySide: boolean }): EditorInput[] { const editors: EditorInput[] = []; function conditionallyAddEditor(editor: EditorInput): void { @@ -619,7 +619,7 @@ export class EditorService extends Disposable implements EditorServiceImpl { } } - private extractEditorResources(editors: Array): { resources: URI[], diffMode?: boolean } { + private extractEditorResources(editors: Array): { resources: URI[]; diffMode?: boolean } { const resources = new ResourceMap(); let diffMode = false; diff --git a/src/vs/workbench/services/editor/common/editorGroupsService.ts b/src/vs/workbench/services/editor/common/editorGroupsService.ts index e3401cfe74432..d3aeb03a94305 100644 --- a/src/vs/workbench/services/editor/common/editorGroupsService.ts +++ b/src/vs/workbench/services/editor/common/editorGroupsService.ts @@ -90,10 +90,10 @@ export interface ICloseEditorOptions { } export type ICloseEditorsFilter = { - except?: EditorInput, - direction?: CloseDirection, - savedOnly?: boolean, - excludeSticky?: boolean + except?: EditorInput; + direction?: CloseDirection; + savedOnly?: boolean; + excludeSticky?: boolean; }; export interface ICloseAllEditorsOptions { @@ -279,12 +279,12 @@ export interface IEditorGroupsService { /** * Returns the size of a group. */ - getSize(group: IEditorGroup | GroupIdentifier): { width: number, height: number }; + getSize(group: IEditorGroup | GroupIdentifier): { width: number; height: number }; /** * Sets the size of a group. */ - setSize(group: IEditorGroup | GroupIdentifier, size: { width: number, height: number }): void; + setSize(group: IEditorGroup | GroupIdentifier, size: { width: number; height: number }): void; /** * Arrange all groups according to the provided arrangement. diff --git a/src/vs/workbench/services/environment/common/environmentService.ts b/src/vs/workbench/services/environment/common/environmentService.ts index c012e27723de6..d07a339029430 100644 --- a/src/vs/workbench/services/environment/common/environmentService.ts +++ b/src/vs/workbench/services/environment/common/environmentService.ts @@ -41,7 +41,7 @@ export interface IWorkbenchEnvironmentService extends IEnvironmentService { readonly logExtensionHostCommunication?: boolean; // --- Editors to open - readonly filesToOpenOrCreate?: IPath[] | undefined + readonly filesToOpenOrCreate?: IPath[] | undefined; readonly filesToDiff?: IPath[] | undefined; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/src/vs/workbench/services/extensionManagement/browser/extensionBisect.ts b/src/vs/workbench/services/extensionManagement/browser/extensionBisect.ts index 6561c81242c06..291437cf3f98d 100644 --- a/src/vs/workbench/services/extensionManagement/browser/extensionBisect.ts +++ b/src/vs/workbench/services/extensionManagement/browser/extensionBisect.ts @@ -36,7 +36,7 @@ export interface IExtensionBisectService { isActive: boolean; disabledCount: number; start(extensions: ILocalExtension[]): Promise; - next(seeingBad: boolean): Promise<{ id: string, bad: boolean } | undefined>; + next(seeingBad: boolean): Promise<{ id: string; bad: boolean } | undefined>; reset(): Promise; } @@ -129,7 +129,7 @@ class ExtensionBisectService implements IExtensionBisectService { await this._storageService.flush(); } - async next(seeingBad: boolean): Promise<{ id: string; bad: boolean; } | undefined> { + async next(seeingBad: boolean): Promise<{ id: string; bad: boolean } | undefined> { if (!this._state) { throw new Error('invalid state'); } diff --git a/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts b/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts index 8e99812215f67..4378974e87262 100644 --- a/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts +++ b/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.ts @@ -31,7 +31,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti const SOURCE = 'IWorkbenchExtensionEnablementService'; -type WorkspaceType = { readonly virtual: boolean, readonly trusted: boolean }; +type WorkspaceType = { readonly virtual: boolean; readonly trusted: boolean }; export class ExtensionEnablementService extends Disposable implements IWorkbenchExtensionEnablementService { @@ -589,7 +589,7 @@ class ExtensionsManager extends Disposable { private _extensions: IExtension[] = []; get extensions(): readonly IExtension[] { return this._extensions; } - private _onDidChangeExtensions = this._register(new Emitter<{ added: readonly IExtension[], removed: readonly IExtension[] }>()); + private _onDidChangeExtensions = this._register(new Emitter<{ added: readonly IExtension[]; removed: readonly IExtension[] }>()); readonly onDidChangeExtensions = this._onDidChangeExtensions.event; private readonly initializePromise; diff --git a/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.ts b/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.ts index ec3147a873f00..cbcf56f4c9601 100644 --- a/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.ts +++ b/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.ts @@ -34,7 +34,7 @@ import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation import { basename } from 'vs/base/common/path'; import { IExtensionStorageService } from 'vs/platform/extensionManagement/common/extensionStorage'; -type GalleryExtensionInfo = { readonly id: string, preRelease?: boolean, migrateStorageFrom?: string }; +type GalleryExtensionInfo = { readonly id: string; preRelease?: boolean; migrateStorageFrom?: string }; function isGalleryExtensionInfo(obj: unknown): obj is GalleryExtensionInfo { const galleryExtensionInfo = obj as GalleryExtensionInfo | undefined; @@ -105,7 +105,7 @@ export class WebExtensionsScannerService extends Disposable implements IWebExten * All extensions defined via `additionalBuiltinExtensions` API */ private async readCustomBuiltinExtensions(): Promise { - const extensions: { id: string, preRelease: boolean }[] = [], extensionLocations: URI[] = [], result: IExtension[] = []; + const extensions: { id: string; preRelease: boolean }[] = [], extensionLocations: URI[] = [], result: IExtension[] = []; const extensionsToMigrate: [string, string][] = []; const cutomBuiltinExtensions: (GalleryExtensionInfo | UriComponents)[] = this.environmentService.options && Array.isArray(this.environmentService.options.additionalBuiltinExtensions) ? this.environmentService.options.additionalBuiltinExtensions.map(additionalBuiltinExtension => isString(additionalBuiltinExtension) ? { id: additionalBuiltinExtension } : additionalBuiltinExtension) @@ -169,9 +169,9 @@ export class WebExtensionsScannerService extends Disposable implements IWebExten return result; } - private async checkAdditionalBuiltinExtensions(extensions: { id: string, preRelease: boolean }[]): Promise<{ id: string, preRelease: boolean }[]> { + private async checkAdditionalBuiltinExtensions(extensions: { id: string; preRelease: boolean }[]): Promise<{ id: string; preRelease: boolean }[]> { const extensionsControlManifest = await this.galleryService.getExtensionsControlManifest(); - const result: { id: string, preRelease: boolean }[] = []; + const result: { id: string; preRelease: boolean }[] = []; for (const extension of extensions) { if (extensionsControlManifest.malicious.some(e => areSameExtensions(e, { id: extension.id }))) { this.logService.info(`Checking additional builtin extensions: Ignoring '${extension.id}' because it is reported to be malicious.`); @@ -188,7 +188,7 @@ export class WebExtensionsScannerService extends Disposable implements IWebExten return result; } - private async getCustomBuiltinExtensionsFromGallery(extensions: { id: string, preRelease: boolean }[]): Promise { + private async getCustomBuiltinExtensionsFromGallery(extensions: { id: string; preRelease: boolean }[]): Promise { if (!this.galleryService.isEnabled()) { this.logService.info('Ignoring fetching additional builtin extensions from gallery as it is disabled.'); return []; diff --git a/src/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.ts b/src/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.ts index 3d993c896ca29..d23438cde7719 100644 --- a/src/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.ts +++ b/src/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.ts @@ -40,16 +40,16 @@ export interface IExtensionRecommendationsService { getImportantRecommendations(): Promise; getOtherRecommendations(): Promise; getFileBasedRecommendations(): string[]; - getExeBasedRecommendations(exe?: string): Promise<{ important: string[], others: string[] }>; - getConfigBasedRecommendations(): Promise<{ important: string[], others: string[] }>; + getExeBasedRecommendations(exe?: string): Promise<{ important: string[]; others: string[] }>; + getConfigBasedRecommendations(): Promise<{ important: string[]; others: string[] }>; getWorkspaceRecommendations(): Promise; getKeymapRecommendations(): string[]; getLanguageRecommendations(): string[]; } export type IgnoredRecommendationChangeNotification = { - extensionId: string, - isRecommended: boolean + extensionId: string; + isRecommended: boolean; }; export const IExtensionIgnoredRecommendationsService = createDecorator('IExtensionIgnoredRecommendationsService'); diff --git a/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts b/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts index 89a10a3a65bf2..a790241645ca5 100644 --- a/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts +++ b/src/vs/workbench/services/extensionResourceLoader/common/extensionResourceLoader.ts @@ -41,7 +41,7 @@ export interface IExtensionResourceLoaderService { /** * Computes the URL of a extension gallery resource. Returns `undefined` if gallery does not provide extension resources. */ - getExtensionGalleryResourceURL(galleryExtension: { publisher: string, name: string, version: string }, path?: string): URI | undefined; + getExtensionGalleryResourceURL(galleryExtension: { publisher: string; name: string; version: string }, path?: string): URI | undefined; } @@ -69,7 +69,7 @@ export abstract class AbstractExtensionResourceLoaderService implements IExtensi return this._extensionGalleryResourceUrlTemplate !== undefined; } - public getExtensionGalleryResourceURL(galleryExtension: { publisher: string, name: string, version: string }, path?: string): URI | undefined { + public getExtensionGalleryResourceURL(galleryExtension: { publisher: string; name: string; version: string }, path?: string): URI | undefined { if (this._extensionGalleryResourceUrlTemplate) { const uri = URI.parse(format2(this._extensionGalleryResourceUrlTemplate, { publisher: galleryExtension.publisher, name: galleryExtension.name, version: galleryExtension.version, path: 'extension' })); return this._isWebExtensionResourceEndPoint(uri) ? uri.with({ scheme: RemoteAuthorities.getPreferredWebSchema() }) : uri; diff --git a/src/vs/workbench/services/extensions/browser/extensionUrlHandler.ts b/src/vs/workbench/services/extensions/browser/extensionUrlHandler.ts index 6dd20722202de..8d3a37985b03e 100644 --- a/src/vs/workbench/services/extensions/browser/extensionUrlHandler.ts +++ b/src/vs/workbench/services/extensions/browser/extensionUrlHandler.ts @@ -82,7 +82,7 @@ export interface ExtensionUrlHandlerEvent { } export interface ExtensionUrlHandlerClassification extends GDPRClassification { - readonly extensionId: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight'; }; + readonly extensionId: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; } /** @@ -99,7 +99,7 @@ class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { readonly _serviceBrand: undefined; private extensionHandlers = new Map(); - private uriBuffer = new Map(); + private uriBuffer = new Map(); private userTrustedExtensionsStorage: UserTrustedExtensionIdStorage; private disposable: IDisposable; @@ -342,7 +342,7 @@ class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { // forget about all uris buffered more than 5 minutes ago private garbageCollect(): void { const now = new Date().getTime(); - const uriBuffer = new Map(); + const uriBuffer = new Map(); this.uriBuffer.forEach((uris, extensionId) => { uris = uris.filter(({ timestamp }) => now - timestamp < FIVE_MINUTES); diff --git a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts index 032faf19eccaf..7ec13d3ea7927 100644 --- a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts +++ b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts @@ -750,8 +750,8 @@ export abstract class AbstractExtensionService extends Disposable implements IEx }); } - public getExtensionsStatus(): { [id: string]: IExtensionsStatus; } { - let result: { [id: string]: IExtensionsStatus; } = Object.create(null); + public getExtensionsStatus(): { [id: string]: IExtensionsStatus } { + let result: { [id: string]: IExtensionsStatus } = Object.create(null); if (this._registry) { const extensions = this._registry.getAllExtensionDescriptions(); for (const extension of extensions) { @@ -838,7 +838,7 @@ export abstract class AbstractExtensionService extends Disposable implements IEx } protected _doHandleExtensionPoints(affectedExtensions: IExtensionDescription[]): void { - const affectedExtensionPoints: { [extPointName: string]: boolean; } = Object.create(null); + const affectedExtensionPoints: { [extPointName: string]: boolean } = Object.create(null); for (let extensionDescription of affectedExtensions) { if (extensionDescription.contributes) { for (let extPointName in extensionDescription.contributes) { @@ -881,10 +881,10 @@ export abstract class AbstractExtensionService extends Disposable implements IEx if (!this._isDev && msg.extensionId) { const { type, extensionId, extensionPointId, message } = msg; type ExtensionsMessageClassification = { - type: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - extensionId: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - extensionPointId: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - message: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + type: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + extensionId: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + extensionPointId: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + message: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type ExtensionsMessageEvent = { type: Severity; @@ -991,8 +991,8 @@ export abstract class AbstractExtensionService extends Disposable implements IEx private _onDidActivateExtensionError(extensionId: ExtensionIdentifier, error: Error): void { type ExtensionActivationErrorClassification = { - extensionId: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - error: { classification: 'CallstackOrException', purpose: 'PerformanceAndHealth' }; + extensionId: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + error: { classification: 'CallstackOrException'; purpose: 'PerformanceAndHealth' }; }; type ExtensionActivationErrorEvent = { extensionId: string; diff --git a/src/vs/workbench/services/extensions/common/extensionHostManager.ts b/src/vs/workbench/services/extensions/common/extensionHostManager.ts index 9e0dc443f4c43..07534f837cd55 100644 --- a/src/vs/workbench/services/extensions/common/extensionHostManager.ts +++ b/src/vs/workbench/services/extensions/common/extensionHostManager.ts @@ -57,12 +57,12 @@ export function createExtensionHostManager(instantiationService: IInstantiationS } export type ExtensionHostStartupClassification = { - time: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - action: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - kind: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - errorName?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - errorMessage?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - errorStack?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + time: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + action: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + kind: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + errorName?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + errorMessage?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + errorStack?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; export type ExtensionHostStartupEvent = { @@ -561,7 +561,7 @@ class LazyStartExtensionHostManager extends Disposable implements IExtensionHost const actual = await this._getOrCreateActualAndStart(`execute tests.`); return actual.extensionTestsSendExit(exitCode); } - public async setRemoteEnvironment(env: { [key: string]: string | null; }): Promise { + public async setRemoteEnvironment(env: { [key: string]: string | null }): Promise { await this._startCalled.wait(); if (this._actual) { return this._actual.setRemoteEnvironment(env); diff --git a/src/vs/workbench/services/extensions/common/extensionHostProtocol.ts b/src/vs/workbench/services/extensions/common/extensionHostProtocol.ts index c1a50f5c5e26c..a090dced1df2e 100644 --- a/src/vs/workbench/services/extensions/common/extensionHostProtocol.ts +++ b/src/vs/workbench/services/extensions/common/extensionHostProtocol.ts @@ -24,7 +24,7 @@ export interface IExtensionHostInitData { logsLocation: URI; logFile: URI; autoStart: boolean; - remote: { isRemote: boolean; authority: string | undefined; connectionData: IRemoteConnectionData | null; }; + remote: { isRemote: boolean; authority: string | undefined; connectionData: IRemoteConnectionData | null }; uiKind: UIKind; messagePorts?: ReadonlyMap; } diff --git a/src/vs/workbench/services/extensions/common/extensionHostProxy.ts b/src/vs/workbench/services/extensions/common/extensionHostProxy.ts index 890168f78fe8b..f3acf4420a037 100644 --- a/src/vs/workbench/services/extensions/common/extensionHostProxy.ts +++ b/src/vs/workbench/services/extensions/common/extensionHostProxy.ts @@ -33,7 +33,7 @@ export interface IExtensionHostProxy { extensionTestsExit(code: number): Promise; activateByEvent(activationEvent: string, activationKind: ActivationKind): Promise; activate(extensionId: ExtensionIdentifier, reason: ExtensionActivationReason): Promise; - setRemoteEnvironment(env: { [key: string]: string | null; }): Promise; + setRemoteEnvironment(env: { [key: string]: string | null }): Promise; updateRemoteConnectionData(connectionData: IRemoteConnectionData): Promise; deltaExtensions(toAdd: IExtensionDescription[], toRemove: ExtensionIdentifier[]): Promise; test_latency(n: number): Promise; diff --git a/src/vs/workbench/services/extensions/common/extensionManifestPropertiesService.ts b/src/vs/workbench/services/extensions/common/extensionManifestPropertiesService.ts index 334182c5f17b1..9487019eee745 100644 --- a/src/vs/workbench/services/extensions/common/extensionManifestPropertiesService.ts +++ b/src/vs/workbench/services/extensions/common/extensionManifestPropertiesService.ts @@ -47,10 +47,10 @@ export class ExtensionManifestPropertiesService extends Disposable implements IE private _productExtensionKindsMap: Map | null = null; private _configuredExtensionKindsMap: Map | null = null; - private _productVirtualWorkspaceSupportMap: Map | null = null; + private _productVirtualWorkspaceSupportMap: Map | null = null; private _configuredVirtualWorkspaceSupportMap: Map | null = null; - private readonly _configuredExtensionWorkspaceTrustRequestMap: Map; + private readonly _configuredExtensionWorkspaceTrustRequestMap: Map; private readonly _productExtensionWorkspaceTrustRequestMap: Map; constructor( @@ -62,8 +62,8 @@ export class ExtensionManifestPropertiesService extends Disposable implements IE super(); // Workspace trust request type (settings.json) - this._configuredExtensionWorkspaceTrustRequestMap = new Map(); - const configuredExtensionWorkspaceTrustRequests = configurationService.inspect<{ [key: string]: { supported: ExtensionUntrustedWorkspaceSupportType, version?: string } }>(WORKSPACE_TRUST_EXTENSION_SUPPORT).userValue || {}; + this._configuredExtensionWorkspaceTrustRequestMap = new Map(); + const configuredExtensionWorkspaceTrustRequests = configurationService.inspect<{ [key: string]: { supported: ExtensionUntrustedWorkspaceSupportType; version?: string } }>(WORKSPACE_TRUST_EXTENSION_SUPPORT).userValue || {}; for (const id of Object.keys(configuredExtensionWorkspaceTrustRequests)) { this._configuredExtensionWorkspaceTrustRequestMap.set(ExtensionIdentifier.toKey(id), configuredExtensionWorkspaceTrustRequests[id]); } @@ -316,9 +316,9 @@ export class ExtensionManifestPropertiesService extends Disposable implements IE return this._productExtensionKindsMap.get(ExtensionIdentifier.toKey(extensionId)); } - private getProductVirtualWorkspaceSupport(manifest: IExtensionManifest): { default?: boolean, override?: boolean } | undefined { + private getProductVirtualWorkspaceSupport(manifest: IExtensionManifest): { default?: boolean; override?: boolean } | undefined { if (this._productVirtualWorkspaceSupportMap === null) { - const productWorkspaceSchemesMap = new Map(); + const productWorkspaceSchemesMap = new Map(); if (this.productService.extensionVirtualWorkspacesSupport) { for (const id of Object.keys(this.productService.extensionVirtualWorkspacesSupport)) { productWorkspaceSchemesMap.set(ExtensionIdentifier.toKey(id), this.productService.extensionVirtualWorkspacesSupport[id]); diff --git a/src/vs/workbench/services/extensions/common/extensions.ts b/src/vs/workbench/services/extensions/common/extensions.ts index b25e53ea17198..7992aecd91cee 100644 --- a/src/vs/workbench/services/extensions/common/extensions.ts +++ b/src/vs/workbench/services/extensions/common/extensions.ts @@ -361,7 +361,7 @@ export class NullExtensionService implements IExtensionService { getExtensions(): Promise { return Promise.resolve([]); } getExtension() { return Promise.resolve(undefined); } readExtensionPointContributions(_extPoint: IExtensionPoint): Promise[]> { return Promise.resolve(Object.create(null)); } - getExtensionsStatus(): { [id: string]: IExtensionsStatus; } { return Object.create(null); } + getExtensionsStatus(): { [id: string]: IExtensionsStatus } { return Object.create(null); } getInspectPort(_tryEnableInspector: boolean): Promise { return Promise.resolve(0); } stopExtensionHosts(): void { } async restartExtensionHost(): Promise { } diff --git a/src/vs/workbench/services/extensions/common/rpcProtocol.ts b/src/vs/workbench/services/extensions/common/rpcProtocol.ts index 9a50650d44346..cae66942b49ac 100644 --- a/src/vs/workbench/services/extensions/common/rpcProtocol.ts +++ b/src/vs/workbench/services/extensions/common/rpcProtocol.ts @@ -130,8 +130,8 @@ export class RPCProtocol extends Disposable implements IRPCProtocol { private readonly _locals: any[]; private readonly _proxies: any[]; private _lastMessageId: number; - private readonly _cancelInvokedHandlers: { [req: string]: () => void; }; - private readonly _pendingRPCReplies: { [msgId: string]: LazyPromise; }; + private readonly _cancelInvokedHandlers: { [req: string]: () => void }; + private readonly _pendingRPCReplies: { [msgId: string]: LazyPromise }; private _responsiveState: ResponsiveState; private _unacknowledgedCount: number; private _unresponsiveTime: number; @@ -707,7 +707,7 @@ const enum SerializedRequestArgumentType { } type SerializedRequestArguments = - | { readonly type: SerializedRequestArgumentType.Simple; args: string; } + | { readonly type: SerializedRequestArgumentType.Simple; args: string } | { readonly type: SerializedRequestArgumentType.Mixed; args: MixedArg[] }; @@ -780,7 +780,7 @@ class MessageIO { return result.buffer; } - public static deserializeRequestJSONArgs(buff: MessageBuffer): { rpcId: number; method: string; args: any[]; } { + public static deserializeRequestJSONArgs(buff: MessageBuffer): { rpcId: number; method: string; args: any[] } { const rpcId = buff.readUInt8(); const method = buff.readShortString(); const args = buff.readLongString(); @@ -806,7 +806,7 @@ class MessageIO { return result.buffer; } - public static deserializeRequestMixedArgs(buff: MessageBuffer): { rpcId: number; method: string; args: any[]; } { + public static deserializeRequestMixedArgs(buff: MessageBuffer): { rpcId: number; method: string; args: any[] } { const rpcId = buff.readUInt8(); const method = buff.readShortString(); const rawargs = buff.readMixedArray(); @@ -964,8 +964,8 @@ const enum ArgType { type MixedArg = - | { readonly type: ArgType.String, readonly value: VSBuffer } - | { readonly type: ArgType.VSBuffer, readonly value: VSBuffer } - | { readonly type: ArgType.SerializedObjectWithBuffers, readonly value: VSBuffer, readonly buffers: readonly VSBuffer[] } + | { readonly type: ArgType.String; readonly value: VSBuffer } + | { readonly type: ArgType.VSBuffer; readonly value: VSBuffer } + | { readonly type: ArgType.SerializedObjectWithBuffers; readonly value: VSBuffer; readonly buffers: readonly VSBuffer[] } | { readonly type: ArgType.Undefined } ; diff --git a/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts b/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts index 23def4e18f825..64f740651b4c6 100644 --- a/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts +++ b/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts @@ -217,7 +217,7 @@ export class CachedExtensionScanner { productService: IProductService, log: ILog, translations: Translations - ): Promise<{ system: IExtensionDescription[], user: IExtensionDescription[], development: IExtensionDescription[] }> { + ): Promise<{ system: IExtensionDescription[]; user: IExtensionDescription[]; development: IExtensionDescription[] }> { const version = productService.version; const commit = productService.commit; diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index f49938a5d3ca3..ab0f2d8b0d7ad 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -304,9 +304,9 @@ export class ExtensionService extends AbstractExtensionService implements IExten private _sendExtensionHostCrashTelemetry(code: number, signal: string | null, activatedExtensions: ExtensionIdentifier[]): void { type ExtensionHostCrashClassification = { - code: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - signal: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - extensionIds: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + code: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + signal: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + extensionIds: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type ExtensionHostCrashEvent = { code: number; @@ -321,9 +321,9 @@ export class ExtensionService extends AbstractExtensionService implements IExten for (const extensionId of activatedExtensions) { type ExtensionHostCrashExtensionClassification = { - code: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - signal: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - extensionId: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + code: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + signal: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + extensionId: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type ExtensionHostCrashExtensionEvent = { code: number; diff --git a/src/vs/workbench/services/extensions/electron-browser/localProcessExtensionHost.ts b/src/vs/workbench/services/extensions/electron-browser/localProcessExtensionHost.ts index 7a689eba6429e..27289266b5bba 100644 --- a/src/vs/workbench/services/extensions/electron-browser/localProcessExtensionHost.ts +++ b/src/vs/workbench/services/extensions/electron-browser/localProcessExtensionHost.ts @@ -79,7 +79,7 @@ class ExtensionHostProcess { return this._extensionHostStarter.onDynamicMessage(this._id); } - public get onError(): Event<{ error: SerializedError; }> { + public get onError(): Event<{ error: SerializedError }> { return this._extensionHostStarter.onDynamicError(this._id); } @@ -94,7 +94,7 @@ class ExtensionHostProcess { this._id = id; } - public start(opts: IExtensionHostProcessOptions): Promise<{ pid: number; }> { + public start(opts: IExtensionHostProcessOptions): Promise<{ pid: number }> { return this._extensionHostStarter.start(this._id, opts); } @@ -292,7 +292,7 @@ export class LocalProcessExtensionHost implements IExtensionHost { } // Catch all output coming from the extension host process - type Output = { data: string, format: string[] }; + type Output = { data: string; format: string[] }; const onStdout = this._handleProcessOutputStream(this._extensionHostProcess.onStdout); const onStderr = this._handleProcessOutputStream(this._extensionHostProcess.onStderr); const onOutput = Event.any( diff --git a/src/vs/workbench/services/extensions/node/extensionPoints.ts b/src/vs/workbench/services/extensions/node/extensionPoints.ts index da7c6f8ac1411..56fb23d8d9acf 100644 --- a/src/vs/workbench/services/extensions/node/extensionPoints.ts +++ b/src/vs/workbench/services/extensions/node/extensionPoints.ts @@ -201,7 +201,7 @@ class ExtensionManifestNLSReplacer extends ExtensionManifestHandler { * Parses original message bundle, returns null if the original message bundle is null. */ private static resolveOriginalMessageBundle(originalMessageBundle: string | null, errors: json.ParseError[]) { - return new Promise<{ [key: string]: string; } | null>((c, e) => { + return new Promise<{ [key: string]: string } | null>((c, e) => { if (originalMessageBundle) { pfs.Promises.readFile(originalMessageBundle).then(originalBundleContent => { c(json.parse(originalBundleContent.toString(), errors)); @@ -218,8 +218,8 @@ class ExtensionManifestNLSReplacer extends ExtensionManifestHandler { * Finds localized message bundle and the original (unlocalized) one. * If the localized file is not present, returns null for the original and marks original as localized. */ - private static findMessageBundles(nlsConfig: NlsConfiguration, basename: string): Promise<{ localized: string; original: string | null; }> { - return new Promise<{ localized: string; original: string | null; }>((c, e) => { + private static findMessageBundles(nlsConfig: NlsConfiguration, basename: string): Promise<{ localized: string; original: string | null }> { + return new Promise<{ localized: string; original: string | null }>((c, e) => { function loop(basename: string, locale: string): void { let toCheck = `${basename}.nls.${locale}.json`; pfs.SymlinkSupport.existsFile(toCheck).then(exists => { @@ -549,7 +549,7 @@ export class ExtensionScanner { } try { - let obsolete: { [folderName: string]: boolean; } = {}; + let obsolete: { [folderName: string]: boolean } = {}; if (!isBuiltin) { try { const obsoleteFileContents = await pfs.Promises.readFile(path.join(absoluteFolderPath, '.obsolete'), 'utf8'); @@ -628,7 +628,7 @@ export class ExtensionScanner { public static mergeBuiltinExtensions(builtinExtensions: Promise, extraBuiltinExtensions: Promise): Promise { return Promise.all([builtinExtensions, extraBuiltinExtensions]).then(([builtinExtensions, extraBuiltinExtensions]) => { - let resultMap: { [id: string]: IExtensionDescription; } = Object.create(null); + let resultMap: { [id: string]: IExtensionDescription } = Object.create(null); for (let i = 0, len = builtinExtensions.length; i < len; i++) { resultMap[ExtensionIdentifier.toKey(builtinExtensions[i].identifier)] = builtinExtensions[i]; } diff --git a/src/vs/workbench/services/extensions/test/common/rpcProtocol.test.ts b/src/vs/workbench/services/extensions/test/common/rpcProtocol.test.ts index 66e63fc74646c..bc023d0e50e4e 100644 --- a/src/vs/workbench/services/extensions/test/common/rpcProtocol.test.ts +++ b/src/vs/workbench/services/extensions/test/common/rpcProtocol.test.ts @@ -213,7 +213,7 @@ suite('RPCProtocol', () => { }); test('SerializableObjectWithBuffers is correctly transfered', function (done) { - delegate = (a1: SerializableObjectWithBuffers<{ string: string, buff: VSBuffer }>, a2: number) => { + delegate = (a1: SerializableObjectWithBuffers<{ string: string; buff: VSBuffer }>, a2: number) => { return new SerializableObjectWithBuffers({ string: a1.value.string + ' world', buff: a1.value.buff }); }; diff --git a/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.ts b/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.ts index a760a0d2e8a8b..26ecc97960459 100644 --- a/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.ts +++ b/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.ts @@ -76,7 +76,7 @@ export class FilesConfigurationService extends Disposable implements IFilesConfi private autoSaveAfterShortDelayContext: IContextKey; - private currentFilesAssociationConfig: { [key: string]: string; }; + private currentFilesAssociationConfig: { [key: string]: string }; private currentHotExitConfig: string; diff --git a/src/vs/workbench/services/host/browser/browserHostService.ts b/src/vs/workbench/services/host/browser/browserHostService.ts index 84a02bff68021..8e946a1e1af2e 100644 --- a/src/vs/workbench/services/host/browser/browserHostService.ts +++ b/src/vs/workbench/services/host/browser/browserHostService.ts @@ -70,7 +70,7 @@ export interface IWorkspaceProvider { * * @returns true if successfully opened, false otherwise. */ - open(workspace: IWorkspace, options?: { reuse?: boolean, payload?: object }): Promise; + open(workspace: IWorkspace, options?: { reuse?: boolean; payload?: object }): Promise; } enum HostShutdownReason { @@ -381,7 +381,7 @@ export class BrowserHostService extends Disposable implements IHostService { return this.doOpen(undefined, { reuse: options?.forceReuseWindow }); } - private async doOpen(workspace: IWorkspace, options?: { reuse?: boolean, payload?: object }): Promise { + private async doOpen(workspace: IWorkspace, options?: { reuse?: boolean; payload?: object }): Promise { // We know that `workspaceProvider.open` will trigger a shutdown // with `options.reuse` so we handle this expected shutdown diff --git a/src/vs/workbench/services/hover/browser/hover.ts b/src/vs/workbench/services/hover/browser/hover.ts index a520b88cb74bd..a9828d36e8322 100644 --- a/src/vs/workbench/services/hover/browser/hover.ts +++ b/src/vs/workbench/services/hover/browser/hover.ts @@ -96,7 +96,7 @@ export interface IHoverOptions { * Force the hover position, reducing the size of the hover instead of adjusting the hover * position. */ - forcePosition?: boolean + forcePosition?: boolean; /** * Whether to show the hover pointer diff --git a/src/vs/workbench/services/hover/browser/hoverWidget.ts b/src/vs/workbench/services/hover/browser/hoverWidget.ts index 18caf6a420627..7856afda3a156 100644 --- a/src/vs/workbench/services/hover/browser/hoverWidget.ts +++ b/src/vs/workbench/services/hover/browser/hoverWidget.ts @@ -21,13 +21,13 @@ import { isMarkdownString } from 'vs/base/common/htmlContent'; const $ = dom.$; type TargetRect = { - left: number, - right: number, - top: number, - bottom: number, - width: number, - height: number, - center: { x: number, y: number }, + left: number; + right: number; + top: number; + bottom: number; + width: number; + height: number; + center: { x: number; y: number }; }; const enum Constants { diff --git a/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.ts b/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.ts index 1dacce3ff407b..9b013e05a2b24 100644 --- a/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.ts +++ b/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.ts @@ -108,7 +108,7 @@ export class BrowserKeyboardMapperFactoryBase { this._keymapInfos.splice(index, 1); } - getMatchedKeymapInfo(keyMapping: IKeyboardMapping | null): { result: KeymapInfo, score: number } | null { + getMatchedKeymapInfo(keyMapping: IKeyboardMapping | null): { result: KeymapInfo; score: number } | null { if (!keyMapping) { return null; } diff --git a/src/vs/workbench/services/keybinding/browser/navigatorKeyboard.ts b/src/vs/workbench/services/keybinding/browser/navigatorKeyboard.ts index 51e8de9f790ac..5d67ec6821bd6 100644 --- a/src/vs/workbench/services/keybinding/browser/navigatorKeyboard.ts +++ b/src/vs/workbench/services/keybinding/browser/navigatorKeyboard.ts @@ -11,5 +11,5 @@ export interface IKeyboard { } export type INavigatorWithKeyboard = Navigator & { - keyboard: IKeyboard + keyboard: IKeyboard; }; \ No newline at end of file diff --git a/src/vs/workbench/services/keybinding/common/keybindingEditing.ts b/src/vs/workbench/services/keybinding/common/keybindingEditing.ts index 9935d10658986..047618c1d731f 100644 --- a/src/vs/workbench/services/keybinding/common/keybindingEditing.ts +++ b/src/vs/workbench/services/keybinding/common/keybindingEditing.ts @@ -286,7 +286,7 @@ export class KeybindingsEditingService extends Disposable implements IKeybinding }); } - private parse(model: ITextModel): { result: IUserFriendlyKeybinding[], parseErrors: json.ParseError[] } { + private parse(model: ITextModel): { result: IUserFriendlyKeybinding[]; parseErrors: json.ParseError[] } { const parseErrors: json.ParseError[] = []; const result = json.parse(model.getValue(), parseErrors, { allowTrailingComma: true, allowEmptyContent: true }); return { result, parseErrors }; diff --git a/src/vs/workbench/services/keybinding/common/keymapInfo.ts b/src/vs/workbench/services/keybinding/common/keymapInfo.ts index 2c99772a81c21..700d16d448076 100644 --- a/src/vs/workbench/services/keybinding/common/keymapInfo.ts +++ b/src/vs/workbench/services/keybinding/common/keymapInfo.ts @@ -49,7 +49,7 @@ function deserializeMapping(serializedMapping: ISerializedMapping) { export interface IRawMixedKeyboardMapping { [key: string]: { - value: string, + value: string; withShift: string; withAltGr: string; withShiftAltGr: string; diff --git a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts index 06df5b9e20ae8..424eccf213541 100644 --- a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts @@ -433,7 +433,7 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { // Try to identify keyboard layouts where characters A-Z are missing // and forcibly map them to their corresponding scan codes if that is the case - const missingLatinLettersOverride: { [scanCode: string]: IMacLinuxKeyMapping; } = {}; + const missingLatinLettersOverride: { [scanCode: string]: IMacLinuxKeyMapping } = {}; { let producesLatinLetter: boolean[] = []; diff --git a/src/vs/workbench/services/keybinding/test/browser/keybindingEditing.test.ts b/src/vs/workbench/services/keybinding/test/browser/keybindingEditing.test.ts index baa889291ae38..ba84b6b152b69 100644 --- a/src/vs/workbench/services/keybinding/test/browser/keybindingEditing.test.ts +++ b/src/vs/workbench/services/keybinding/test/browser/keybindingEditing.test.ts @@ -303,8 +303,8 @@ suite('KeybindingsEditing', () => { return json.parse((await fileService.readFile(environmentService.keybindingsResource)).value.toString()); } - function aResolvedKeybindingItem({ command, when, isDefault, firstPart, chordPart }: { command?: string, when?: string, isDefault?: boolean, firstPart?: { keyCode: KeyCode, modifiers?: Modifiers }, chordPart?: { keyCode: KeyCode, modifiers?: Modifiers } }): ResolvedKeybindingItem { - const aSimpleKeybinding = function (part: { keyCode: KeyCode, modifiers?: Modifiers }): SimpleKeybinding { + function aResolvedKeybindingItem({ command, when, isDefault, firstPart, chordPart }: { command?: string; when?: string; isDefault?: boolean; firstPart?: { keyCode: KeyCode; modifiers?: Modifiers }; chordPart?: { keyCode: KeyCode; modifiers?: Modifiers } }): ResolvedKeybindingItem { + const aSimpleKeybinding = function (part: { keyCode: KeyCode; modifiers?: Modifiers }): SimpleKeybinding { const { ctrlKey, shiftKey, altKey, metaKey } = part.modifiers || { ctrlKey: false, shiftKey: false, altKey: false, metaKey: false }; return new SimpleKeybinding(ctrlKey!, shiftKey!, altKey!, metaKey!, part.keyCode); }; diff --git a/src/vs/workbench/services/label/common/labelService.ts b/src/vs/workbench/services/label/common/labelService.ts index 05b4c9776c275..5b41456f38a74 100644 --- a/src/vs/workbench/services/label/common/labelService.ts +++ b/src/vs/workbench/services/label/common/labelService.ts @@ -137,7 +137,7 @@ export class LabelService extends Disposable implements ILabelService { return bestResult ? bestResult.formatting : undefined; } - getUriLabel(resource: URI, options: { relative?: boolean, noPrefix?: boolean, endWithSeparator?: boolean, separator?: '/' | '\\' } = {}): string { + getUriLabel(resource: URI, options: { relative?: boolean; noPrefix?: boolean; endWithSeparator?: boolean; separator?: '/' | '\\' } = {}): string { let formatting = this.findFormatting(resource); if (formatting && options.separator) { // mixin separator if defined from the outside @@ -155,7 +155,7 @@ export class LabelService extends Disposable implements ILabelService { return label; } - private doGetUriLabel(resource: URI, formatting?: ResourceLabelFormatting, options: { relative?: boolean, noPrefix?: boolean, endWithSeparator?: boolean } = {}): string { + private doGetUriLabel(resource: URI, formatting?: ResourceLabelFormatting, options: { relative?: boolean; noPrefix?: boolean; endWithSeparator?: boolean } = {}): string { if (!formatting) { return getPathLabel(resource.path, { userHome: this.pathService.resolvedUserHome }, options.relative ? this.contextService : undefined); } diff --git a/src/vs/workbench/services/languageDetection/browser/languageDetectionWorkerServiceImpl.ts b/src/vs/workbench/services/languageDetection/browser/languageDetectionWorkerServiceImpl.ts index 95d0865f36139..3e90755f38a3e 100644 --- a/src/vs/workbench/services/languageDetection/browser/languageDetectionWorkerServiceImpl.ts +++ b/src/vs/workbench/services/languageDetection/browser/languageDetectionWorkerServiceImpl.ts @@ -102,11 +102,11 @@ export class LanguageDetectionWorkerHost { } async sendTelemetryEvent(languages: string[], confidences: number[], timeSpent: number): Promise { - type LanguageDetectionStats = { languages: string; confidences: string; timeSpent: number; }; + type LanguageDetectionStats = { languages: string; confidences: string; timeSpent: number }; type LanguageDetectionStatsClassification = { - languages: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - confidences: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - timeSpent: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + languages: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + confidences: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + timeSpent: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; this._telemetryService.publicLog2('automaticlanguagedetection.stats', { diff --git a/src/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.ts b/src/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.ts index 91e167fc2401c..785a95e6eb8e5 100644 --- a/src/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.ts +++ b/src/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.ts @@ -34,8 +34,8 @@ export interface IAutomaticLanguageDetectionLikelyWrongData { } export type AutomaticLanguageDetectionLikelyWrongClassification = { - currentLanguageId: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }, - nextLanguageId: { classification: 'SystemMetaData', purpose: 'FeatureInsight' } + currentLanguageId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + nextLanguageId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; export const LanguageDetectionStatsId = 'automaticlanguagedetection.stats'; @@ -47,9 +47,9 @@ export interface ILanguageDetectionStats { } export type LanguageDetectionStatsClassification = { - languages: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - confidences: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - timeSpent: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + languages: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + confidences: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + timeSpent: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; //#endregion diff --git a/src/vs/workbench/services/languageStatus/common/languageStatusService.ts b/src/vs/workbench/services/languageStatus/common/languageStatusService.ts index 65763d269ab3e..7f8bbc8ae19f3 100644 --- a/src/vs/workbench/services/languageStatus/common/languageStatusService.ts +++ b/src/vs/workbench/services/languageStatus/common/languageStatusService.ts @@ -30,7 +30,7 @@ export interface ILanguageStatus { } export interface ILanguageStatusProvider { - provideLanguageStatus(langId: string, token: CancellationToken): Promise + provideLanguageStatus(langId: string, token: CancellationToken): Promise; } export const ILanguageStatusService = createDecorator('ILanguageStatusService'); diff --git a/src/vs/workbench/services/layout/browser/layoutService.ts b/src/vs/workbench/services/layout/browser/layoutService.ts index 4120a59a8a228..22e9d1e6a192e 100644 --- a/src/vs/workbench/services/layout/browser/layoutService.ts +++ b/src/vs/workbench/services/layout/browser/layoutService.ts @@ -46,7 +46,7 @@ export function positionToString(position: Position): string { } } -const positionsByString: { [key: string]: Position; } = { +const positionsByString: { [key: string]: Position } = { [positionToString(Position.LEFT)]: Position.LEFT, [positionToString(Position.RIGHT)]: Position.RIGHT, [positionToString(Position.BOTTOM)]: Position.BOTTOM @@ -65,7 +65,7 @@ export function panelOpensMaximizedSettingToString(setting: PanelOpensMaximizedO } } -const panelOpensMaximizedByString: { [key: string]: PanelOpensMaximizedOptions; } = { +const panelOpensMaximizedByString: { [key: string]: PanelOpensMaximizedOptions } = { [panelOpensMaximizedSettingToString(PanelOpensMaximizedOptions.ALWAYS)]: PanelOpensMaximizedOptions.ALWAYS, [panelOpensMaximizedSettingToString(PanelOpensMaximizedOptions.NEVER)]: PanelOpensMaximizedOptions.NEVER, [panelOpensMaximizedSettingToString(PanelOpensMaximizedOptions.REMEMBER_LAST)]: PanelOpensMaximizedOptions.REMEMBER_LAST diff --git a/src/vs/workbench/services/lifecycle/electron-sandbox/lifecycleService.ts b/src/vs/workbench/services/lifecycle/electron-sandbox/lifecycleService.ts index 16df747217819..fd8ddc3bd219c 100644 --- a/src/vs/workbench/services/lifecycle/electron-sandbox/lifecycleService.ts +++ b/src/vs/workbench/services/lifecycle/electron-sandbox/lifecycleService.ts @@ -33,7 +33,7 @@ export class NativeLifecycleService extends AbstractLifecycleService { const windowId = this.nativeHostService.windowId; // Main side indicates that window is about to unload, check for vetos - ipcRenderer.on('vscode:onBeforeUnload', async (event: unknown, reply: { okChannel: string, cancelChannel: string, reason: ShutdownReason }) => { + ipcRenderer.on('vscode:onBeforeUnload', async (event: unknown, reply: { okChannel: string; cancelChannel: string; reason: ShutdownReason }) => { this.logService.trace(`[lifecycle] onBeforeUnload (reason: ${reply.reason})`); // trigger onBeforeShutdown events and veto collecting @@ -56,7 +56,7 @@ export class NativeLifecycleService extends AbstractLifecycleService { }); // Main side indicates that we will indeed shutdown - ipcRenderer.on('vscode:onWillUnload', async (event: unknown, reply: { replyChannel: string, reason: ShutdownReason }) => { + ipcRenderer.on('vscode:onWillUnload', async (event: unknown, reply: { replyChannel: string; reason: ShutdownReason }) => { this.logService.trace(`[lifecycle] onWillUnload (reason: ${reply.reason})`); // trigger onWillShutdown events and joining diff --git a/src/vs/workbench/services/outline/browser/outline.ts b/src/vs/workbench/services/outline/browser/outline.ts index 44b41006d534e..022a6004f2675 100644 --- a/src/vs/workbench/services/outline/browser/outline.ts +++ b/src/vs/workbench/services/outline/browser/outline.ts @@ -69,7 +69,7 @@ export interface IOutlineListConfig { } export interface OutlineChangeEvent { - affectOnlyActiveElement?: true + affectOnlyActiveElement?: true; } export interface IOutline { diff --git a/src/vs/workbench/services/panecomposite/browser/panecomposite.ts b/src/vs/workbench/services/panecomposite/browser/panecomposite.ts index e25a1264be447..4aa8d7627fbe7 100644 --- a/src/vs/workbench/services/panecomposite/browser/panecomposite.ts +++ b/src/vs/workbench/services/panecomposite/browser/panecomposite.ts @@ -18,8 +18,8 @@ export interface IPaneCompositePartService { readonly _serviceBrand: undefined; - readonly onDidPaneCompositeOpen: Event<{ composite: IPaneComposite, viewContainerLocation: ViewContainerLocation }>; - readonly onDidPaneCompositeClose: Event<{ composite: IPaneComposite, viewContainerLocation: ViewContainerLocation }>; + readonly onDidPaneCompositeOpen: Event<{ composite: IPaneComposite; viewContainerLocation: ViewContainerLocation }>; + readonly onDidPaneCompositeClose: Event<{ composite: IPaneComposite; viewContainerLocation: ViewContainerLocation }>; /** * Opens a viewlet with the given identifier and pass keyboard focus to it if specified. diff --git a/src/vs/workbench/services/preferences/browser/preferencesService.ts b/src/vs/workbench/services/preferences/browser/preferencesService.ts index 3c9a8cda38abc..d68f95d4f760b 100644 --- a/src/vs/workbench/services/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/services/preferences/browser/preferencesService.ts @@ -292,7 +292,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic async openGlobalKeybindingSettings(textual: boolean, options?: IKeybindingsEditorOptions): Promise { type OpenKeybindingsClassification = { - textual: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + textual: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; this.telemetryService.publicLog2<{ textual: boolean }, OpenKeybindingsClassification>('openKeybindings', { textual }); diff --git a/src/vs/workbench/services/preferences/common/preferences.ts b/src/vs/workbench/services/preferences/common/preferences.ts index a4d4f019501f5..7b8c9cbc51827 100644 --- a/src/vs/workbench/services/preferences/common/preferences.ts +++ b/src/vs/workbench/services/preferences/common/preferences.ts @@ -71,9 +71,9 @@ export interface ISetting { type?: string | string[]; order?: number; arrayItemType?: string; - objectProperties?: IJSONSchemaMap, - objectPatternProperties?: IJSONSchemaMap, - objectAdditionalProperties?: boolean | IJSONSchema, + objectProperties?: IJSONSchemaMap; + objectPatternProperties?: IJSONSchemaMap; + objectAdditionalProperties?: boolean | IJSONSchema; enum?: string[]; enumDescriptions?: string[]; enumDescriptionsAreMarkdown?: boolean; @@ -170,7 +170,7 @@ export interface IPreferencesEditorModel { } export type IGroupFilter = (group: ISettingsGroup) => boolean | null; -export type ISettingMatcher = (setting: ISetting, group: ISettingsGroup) => { matches: IRange[], matchType: SettingMatchType, score: number } | null; +export type ISettingMatcher = (setting: ISetting, group: ISettingsGroup) => { matches: IRange[]; matchType: SettingMatchType; score: number } | null; export interface ISettingsEditorModel extends IPreferencesEditorModel { readonly onDidChangeGroups: Event; diff --git a/src/vs/workbench/services/preferences/common/preferencesModels.ts b/src/vs/workbench/services/preferences/common/preferencesModels.ts index c958362b042f9..d9a1217ef07ea 100644 --- a/src/vs/workbench/services/preferences/common/preferencesModels.ts +++ b/src/vs/workbench/services/preferences/common/preferencesModels.ts @@ -629,7 +629,7 @@ export class DefaultSettings extends Disposable { return result; } - private parseSettings(settingsObject: { [path: string]: IConfigurationPropertySchema; }, extensionInfo?: IExtensionInfo): ISetting[] { + private parseSettings(settingsObject: { [path: string]: IConfigurationPropertySchema }, extensionInfo?: IExtensionInfo): ISetting[] { const result: ISetting[] = []; for (const key in settingsObject) { const prop = settingsObject[key]; @@ -829,7 +829,7 @@ export class DefaultSettingsEditorModel extends AbstractSettingsModel implements /** * Translate the ISearchResultGroups to text, and write it to the editor model */ - private writeResultGroups(groups: ISearchResultGroup[], startLine: number): { matches: IRange[], settingsGroups: ISettingsGroup[] } { + private writeResultGroups(groups: ISearchResultGroup[], startLine: number): { matches: IRange[]; settingsGroups: ISettingsGroup[] } { const contentBuilderOffset = startLine - 1; const builder = new SettingsContentBuilder(contentBuilderOffset); diff --git a/src/vs/workbench/services/preferences/common/preferencesValidation.ts b/src/vs/workbench/services/preferences/common/preferencesValidation.ts index b722a3cee43c8..14772a9ee3a86 100644 --- a/src/vs/workbench/services/preferences/common/preferencesValidation.ts +++ b/src/vs/workbench/services/preferences/common/preferencesValidation.ts @@ -9,7 +9,7 @@ import { Color } from 'vs/base/common/color'; import { isArray, isObject, isUndefinedOrNull, isString, isStringArray } from 'vs/base/common/types'; import { IConfigurationPropertySchema } from 'vs/platform/configuration/common/configurationRegistry'; -type Validator = { enabled: boolean, isValid: (value: T) => boolean; message: string }; +type Validator = { enabled: boolean; isValid: (value: T) => boolean; message: string }; function canBeType(propTypes: (string | undefined)[], ...types: JSONSchemaType[]): boolean { return types.some(t => propTypes.includes(t)); @@ -122,12 +122,12 @@ function getStringValidators(prop: IConfigurationPropertySchema) { return [ { enabled: prop.maxLength !== undefined, - isValid: ((value: { length: number; }) => value.length <= prop.maxLength!), + isValid: ((value: { length: number }) => value.length <= prop.maxLength!), message: nls.localize('validations.maxLength', "Value must be {0} or fewer characters long.", prop.maxLength) }, { enabled: prop.minLength !== undefined, - isValid: ((value: { length: number; }) => value.length >= prop.minLength!), + isValid: ((value: { length: number }) => value.length >= prop.minLength!), message: nls.localize('validations.minLength', "Value must be {0} or more characters long.", prop.minLength) }, { diff --git a/src/vs/workbench/services/preferences/test/browser/keybindingsEditorModel.test.ts b/src/vs/workbench/services/preferences/test/browser/keybindingsEditorModel.test.ts index 44486cec80593..1e540920f0055 100644 --- a/src/vs/workbench/services/preferences/test/browser/keybindingsEditorModel.test.ts +++ b/src/vs/workbench/services/preferences/test/browser/keybindingsEditorModel.test.ts @@ -706,8 +706,8 @@ suite('KeybindingsEditorModel', () => { } } - function aResolvedKeybindingItem({ command, when, isDefault, firstPart, chordPart }: { command?: string, when?: string, isDefault?: boolean, firstPart?: { keyCode: KeyCode, modifiers?: Modifiers }, chordPart?: { keyCode: KeyCode, modifiers?: Modifiers } }): ResolvedKeybindingItem { - const aSimpleKeybinding = function (part: { keyCode: KeyCode, modifiers?: Modifiers }): SimpleKeybinding { + function aResolvedKeybindingItem({ command, when, isDefault, firstPart, chordPart }: { command?: string; when?: string; isDefault?: boolean; firstPart?: { keyCode: KeyCode; modifiers?: Modifiers }; chordPart?: { keyCode: KeyCode; modifiers?: Modifiers } }): ResolvedKeybindingItem { + const aSimpleKeybinding = function (part: { keyCode: KeyCode; modifiers?: Modifiers }): SimpleKeybinding { const { ctrlKey, shiftKey, altKey, metaKey } = part.modifiers || { ctrlKey: false, shiftKey: false, altKey: false, metaKey: false }; return new SimpleKeybinding(ctrlKey!, shiftKey!, altKey!, metaKey!, part.keyCode); }; diff --git a/src/vs/workbench/services/remote/browser/remoteAgentService.ts b/src/vs/workbench/services/remote/browser/remoteAgentService.ts index e3406ca12fabb..611d483cf1b4b 100644 --- a/src/vs/workbench/services/remote/browser/remoteAgentService.ts +++ b/src/vs/workbench/services/remote/browser/remoteAgentService.ts @@ -49,9 +49,9 @@ class RemoteConnectionFailureNotificationContribution implements IWorkbenchContr .then(undefined, (err) => { type RemoteConnectionFailureClassification = { - web: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - remoteName: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - message: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + web: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + remoteName: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + message: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type RemoteConnectionFailureEvent = { web: boolean; diff --git a/src/vs/workbench/services/remote/common/remoteExplorerService.ts b/src/vs/workbench/services/remote/common/remoteExplorerService.ts index 7d6e321ca7c4b..474747c2282ae 100644 --- a/src/vs/workbench/services/remote/common/remoteExplorerService.ts +++ b/src/vs/workbench/services/remote/common/remoteExplorerService.ts @@ -54,8 +54,8 @@ export interface ITunnelItem { name?: string; closeable?: boolean; source: { - source: TunnelSource, - description: string + source: TunnelSource; + description: string; }; privacy: TunnelPrivacy; processDescription?: string; @@ -70,15 +70,15 @@ export enum TunnelEditId { } interface TunnelProperties { - remote: { host: string, port: number }, - local?: number, - name?: string, + remote: { host: string; port: number }; + local?: number; + name?: string; source?: { - source: TunnelSource, - description: string - }, - elevateIfNeeded?: boolean, - privacy?: string + source: TunnelSource; + description: string; + }; + elevateIfNeeded?: boolean; + privacy?: string; } export enum TunnelSource { @@ -110,8 +110,8 @@ export interface Tunnel { hasRunningProcess?: boolean; pid: number | undefined; source: { - source: TunnelSource, - description: string + source: TunnelSource; + description: string; }; } @@ -119,7 +119,7 @@ export function makeAddress(host: string, port: number): string { return host + ':' + port; } -export function parseAddress(address: string): { host: string, port: number } | undefined { +export function parseAddress(address: string): { host: string; port: number } | undefined { const matches = address.match(/^([a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*:)?([0-9]+)$/); if (!matches) { return undefined; @@ -177,15 +177,15 @@ export enum OnPortForward { export interface Attributes { label: string | undefined; - onAutoForward: OnPortForward | undefined, + onAutoForward: OnPortForward | undefined; elevateIfNeeded: boolean | undefined; requireLocalPort: boolean | undefined; protocol: TunnelProtocol | undefined; } -interface PortRange { start: number, end: number } +interface PortRange { start: number; end: number } -interface HostAndPort { host: string, port: number } +interface HostAndPort { host: string; port: number } interface PortAttributes extends Attributes { key: number | PortRange | RegExp | HostAndPort; @@ -408,14 +408,14 @@ export class TunnelModel extends Disposable { private remoteTunnels: Map; private _onForwardPort: Emitter = new Emitter(); public onForwardPort: Event = this._onForwardPort.event; - private _onClosePort: Emitter<{ host: string, port: number }> = new Emitter(); - public onClosePort: Event<{ host: string, port: number }> = this._onClosePort.event; - private _onPortName: Emitter<{ host: string, port: number }> = new Emitter(); - public onPortName: Event<{ host: string, port: number }> = this._onPortName.event; + private _onClosePort: Emitter<{ host: string; port: number }> = new Emitter(); + public onClosePort: Event<{ host: string; port: number }> = this._onClosePort.event; + private _onPortName: Emitter<{ host: string; port: number }> = new Emitter(); + public onPortName: Event<{ host: string; port: number }> = this._onPortName.event; private _candidates: Map | undefined; - private _onCandidatesChanged: Emitter> = new Emitter(); + private _onCandidatesChanged: Emitter> = new Emitter(); // onCandidateChanged returns the removed candidates - public onCandidatesChanged: Event> = this._onCandidatesChanged.event; + public onCandidatesChanged: Event> = this._onCandidatesChanged.event; private _candidateFilter: ((candidates: CandidatePort[]) => Promise) | undefined; private tunnelRestoreValue: Promise; private _onEnvironmentTunnelsSet: Emitter = new Emitter(); @@ -501,7 +501,7 @@ export class TunnelModel extends Disposable { })); } - private async onTunnelClosed(address: { host: string, port: number }) { + private async onTunnelClosed(address: { host: string; port: number }) { const key = makeAddress(address.host, address.port); if (this.forwarded.has(key)) { this.forwarded.delete(key); @@ -729,7 +729,7 @@ export class TunnelModel extends Disposable { } // Returns removed candidates - private updateInResponseToCandidates(candidates: CandidatePort[]): Map { + private updateInResponseToCandidates(candidates: CandidatePort[]): Map { const removedCandidates = this._candidates ?? new Map(); const candidatesMap = new Map(); this._candidates = candidatesMap; @@ -810,7 +810,7 @@ export class TunnelModel extends Disposable { } } - async getAttributes(forwardedPorts: { host: string, port: number }[], checkProviders: boolean = true): Promise | undefined> { + async getAttributes(forwardedPorts: { host: string; port: number }[], checkProviders: boolean = true): Promise | undefined> { const matchingCandidates: Map = new Map(); const pidToPortsMapping: Map = new Map(); forwardedPorts.forEach(forwardedPort => { @@ -889,11 +889,11 @@ export interface IRemoteExplorerService { onDidChangeTargetType: Event; targetType: string[]; readonly tunnelModel: TunnelModel; - onDidChangeEditable: Event<{ tunnel: ITunnelItem, editId: TunnelEditId } | undefined>; + onDidChangeEditable: Event<{ tunnel: ITunnelItem; editId: TunnelEditId } | undefined>; setEditable(tunnelItem: ITunnelItem | undefined, editId: TunnelEditId, data: IEditableData | null): void; getEditableData(tunnelItem: ITunnelItem | undefined, editId?: TunnelEditId): IEditableData | undefined; forward(tunnelProperties: TunnelProperties, attributes?: Attributes | null): Promise; - close(remote: { host: string, port: number }): Promise; + close(remote: { host: string; port: number }): Promise; setTunnelInformation(tunnelInformation: TunnelInformation | undefined): void; setCandidateFilter(filter: ((candidates: CandidatePort[]) => Promise) | undefined): IDisposable; onFoundNewCandidates(candidates: CandidatePort[]): void; @@ -910,9 +910,9 @@ class RemoteExplorerService implements IRemoteExplorerService { private readonly _onDidChangeTargetType: Emitter = new Emitter(); public readonly onDidChangeTargetType: Event = this._onDidChangeTargetType.event; private _tunnelModel: TunnelModel; - private _editable: { tunnelItem: ITunnelItem | undefined, editId: TunnelEditId, data: IEditableData } | undefined; - private readonly _onDidChangeEditable: Emitter<{ tunnel: ITunnelItem, editId: TunnelEditId } | undefined> = new Emitter(); - public readonly onDidChangeEditable: Event<{ tunnel: ITunnelItem, editId: TunnelEditId } | undefined> = this._onDidChangeEditable.event; + private _editable: { tunnelItem: ITunnelItem | undefined; editId: TunnelEditId; data: IEditableData } | undefined; + private readonly _onDidChangeEditable: Emitter<{ tunnel: ITunnelItem; editId: TunnelEditId } | undefined> = new Emitter(); + public readonly onDidChangeEditable: Event<{ tunnel: ITunnelItem; editId: TunnelEditId } | undefined> = this._onDidChangeEditable.event; private readonly _onEnabledPortsFeatures: Emitter = new Emitter(); public readonly onEnabledPortsFeatures: Event = this._onEnabledPortsFeatures.event; private _portsFeaturesEnabled: boolean = false; @@ -955,7 +955,7 @@ class RemoteExplorerService implements IRemoteExplorerService { return this.tunnelModel.forward(tunnelProperties, attributes); } - close(remote: { host: string, port: number }): Promise { + close(remote: { host: string; port: number }): Promise { return this.tunnelModel.close(remote.host, remote.port); } diff --git a/src/vs/workbench/services/remote/electron-sandbox/remoteAgentService.ts b/src/vs/workbench/services/remote/electron-sandbox/remoteAgentService.ts index 79071207d11a4..d1b6aac05c6a0 100644 --- a/src/vs/workbench/services/remote/electron-sandbox/remoteAgentService.ts +++ b/src/vs/workbench/services/remote/electron-sandbox/remoteAgentService.ts @@ -50,9 +50,9 @@ class RemoteConnectionFailureNotificationContribution implements IWorkbenchContr .then(undefined, err => { type RemoteConnectionFailureClassification = { - web: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - remoteName: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - message: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + web: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + remoteName: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + message: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type RemoteConnectionFailureEvent = { web: boolean; diff --git a/src/vs/workbench/services/search/browser/searchService.ts b/src/vs/workbench/services/search/browser/searchService.ts index e73a1a43289bc..1b19cc18607c1 100644 --- a/src/vs/workbench/services/search/browser/searchService.ts +++ b/src/vs/workbench/services/search/browser/searchService.ts @@ -49,10 +49,10 @@ export class LocalFileSearchWorkerClient extends Disposable implements ISearchRe protected _worker: IWorkerClient | null; protected readonly _workerFactory: DefaultWorkerFactory; - private readonly _onDidReceiveTextSearchMatch = new Emitter<{ match: IFileMatch, queryId: number }>(); - readonly onDidReceiveTextSearchMatch: Event<{ match: IFileMatch, queryId: number }> = this._onDidReceiveTextSearchMatch.event; + private readonly _onDidReceiveTextSearchMatch = new Emitter<{ match: IFileMatch; queryId: number }>(); + readonly onDidReceiveTextSearchMatch: Event<{ match: IFileMatch; queryId: number }> = this._onDidReceiveTextSearchMatch.event; - private cache: { key: string, cache: ISearchComplete } | undefined; + private cache: { key: string; cache: ISearchComplete } | undefined; private queryId: number = 0; diff --git a/src/vs/workbench/services/search/common/getFileResults.ts b/src/vs/workbench/services/search/common/getFileResults.ts index f2e81f913dd63..366f8b030ef7b 100644 --- a/src/vs/workbench/services/search/common/getFileResults.ts +++ b/src/vs/workbench/services/search/common/getFileResults.ts @@ -32,7 +32,7 @@ export const getFileResults = ( const results: ITextSearchResult[] = []; - const patternIndecies: { matchStartIndex: number; matchedText: string; }[] = []; + const patternIndecies: { matchStartIndex: number; matchedText: string }[] = []; let patternMatch: RegExpExecArray | null = null; let remainingResultQuota = options.remainingResultQuota; @@ -45,7 +45,7 @@ export const getFileResults = ( const contextLinesNeeded = new Set(); const resultLines = new Set(); - const lineRanges: { start: number; end: number; }[] = []; + const lineRanges: { start: number; end: number }[] = []; const readLine = (lineNumber: number) => text.slice(lineRanges[lineNumber].start, lineRanges[lineNumber].end); let prevLineEnd = 0; diff --git a/src/vs/workbench/services/search/common/localFileSearchWorkerTypes.ts b/src/vs/workbench/services/search/common/localFileSearchWorkerTypes.ts index 133b9ba620a99..224727af7c74e 100644 --- a/src/vs/workbench/services/search/common/localFileSearchWorkerTypes.ts +++ b/src/vs/workbench/services/search/common/localFileSearchWorkerTypes.ts @@ -20,17 +20,17 @@ export type SearchWorkerFileSystemHandle = ISearchWorkerFileSystemDirectoryHandl // Minimal interface needed from DOM's FileSystemFileHandle, which is not available in this scope export interface ISearchWorkerFileSystemFileHandle { - name: string - kind: 'file' - getFile(): Promise<{ arrayBuffer(): Promise }> + name: string; + kind: 'file'; + getFile(): Promise<{ arrayBuffer(): Promise }>; } // Minimal interface needed from DOM's FileSystemDirectoryHandle, which is not available in this scope export interface ISearchWorkerFileSystemDirectoryHandle { - name: string - kind: 'directory' - getFileHandle(name: string): Promise - entries(): AsyncIterable<[string, SearchWorkerFileSystemHandle]> + name: string; + kind: 'directory'; + getFileHandle(name: string): Promise; + entries(): AsyncIterable<[string, SearchWorkerFileSystemHandle]>; } export interface ILocalFileSearchSimpleWorker { @@ -38,10 +38,10 @@ export interface ILocalFileSearchSimpleWorker { cancelQuery(queryId: number): void; - listDirectory(handle: ISearchWorkerFileSystemDirectoryHandle, queryProps: IFileQueryProps, folderQuery: IFolderQuery, queryId: number): Promise - searchDirectory(handle: ISearchWorkerFileSystemDirectoryHandle, queryProps: ITextQueryProps, folderQuery: IFolderQuery, queryId: number): Promise + listDirectory(handle: ISearchWorkerFileSystemDirectoryHandle, queryProps: IFileQueryProps, folderQuery: IFolderQuery, queryId: number): Promise; + searchDirectory(handle: ISearchWorkerFileSystemDirectoryHandle, queryProps: ITextQueryProps, folderQuery: IFolderQuery, queryId: number): Promise; } export interface ILocalFileSearchSimpleWorkerHost { - sendTextSearchMatch(match: IFileMatch, queryId: number): void + sendTextSearchMatch(match: IFileMatch, queryId: number): void; } diff --git a/src/vs/workbench/services/search/common/queryBuilder.ts b/src/vs/workbench/services/search/common/queryBuilder.ts index c8f946a4e8148..b429842903d38 100644 --- a/src/vs/workbench/services/search/common/queryBuilder.ts +++ b/src/vs/workbench/services/search/common/queryBuilder.ts @@ -514,7 +514,7 @@ export class QueryBuilder { } } -function splitGlobFromPath(searchPath: string): { pathPortion: string, globPortion?: string } { +function splitGlobFromPath(searchPath: string): { pathPortion: string; globPortion?: string } { const globCharMatch = searchPath.match(/[\*\{\}\(\)\[\]\?]/); if (globCharMatch) { const globCharIdx = globCharMatch.index; diff --git a/src/vs/workbench/services/search/common/search.ts b/src/vs/workbench/services/search/common/search.ts index 172f56949c4da..6c20ba1397b53 100644 --- a/src/vs/workbench/services/search/common/search.ts +++ b/src/vs/workbench/services/search/common/search.ts @@ -383,9 +383,9 @@ export interface ISearchConfigurationProperties { searchOnTypeDebouncePeriod: number; mode: 'view' | 'reuseEditor' | 'newEditor'; searchEditor: { - doubleClickBehaviour: 'selectWord' | 'goToLocation' | 'openLocationToSide', - reusePriorSearchConfiguration: boolean, - defaultNumberOfContextLines: number | null, + doubleClickBehaviour: 'selectWord' | 'goToLocation' | 'openLocationToSide'; + reusePriorSearchConfiguration: boolean; + defaultNumberOfContextLines: number | null; experimental: {}; }; sortOrder: SearchSortOrder; @@ -531,7 +531,7 @@ export interface ISearchEngineSuccess { export interface ISerializedSearchError { type: 'error'; error: { - message: string, + message: string; stack: string; }; } diff --git a/src/vs/workbench/services/search/common/searchExtTypes.ts b/src/vs/workbench/services/search/common/searchExtTypes.ts index 4a8a80a298240..27f646183f4f0 100644 --- a/src/vs/workbench/services/search/common/searchExtTypes.ts +++ b/src/vs/workbench/services/search/common/searchExtTypes.ts @@ -17,10 +17,10 @@ export class Position { isEqual(other: Position): boolean { return false; } compareTo(other: Position): number { return 0; } translate(lineDelta?: number, characterDelta?: number): Position; - translate(change: { lineDelta?: number; characterDelta?: number; }): Position; + translate(change: { lineDelta?: number; characterDelta?: number }): Position; translate(_?: any, _2?: any): Position { return new Position(0, 0); } with(line?: number, character?: number): Position; - with(change: { line?: number; character?: number; }): Position; + with(change: { line?: number; character?: number }): Position; with(_: any): Position { return new Position(0, 0); } } @@ -41,7 +41,7 @@ export class Range { union(other: Range): Range { return new Range(0, 0, 0, 0); } with(start?: Position, end?: Position): Range; - with(change: { start?: Position, end?: Position }): Range; + with(change: { start?: Position; end?: Position }): Range; with(_: any): Range { return new Range(0, 0, 0, 0); } } @@ -237,15 +237,15 @@ export interface TextSearchCompleteMessage { /** * Markdown text of the message. */ - text: string, + text: string; /** * Whether the source of the message is trusted, command links are disabled for untrusted message sources. */ - trusted?: boolean, + trusted?: boolean; /** * The message type, this affects how the message will be rendered. */ - type: TextSearchCompleteMessageType, + type: TextSearchCompleteMessageType; } /** diff --git a/src/vs/workbench/services/search/common/searchHelpers.ts b/src/vs/workbench/services/search/common/searchHelpers.ts index 238d651f5f74a..50e8d7a43ca97 100644 --- a/src/vs/workbench/services/search/common/searchHelpers.ts +++ b/src/vs/workbench/services/search/common/searchHelpers.ts @@ -80,7 +80,7 @@ export function addContextToEditorMatches(matches: ITextSearchMatch[], model: IT return results; } -function getMatchStartEnd(match: ITextSearchMatch): { start: number, end: number } { +function getMatchStartEnd(match: ITextSearchMatch): { start: number; end: number } { const matchRanges = match.ranges; const matchStartLine = Array.isArray(matchRanges) ? matchRanges[0].startLineNumber : matchRanges.startLineNumber; const matchEndLine = Array.isArray(matchRanges) ? matchRanges[matchRanges.length - 1].endLineNumber : matchRanges.endLineNumber; diff --git a/src/vs/workbench/services/search/common/searchService.ts b/src/vs/workbench/services/search/common/searchService.ts index 548609d2e8559..a5fa303db1396 100644 --- a/src/vs/workbench/services/search/common/searchService.ts +++ b/src/vs/workbench/services/search/common/searchService.ts @@ -288,17 +288,17 @@ export class SearchService extends Disposable implements ISearchService { const cacheStats: ICachedSearchStats = fileSearchStats.detailStats as ICachedSearchStats; type CachedSearchCompleteClassifcation = { - reason?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - resultCount: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - workspaceFolderCount: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - type: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - endToEndTime: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - sortingTime?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - cacheWasResolved: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - cacheLookupTime: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - cacheFilterTime: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - cacheEntryCount: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - scheme: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + reason?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + resultCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + workspaceFolderCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + type: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + endToEndTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + sortingTime?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + cacheWasResolved: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + cacheLookupTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + cacheFilterTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + cacheEntryCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + scheme: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type CachedSearchCompleteEvent = { reason?: string; @@ -330,18 +330,18 @@ export class SearchService extends Disposable implements ISearchService { const searchEngineStats: ISearchEngineStats = fileSearchStats.detailStats as ISearchEngineStats; type SearchCompleteClassification = { - reason?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - resultCount: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - workspaceFolderCount: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - type: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - endToEndTime: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - sortingTime?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - fileWalkTime: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - directoriesWalked: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - filesWalked: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - cmdTime: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - cmdResultCount?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - scheme: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + reason?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + resultCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + workspaceFolderCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + type: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + endToEndTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + sortingTime?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + fileWalkTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + directoriesWalked: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + filesWalked: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + cmdTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + cmdResultCount?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + scheme: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type SearchCompleteEvent = { reason?: string; @@ -350,7 +350,7 @@ export class SearchService extends Disposable implements ISearchService { type: 'fileSearchProvider' | 'searchProcess'; endToEndTime: number; sortingTime?: number; - fileWalkTime: number + fileWalkTime: number; directoriesWalked: number; filesWalked: number; cmdTime: number; @@ -387,12 +387,12 @@ export class SearchService extends Disposable implements ISearchService { } type TextSearchCompleteClassification = { - reason?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - workspaceFolderCount: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - endToEndTime: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; - scheme: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - error?: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; - usePCRE2: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' }; + reason?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + workspaceFolderCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + endToEndTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + scheme: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + error?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + usePCRE2: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; }; type TextSearchCompleteEvent = { reason?: string; diff --git a/src/vs/workbench/services/search/node/fileSearch.ts b/src/vs/workbench/services/search/node/fileSearch.ts index 3bcea267aefd8..265de9a10f428 100644 --- a/src/vs/workbench/services/search/node/fileSearch.ts +++ b/src/vs/workbench/services/search/node/fileSearch.ts @@ -59,7 +59,7 @@ export class FileWalker { private folderExcludePatterns: Map; private globalExcludePattern: glob.ParsedExpression | undefined; - private walkedPaths: { [path: string]: boolean; }; + private walkedPaths: { [path: string]: boolean }; constructor(config: IFileQuery) { this.config = config; diff --git a/src/vs/workbench/services/search/node/rawSearchService.ts b/src/vs/workbench/services/search/node/rawSearchService.ts index 49a7002e94871..82e31e6f31f7a 100644 --- a/src/vs/workbench/services/search/node/rawSearchService.ts +++ b/src/vs/workbench/services/search/node/rawSearchService.ts @@ -24,7 +24,7 @@ export class SearchService implements IRawSearchService { private static readonly BATCH_SIZE = 512; - private caches: { [cacheKey: string]: Cache; } = Object.create(null); + private caches: { [cacheKey: string]: Cache } = Object.create(null); constructor(private readonly processType: IFileSearchStats['type'] = 'searchProcess') { } @@ -83,7 +83,7 @@ export class SearchService implements IRawSearchService { return this.doFileSearchWithEngine(FileSearchEngine, config, progressCallback, token); } - doFileSearchWithEngine(EngineClass: { new(config: IFileQuery): ISearchEngine; }, config: IFileQuery, progressCallback: IProgressCallback, token?: CancellationToken, batchSize = SearchService.BATCH_SIZE): Promise { + doFileSearchWithEngine(EngineClass: { new(config: IFileQuery): ISearchEngine }, config: IFileQuery, progressCallback: IProgressCallback, token?: CancellationToken, batchSize = SearchService.BATCH_SIZE): Promise { let resultCount = 0; const fileProgressCallback: IFileProgressCallback = progress => { if (Array.isArray(progress)) { @@ -403,7 +403,7 @@ interface ICacheRow { class Cache { - resultsToSearchCache: { [searchValue: string]: ICacheRow; } = Object.create(null); + resultsToSearchCache: { [searchValue: string]: ICacheRow } = Object.create(null); scorerCache: FuzzyScorerCache = Object.create(null); } diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts b/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts index e657e06f1a372..466b5ec5349ee 100644 --- a/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts +++ b/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts @@ -348,7 +348,7 @@ function bytesOrTextToString(obj: any): string { obj.text; } -function getNumLinesAndLastNewlineLength(text: string): { numLines: number, lastLineLength: number } { +function getNumLinesAndLastNewlineLength(text: string): { numLines: number; lastLineLength: number } { const re = /\n/g; let numLines = 0; let lastNewlineIdx = -1; diff --git a/src/vs/workbench/services/search/test/common/ignoreFile.test.ts b/src/vs/workbench/services/search/test/common/ignoreFile.test.ts index 820094e05ef25..3ae847e421157 100644 --- a/src/vs/workbench/services/search/test/common/ignoreFile.test.ts +++ b/src/vs/workbench/services/search/test/common/ignoreFile.test.ts @@ -415,7 +415,7 @@ suite('Parsing .gitignore files', () => { }); test('various advanced constructs found in popular repos', () => { - const runTest = ({ pattern, included, excluded }: { pattern: string, included: string[], excluded: string[] }) => { + const runTest = ({ pattern, included, excluded }: { pattern: string; included: string[]; excluded: string[] }) => { for (const include of included) { assertNoIgnoreMatch(pattern, '/', include); } diff --git a/src/vs/workbench/services/search/test/node/ripgrepTextSearchEngineUtils.test.ts b/src/vs/workbench/services/search/test/node/ripgrepTextSearchEngineUtils.test.ts index 10c51c9dc92fe..b29c81f2d31a1 100644 --- a/src/vs/workbench/services/search/test/node/ripgrepTextSearchEngineUtils.test.ts +++ b/src/vs/workbench/services/search/test/node/ripgrepTextSearchEngineUtils.test.ts @@ -116,7 +116,7 @@ suite('RipgrepTextSearchEngine', () => { assert.deepStrictEqual(actualResults, expectedResults); } - function makeRgMatch(relativePath: string, text: string, lineNumber: number, matchRanges: { start: number, end: number }[]): string { + function makeRgMatch(relativePath: string, text: string, lineNumber: number, matchRanges: { start: number; end: number }[]): string { return JSON.stringify({ type: 'match', data: { diff --git a/src/vs/workbench/services/search/worker/localFileSearch.ts b/src/vs/workbench/services/search/worker/localFileSearch.ts index 14245d8f9d9b4..be4beacb110c1 100644 --- a/src/vs/workbench/services/search/worker/localFileSearch.ts +++ b/src/vs/workbench/services/search/worker/localFileSearch.ts @@ -19,16 +19,16 @@ import { Promises } from 'vs/base/common/async'; const PERF = false; type FileNode = { - type: 'file', - name: string, - path: string, - resolve: () => Promise + type: 'file'; + name: string; + path: string; + resolve: () => Promise; }; type DirNode = { - type: 'dir', - name: string, - entries: Promise<(DirNode | FileNode)[]> + type: 'dir'; + name: string; + entries: Promise<(DirNode | FileNode)[]>; }; const globalStart = +new Date(); diff --git a/src/vs/workbench/services/statusbar/browser/statusbar.ts b/src/vs/workbench/services/statusbar/browser/statusbar.ts index 0cd27174bf4ab..010f0e847a65c 100644 --- a/src/vs/workbench/services/statusbar/browser/statusbar.ts +++ b/src/vs/workbench/services/statusbar/browser/statusbar.ts @@ -101,7 +101,7 @@ export interface IStatusbarService { /** * An event that is triggered when an entry's visibility is changed. */ - readonly onDidChangeEntryVisibility: Event<{ id: string, visible: boolean }>; + readonly onDidChangeEntryVisibility: Event<{ id: string; visible: boolean }>; /** * Adds an entry to the statusbar with the given alignment and priority. Use the returned accessor diff --git a/src/vs/workbench/services/telemetry/browser/telemetryService.ts b/src/vs/workbench/services/telemetry/browser/telemetryService.ts index 0283464d2c40a..b71dfae7110bb 100644 --- a/src/vs/workbench/services/telemetry/browser/telemetryService.ts +++ b/src/vs/workbench/services/telemetry/browser/telemetryService.ts @@ -22,7 +22,7 @@ import { resolveWorkbenchCommonProperties } from 'vs/workbench/services/telemetr class WebAppInsightsAppender implements ITelemetryAppender { private _aiClient: ApplicationInsights | undefined; private _aiClientLoaded = false; - private _telemetryCache: { eventName: string, data: any }[] = []; + private _telemetryCache: { eventName: string; data: any }[] = []; constructor(private _eventPrefix: string, aiKey: string) { const endpointUrl = 'https://vortex.data.microsoft.com/collect/v1'; diff --git a/src/vs/workbench/services/telemetry/browser/workbenchCommonProperties.ts b/src/vs/workbench/services/telemetry/browser/workbenchCommonProperties.ts index e5e79bf56a823..cd56911dba645 100644 --- a/src/vs/workbench/services/telemetry/browser/workbenchCommonProperties.ts +++ b/src/vs/workbench/services/telemetry/browser/workbenchCommonProperties.ts @@ -28,7 +28,7 @@ export async function resolveWorkbenchCommonProperties( productIdentifier?: string, resolveAdditionalProperties?: () => { [key: string]: any } ): Promise<{ [name: string]: string | undefined }> { - const result: { [name: string]: string | undefined; } = Object.create(null); + const result: { [name: string]: string | undefined } = Object.create(null); const firstSessionDate = storageService.get(firstSessionDateStorageKey, StorageScope.GLOBAL)!; const lastSessionDate = storageService.get(lastSessionDateStorageKey, StorageScope.GLOBAL)!; diff --git a/src/vs/workbench/services/textMate/browser/nativeTextMateService.ts b/src/vs/workbench/services/textMate/browser/nativeTextMateService.ts index e57085a055a23..de5b056af7405 100644 --- a/src/vs/workbench/services/textMate/browser/nativeTextMateService.ts +++ b/src/vs/workbench/services/textMate/browser/nativeTextMateService.ts @@ -147,7 +147,7 @@ export class TextMateService extends AbstractTextMateService { private _worker: MonacoWebWorker | null; private _workerProxy: TextMateWorker | null; - private _tokenizers: { [uri: string]: ModelWorkerTextMateTokenizer; }; + private _tokenizers: { [uri: string]: ModelWorkerTextMateTokenizer }; constructor( @ILanguageService languageService: ILanguageService, diff --git a/src/vs/workbench/services/textMate/browser/textMateWorker.ts b/src/vs/workbench/services/textMate/browser/textMateWorker.ts index 6c88a038203a1..d5169697d97ce 100644 --- a/src/vs/workbench/services/textMate/browser/textMateWorker.ts +++ b/src/vs/workbench/services/textMate/browser/textMateWorker.ts @@ -127,7 +127,7 @@ class TextMateWorkerModel extends MirrorTextModel { export class TextMateWorker { private readonly _host: TextMateWorkerHost; - private readonly _models: { [uri: string]: TextMateWorkerModel; }; + private readonly _models: { [uri: string]: TextMateWorkerModel }; private readonly _grammarCache: Promise[]; private readonly _grammarFactory: Promise; diff --git a/src/vs/workbench/services/textMate/common/TMGrammarFactory.ts b/src/vs/workbench/services/textMate/common/TMGrammarFactory.ts index 675f671347d8f..5d5ae7a8c8ed0 100644 --- a/src/vs/workbench/services/textMate/common/TMGrammarFactory.ts +++ b/src/vs/workbench/services/textMate/common/TMGrammarFactory.ts @@ -27,8 +27,8 @@ export class TMGrammarFactory extends Disposable { private readonly _host: ITMGrammarFactoryHost; private readonly _initialState: StackElement; private readonly _scopeRegistry: TMScopeRegistry; - private readonly _injections: { [scopeName: string]: string[]; }; - private readonly _injectedEmbeddedLanguages: { [scopeName: string]: IValidEmbeddedLanguagesMap[]; }; + private readonly _injections: { [scopeName: string]: string[] }; + private readonly _injectedEmbeddedLanguages: { [scopeName: string]: IValidEmbeddedLanguagesMap[] }; private readonly _languageToScope: Map; private readonly _grammarRegistry: Registry; diff --git a/src/vs/workbench/services/textMate/common/TMScopeRegistry.ts b/src/vs/workbench/services/textMate/common/TMScopeRegistry.ts index 67d165b8acb75..ab0be4a2f46b7 100644 --- a/src/vs/workbench/services/textMate/common/TMScopeRegistry.ts +++ b/src/vs/workbench/services/textMate/common/TMScopeRegistry.ts @@ -27,7 +27,7 @@ export interface IValidEmbeddedLanguagesMap { export class TMScopeRegistry extends Disposable { - private _scopeNameToLanguageRegistration: { [scopeName: string]: IValidGrammarDefinition; }; + private _scopeNameToLanguageRegistration: { [scopeName: string]: IValidGrammarDefinition }; constructor() { super(); diff --git a/src/vs/workbench/services/textfile/browser/textFileService.ts b/src/vs/workbench/services/textfile/browser/textFileService.ts index a995c94b0aaf2..611a15d2e3357 100644 --- a/src/vs/workbench/services/textfile/browser/textFileService.ts +++ b/src/vs/workbench/services/textfile/browser/textFileService.ts @@ -246,7 +246,7 @@ export abstract class AbstractTextFileService extends Disposable implements ITex } } - async create(operations: { resource: URI, value?: string | ITextSnapshot, options?: ICreateFileOptions }[], undoInfo?: IFileOperationUndoRedoInfo): Promise { + async create(operations: { resource: URI; value?: string | ITextSnapshot; options?: ICreateFileOptions }[], undoInfo?: IFileOperationUndoRedoInfo): Promise { const operationsWithContents: ICreateFileOperation[] = await Promise.all(operations.map(async operation => { const contents = await this.getEncodedReadable(operation.resource, operation.value); return { @@ -706,7 +706,7 @@ export class EncodingOracle extends Disposable implements IResourceEncodings { return defaultEncodingOverrides; } - async getWriteEncoding(resource: URI, options?: IWriteTextFileOptions): Promise<{ encoding: string, addBOM: boolean }> { + async getWriteEncoding(resource: URI, options?: IWriteTextFileOptions): Promise<{ encoding: string; addBOM: boolean }> { const { encoding, hasBOM } = await this.getPreferredWriteEncoding(resource, options ? options.encoding : undefined); return { encoding, addBOM: hasBOM }; diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts b/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts index 99fed7b98522b..0531f1a2c7f92 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts @@ -171,13 +171,13 @@ export class TextFileEditorModelManager extends Disposable implements ITextFileE } } - private readonly mapCorrelationIdToModelsToRestore = new Map(); + private readonly mapCorrelationIdToModelsToRestore = new Map(); private onWillRunWorkingCopyFileOperation(e: WorkingCopyFileEvent): void { // Move / Copy: remember models to restore after the operation if (e.operation === FileOperation.MOVE || e.operation === FileOperation.COPY) { - const modelsToRestore: { source: URI, target: URI, snapshot?: ITextSnapshot; languageId?: string; encoding?: string; }[] = []; + const modelsToRestore: { source: URI; target: URI; snapshot?: ITextSnapshot; languageId?: string; encoding?: string }[] = []; for (const { source, target } of e.files) { if (source) { @@ -538,7 +538,7 @@ export class TextFileEditorModelManager extends Disposable implements ITextFileE return this.saveParticipants.addSaveParticipant(participant); } - runSaveParticipants(model: ITextFileEditorModel, context: { reason: SaveReason; }, token: CancellationToken): Promise { + runSaveParticipants(model: ITextFileEditorModel, context: { reason: SaveReason }, token: CancellationToken): Promise { return this.saveParticipants.participate(model, context, token); } diff --git a/src/vs/workbench/services/textfile/common/textFileSaveParticipant.ts b/src/vs/workbench/services/textfile/common/textFileSaveParticipant.ts index c2fde636ccd8e..a1adea6a4b06c 100644 --- a/src/vs/workbench/services/textfile/common/textFileSaveParticipant.ts +++ b/src/vs/workbench/services/textfile/common/textFileSaveParticipant.ts @@ -30,7 +30,7 @@ export class TextFileSaveParticipant extends Disposable { return toDisposable(() => remove()); } - participate(model: ITextFileEditorModel, context: { reason: SaveReason; }, token: CancellationToken): Promise { + participate(model: ITextFileEditorModel, context: { reason: SaveReason }, token: CancellationToken): Promise { const cts = new CancellationTokenSource(token); return this.progressService.withProgress({ diff --git a/src/vs/workbench/services/textfile/common/textfiles.ts b/src/vs/workbench/services/textfile/common/textfiles.ts index aeaadf938714c..8521e4a5cc6ea 100644 --- a/src/vs/workbench/services/textfile/common/textfiles.ts +++ b/src/vs/workbench/services/textfile/common/textfiles.ts @@ -96,7 +96,7 @@ export interface ITextFileService extends IDisposable { * Create files. If the file exists it will be overwritten with the contents if * the options enable to overwrite. */ - create(operations: { resource: URI, value?: string | ITextSnapshot, options?: { overwrite?: boolean } }[], undoInfo?: IFileOperationUndoRedoInfo): Promise; + create(operations: { resource: URI; value?: string | ITextSnapshot; options?: { overwrite?: boolean } }[], undoInfo?: IFileOperationUndoRedoInfo): Promise; /** * Returns the readable that uses the appropriate encoding. This method should @@ -374,7 +374,7 @@ export interface ITextFileEditorModelManager { /** * Runs the registered save participants on the provided model. */ - runSaveParticipants(model: ITextFileEditorModel, context: { reason: SaveReason; }, token: CancellationToken): Promise + runSaveParticipants(model: ITextFileEditorModel, context: { reason: SaveReason }, token: CancellationToken): Promise; /** * Waits for the model to be ready to be disposed. There may be conditions diff --git a/src/vs/workbench/services/textfile/electron-sandbox/nativeTextFileService.ts b/src/vs/workbench/services/textfile/electron-sandbox/nativeTextFileService.ts index a984f2484b8ff..d4f8852280b1f 100644 --- a/src/vs/workbench/services/textfile/electron-sandbox/nativeTextFileService.ts +++ b/src/vs/workbench/services/textfile/electron-sandbox/nativeTextFileService.ts @@ -102,7 +102,7 @@ export class NativeTextFileService extends AbstractTextFileService { ensuredOptions = options; } - let ensuredLimits: { size?: number; memory?: number; }; + let ensuredLimits: { size?: number; memory?: number }; if (!ensuredOptions.limits) { ensuredLimits = Object.create(null); ensuredOptions.limits = ensuredLimits; diff --git a/src/vs/workbench/services/textfile/test/common/textFileService.io.test.ts b/src/vs/workbench/services/textfile/test/common/textFileService.io.test.ts index d16b75cb92607..584ad73937247 100644 --- a/src/vs/workbench/services/textfile/test/common/textFileService.io.test.ts +++ b/src/vs/workbench/services/textfile/test/common/textFileService.io.test.ts @@ -16,10 +16,10 @@ import { createTextBufferFactoryFromStream } from 'vs/editor/common/model/textMo export interface Params { setup(): Promise<{ - service: ITextFileService, - testDir: string - }> - teardown(): Promise + service: ITextFileService; + testDir: string; + }>; + teardown(): Promise; exists(fsPath: string): Promise; stat(fsPath: string): Promise<{ size: number }>; diff --git a/src/vs/workbench/services/themes/browser/fileIconThemeData.ts b/src/vs/workbench/services/themes/browser/fileIconThemeData.ts index de13334da7d5c..e9594023a5dad 100644 --- a/src/vs/workbench/services/themes/browser/fileIconThemeData.ts +++ b/src/vs/workbench/services/themes/browser/fileIconThemeData.ts @@ -163,7 +163,7 @@ interface FontDefinition { weight: string; style: string; size: string; - src: { path: string; format: string; }[]; + src: { path: string; format: string }[]; } interface IconsAssociation { @@ -172,11 +172,11 @@ interface IconsAssociation { folderExpanded?: string; rootFolder?: string; rootFolderExpanded?: string; - folderNames?: { [folderName: string]: string; }; - folderNamesExpanded?: { [folderName: string]: string; }; - fileExtensions?: { [extension: string]: string; }; - fileNames?: { [fileName: string]: string; }; - languageIds?: { [languageId: string]: string; }; + folderNames?: { [folderName: string]: string }; + folderNamesExpanded?: { [folderName: string]: string }; + fileExtensions?: { [extension: string]: string }; + fileNames?: { [fileName: string]: string }; + languageIds?: { [languageId: string]: string }; } interface IconThemeDocument extends IconsAssociation { @@ -224,7 +224,7 @@ export class FileIconThemeLoader { }); } - private processIconThemeDocument(id: string, iconThemeDocumentLocation: URI, iconThemeDocument: IconThemeDocument): { content: string; hasFileIcons: boolean; hasFolderIcons: boolean; hidesExplorerArrows: boolean; } { + private processIconThemeDocument(id: string, iconThemeDocumentLocation: URI, iconThemeDocument: IconThemeDocument): { content: string; hasFileIcons: boolean; hasFolderIcons: boolean; hidesExplorerArrows: boolean } { const result = { content: '', hasFileIcons: false, hasFolderIcons: false, hidesExplorerArrows: !!iconThemeDocument.hidesExplorerArrows }; diff --git a/src/vs/workbench/services/themes/browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/browser/workbenchThemeService.ts index 93ea6af4ebb31..8248efb500256 100644 --- a/src/vs/workbench/services/themes/browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/browser/workbenchThemeService.ts @@ -560,11 +560,11 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { const key = themeType + themeData.extensionId; if (!this.themeExtensionsActivated.get(key)) { type ActivatePluginClassification = { - id: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; - name: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; - isBuiltin: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; - publisherDisplayName: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - themeId: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' }; + id: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; + name: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; + isBuiltin: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; + publisherDisplayName: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + themeId: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight' }; }; type ActivatePluginEvent = { id: string; @@ -802,7 +802,7 @@ class ThemeFileWatcher { constructor(private fileService: IFileService, private environmentService: IBrowserWorkbenchEnvironmentService, private onUpdate: () => void) { } - update(theme: { location?: URI, watch?: boolean; }) { + update(theme: { location?: URI; watch?: boolean }) { if (!resources.isEqual(theme.location, this.watchedLocation)) { this.dispose(); if (theme.location && (theme.watch || this.environmentService.isExtensionDevelopment)) { diff --git a/src/vs/workbench/services/themes/common/colorExtensionPoint.ts b/src/vs/workbench/services/themes/common/colorExtensionPoint.ts index 3ad28da9268b6..430e9cd28b100 100644 --- a/src/vs/workbench/services/themes/common/colorExtensionPoint.ts +++ b/src/vs/workbench/services/themes/common/colorExtensionPoint.ts @@ -12,7 +12,7 @@ import { Registry } from 'vs/platform/registry/common/platform'; interface IColorExtensionPoint { id: string; description: string; - defaults: { light: string, dark: string, highContrast: string }; + defaults: { light: string; dark: string; highContrast: string }; } const colorRegistry: IColorRegistry = Registry.as(ColorRegistryExtensions.ColorContribution); diff --git a/src/vs/workbench/services/themes/common/colorThemeData.ts b/src/vs/workbench/services/themes/common/colorThemeData.ts index f99657d109eaa..b2b88468d5eb5 100644 --- a/src/vs/workbench/services/themes/common/colorThemeData.ts +++ b/src/vs/workbench/services/themes/common/colorThemeData.ts @@ -43,7 +43,7 @@ const tokenGroupToScopesMap = { export type TokenStyleDefinition = SemanticTokenRule | ProbeScope[] | TokenStyleValue; export type TokenStyleDefinitions = { [P in keyof TokenStyleData]?: TokenStyleDefinition | undefined }; -export type TextMateThemingRuleDefinitions = { [P in keyof TokenStyleData]?: ITextMateThemingRule | undefined; } & { scope?: ProbeScope; }; +export type TextMateThemingRuleDefinitions = { [P in keyof TokenStyleData]?: ITextMateThemingRule | undefined; } & { scope?: ProbeScope }; export class ColorThemeData implements IWorkbenchColorTheme { @@ -690,7 +690,7 @@ function toCSSSelector(extensionId: string, path: string) { return str; } -async function _loadColorTheme(extensionResourceLoaderService: IExtensionResourceLoaderService, themeLocation: URI, result: { textMateRules: ITextMateThemingRule[], colors: IColorMap, semanticTokenRules: SemanticTokenRule[], semanticHighlighting: boolean }): Promise { +async function _loadColorTheme(extensionResourceLoaderService: IExtensionResourceLoaderService, themeLocation: URI, result: { textMateRules: ITextMateThemingRule[]; colors: IColorMap; semanticTokenRules: SemanticTokenRule[]; semanticHighlighting: boolean }): Promise { if (resources.extname(themeLocation) === '.json') { const content = await extensionResourceLoaderService.readExtensionResource(themeLocation); let errors: Json.ParseError[] = []; @@ -749,7 +749,7 @@ async function _loadColorTheme(extensionResourceLoaderService: IExtensionResourc } } -function _loadSyntaxTokens(extensionResourceLoaderService: IExtensionResourceLoaderService, themeLocation: URI, result: { textMateRules: ITextMateThemingRule[], colors: IColorMap }): Promise { +function _loadSyntaxTokens(extensionResourceLoaderService: IExtensionResourceLoaderService, themeLocation: URI, result: { textMateRules: ITextMateThemingRule[]; colors: IColorMap }): Promise { return extensionResourceLoaderService.readExtensionResource(themeLocation).then(content => { try { let contentValue = parsePList(content); @@ -879,7 +879,7 @@ class TokenColorIndex { private _lastColorId: number; private _id2color: string[]; - private _color2id: { [color: string]: number; }; + private _color2id: { [color: string]: number }; constructor() { this._lastColorId = 0; diff --git a/src/vs/workbench/services/themes/common/iconExtensionPoint.ts b/src/vs/workbench/services/themes/common/iconExtensionPoint.ts index 37b3d82f17648..df0ce27dc65b3 100644 --- a/src/vs/workbench/services/themes/common/iconExtensionPoint.ts +++ b/src/vs/workbench/services/themes/common/iconExtensionPoint.ts @@ -16,7 +16,7 @@ import { isProposedApiEnabled } from 'vs/workbench/services/extensions/common/ex interface IIconExtensionPoint { id: string; description: string; - default: { fontId: string; fontCharacter: string; } | string; + default: { fontId: string; fontCharacter: string } | string; } interface IIconFontExtensionPoint { diff --git a/src/vs/workbench/services/themes/common/themeCompatibility.ts b/src/vs/workbench/services/themes/common/themeCompatibility.ts index 3166d84fe6a58..0490bf80509f1 100644 --- a/src/vs/workbench/services/themes/common/themeCompatibility.ts +++ b/src/vs/workbench/services/themes/common/themeCompatibility.ts @@ -18,7 +18,7 @@ function addSettingMapping(settingId: string, colorId: string) { colorIds.push(colorId); } -export function convertSettings(oldSettings: ITextMateThemingRule[], result: { textMateRules: ITextMateThemingRule[], colors: IColorMap }): void { +export function convertSettings(oldSettings: ITextMateThemingRule[], result: { textMateRules: ITextMateThemingRule[]; colors: IColorMap }): void { for (let rule of oldSettings) { result.textMateRules.push(rule); if (!rule.scope) { diff --git a/src/vs/workbench/services/themes/test/electron-browser/tokenStyleResolving.test.ts b/src/vs/workbench/services/themes/test/electron-browser/tokenStyleResolving.test.ts index 95d73c7942227..be43a2757718d 100644 --- a/src/vs/workbench/services/themes/test/electron-browser/tokenStyleResolving.test.ts +++ b/src/vs/workbench/services/themes/test/electron-browser/tokenStyleResolving.test.ts @@ -24,7 +24,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur const undefinedStyle = { bold: undefined, underline: undefined, italic: undefined }; const unsetStyle = { bold: false, underline: false, italic: false }; -function ts(foreground: string | undefined, styleFlags: { bold?: boolean; underline?: boolean; strikethrough?: boolean; italic?: boolean; } | undefined): TokenStyle { +function ts(foreground: string | undefined, styleFlags: { bold?: boolean; underline?: boolean; strikethrough?: boolean; italic?: boolean } | undefined): TokenStyle { const foregroundColor = isString(foreground) ? Color.fromHex(foreground) : undefined; return new TokenStyle(foregroundColor, styleFlags?.bold, styleFlags?.underline, styleFlags?.strikethrough, styleFlags?.italic); } @@ -68,7 +68,7 @@ function assertTokenStyleMetaData(colorIndex: string[], actual: ITokenStyle | un } -function assertTokenStyles(themeData: ColorThemeData, expected: { [qualifiedClassifier: string]: TokenStyle; }, language = 'typescript') { +function assertTokenStyles(themeData: ColorThemeData, expected: { [qualifiedClassifier: string]: TokenStyle }, language = 'typescript') { const colorIndex = themeData.tokenColorMap; for (let qualifiedClassifier in expected) { diff --git a/src/vs/workbench/services/timer/browser/timerService.ts b/src/vs/workbench/services/timer/browser/timerService.ts index a1c07383089a7..af521d442c408 100644 --- a/src/vs/workbench/services/timer/browser/timerService.ts +++ b/src/vs/workbench/services/timer/browser/timerService.ts @@ -383,7 +383,7 @@ export interface IStartupMetrics { readonly totalmem?: number; readonly freemem?: number; readonly meminfo?: IMemoryInfo; - readonly cpus?: { count: number; speed: number; model: string; }; + readonly cpus?: { count: number; speed: number; model: string }; readonly loadavg?: number[]; } @@ -526,12 +526,12 @@ export abstract class AbstractTimerService implements ITimerService { // event and it is "normalized" to a relative timestamp where the first mark // defines the start for (const [source, marks] of this.getPerformanceMarks()) { - type Mark = { source: string; name: string; relativeStartTime: number; startTime: number; }; + type Mark = { source: string; name: string; relativeStartTime: number; startTime: number }; type MarkClassification = { - source: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth'; }, - name: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth'; }, - relativeStartTime: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true; }, - startTime: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true; }, + source: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + name: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth' }; + relativeStartTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; + startTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true }; }; let lastMark: perf.PerformanceMark = marks[0]; diff --git a/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts b/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts index 492e7cab6133f..f96c742e659e0 100644 --- a/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts +++ b/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts @@ -129,7 +129,7 @@ export class UntitledTextEditorInput extends AbstractTextResourceEditorInput imp } override toUntyped(options?: { preserveViewState: GroupIdentifier }): IUntitledTextResourceEditorInput { - const untypedInput: IUntitledTextResourceEditorInput & { resource: URI | undefined, options: ITextEditorOptions } = { + const untypedInput: IUntitledTextResourceEditorInput & { resource: URI | undefined; options: ITextEditorOptions } = { resource: this.model.hasAssociatedFilePath ? toLocalResource(this.model.resource, this.environmentService.remoteAuthority, this.pathService.defaultUriScheme) : this.resource, forceUntitled: true, options: { diff --git a/src/vs/workbench/services/untitled/common/untitledTextEditorService.ts b/src/vs/workbench/services/untitled/common/untitledTextEditorService.ts index 4dc2bc76f0f82..3b31b992f6f87 100644 --- a/src/vs/workbench/services/untitled/common/untitledTextEditorService.ts +++ b/src/vs/workbench/services/untitled/common/untitledTextEditorService.ts @@ -56,7 +56,7 @@ export interface INewUntitledTextEditorWithAssociatedResourceOptions extends INe * Note: currently it is not possible to specify the `scheme` to use. The * untitled editor will saved to the default local or remote resource. */ - associatedResource?: { authority: string; path: string; query: string; fragment: string; } + associatedResource?: { authority: string; path: string; query: string; fragment: string }; } type IInternalUntitledTextEditorOptions = IExistingUntitledTextEditorOptions & INewUntitledTextEditorWithAssociatedResourceOptions; diff --git a/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts b/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts index f5146dd58a4c9..b8175a87ed8b0 100644 --- a/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts +++ b/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts @@ -37,12 +37,12 @@ import { UserDataSyncStoreTypeSynchronizer } from 'vs/platform/userDataSync/comm import { ICredentialsService } from 'vs/platform/credentials/common/credentials'; type UserAccountClassification = { - id: { classification: 'EndUserPseudonymizedInformation', purpose: 'BusinessInsight' }; - providerId: { classification: 'EndUserPseudonymizedInformation', purpose: 'BusinessInsight' }; + id: { classification: 'EndUserPseudonymizedInformation'; purpose: 'BusinessInsight' }; + providerId: { classification: 'EndUserPseudonymizedInformation'; purpose: 'BusinessInsight' }; }; type FirstTimeSyncClassification = { - action: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true }; + action: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true }; }; type UserAccountEvent = { @@ -52,7 +52,7 @@ type UserAccountEvent = { type FirstTimeSyncAction = 'pull' | 'push' | 'merge' | 'manual'; -type AccountQuickPickItem = { label: string, authenticationProvider: IAuthenticationProvider, account?: UserDataSyncAccount, description?: string }; +type AccountQuickPickItem = { label: string; authenticationProvider: IAuthenticationProvider; account?: UserDataSyncAccount; description?: string }; class UserDataSyncAccount implements IUserDataSyncAccount { @@ -234,7 +234,7 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat } private async updateToken(current: UserDataSyncAccount | undefined): Promise { - let value: { token: string, authenticationProviderId: string } | undefined = undefined; + let value: { token: string; authenticationProviderId: string } | undefined = undefined; if (current) { try { this.logService.trace('Settings Sync: Updating the token for the account', current.accountName); @@ -696,7 +696,7 @@ class UserDataSyncPreview extends Disposable implements IUserDataSyncPreview { private _onDidCompleteManualSync = this._register(new Emitter()); readonly onDidCompleteManualSync = this._onDidCompleteManualSync.event; - private manualSync: { preview: [SyncResource, ISyncResourcePreview][], task: IManualSyncTask, disposables: DisposableStore } | undefined; + private manualSync: { preview: [SyncResource, ISyncResourcePreview][]; task: IManualSyncTask; disposables: DisposableStore } | undefined; constructor( private readonly userDataSyncService: IUserDataSyncService diff --git a/src/vs/workbench/services/views/browser/viewDescriptorService.ts b/src/vs/workbench/services/views/browser/viewDescriptorService.ts index 677caa66ec2e9..5241c249fc68e 100644 --- a/src/vs/workbench/services/views/browser/viewDescriptorService.ts +++ b/src/vs/workbench/services/views/browser/viewDescriptorService.ts @@ -34,16 +34,16 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor private static readonly CACHED_VIEW_CONTAINER_LOCATIONS = 'views.cachedViewContainerLocations'; private static readonly COMMON_CONTAINER_ID_PREFIX = 'workbench.views.service'; - private readonly _onDidChangeContainer: Emitter<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }> = this._register(new Emitter<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }>()); - readonly onDidChangeContainer: Event<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }> = this._onDidChangeContainer.event; + private readonly _onDidChangeContainer: Emitter<{ views: IViewDescriptor[]; from: ViewContainer; to: ViewContainer }> = this._register(new Emitter<{ views: IViewDescriptor[]; from: ViewContainer; to: ViewContainer }>()); + readonly onDidChangeContainer: Event<{ views: IViewDescriptor[]; from: ViewContainer; to: ViewContainer }> = this._onDidChangeContainer.event; - private readonly _onDidChangeLocation: Emitter<{ views: IViewDescriptor[], from: ViewContainerLocation, to: ViewContainerLocation }> = this._register(new Emitter<{ views: IViewDescriptor[], from: ViewContainerLocation, to: ViewContainerLocation }>()); - readonly onDidChangeLocation: Event<{ views: IViewDescriptor[], from: ViewContainerLocation, to: ViewContainerLocation }> = this._onDidChangeLocation.event; + private readonly _onDidChangeLocation: Emitter<{ views: IViewDescriptor[]; from: ViewContainerLocation; to: ViewContainerLocation }> = this._register(new Emitter<{ views: IViewDescriptor[]; from: ViewContainerLocation; to: ViewContainerLocation }>()); + readonly onDidChangeLocation: Event<{ views: IViewDescriptor[]; from: ViewContainerLocation; to: ViewContainerLocation }> = this._onDidChangeLocation.event; - private readonly _onDidChangeContainerLocation: Emitter<{ viewContainer: ViewContainer, from: ViewContainerLocation, to: ViewContainerLocation }> = this._register(new Emitter<{ viewContainer: ViewContainer, from: ViewContainerLocation, to: ViewContainerLocation }>()); - readonly onDidChangeContainerLocation: Event<{ viewContainer: ViewContainer, from: ViewContainerLocation, to: ViewContainerLocation }> = this._onDidChangeContainerLocation.event; + private readonly _onDidChangeContainerLocation: Emitter<{ viewContainer: ViewContainer; from: ViewContainerLocation; to: ViewContainerLocation }> = this._register(new Emitter<{ viewContainer: ViewContainer; from: ViewContainerLocation; to: ViewContainerLocation }>()); + readonly onDidChangeContainerLocation: Event<{ viewContainer: ViewContainer; from: ViewContainerLocation; to: ViewContainerLocation }> = this._onDidChangeContainerLocation.event; - private readonly viewContainerModels: Map; + private readonly viewContainerModels: Map; private readonly viewsVisibilityActionDisposables: Map; private readonly activeViewContextKeys: Map>; private readonly movableViewContextKeys: Map>; @@ -88,7 +88,7 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor } } - private readonly _onDidChangeViewContainers = this._register(new Emitter<{ added: ReadonlyArray<{ container: ViewContainer, location: ViewContainerLocation }>, removed: ReadonlyArray<{ container: ViewContainer, location: ViewContainerLocation }> }>()); + private readonly _onDidChangeViewContainers = this._register(new Emitter<{ added: ReadonlyArray<{ container: ViewContainer; location: ViewContainerLocation }>; removed: ReadonlyArray<{ container: ViewContainer; location: ViewContainerLocation }> }>()); readonly onDidChangeViewContainers = this._onDidChangeViewContainers.event; get viewContainers(): ReadonlyArray { return this.viewContainersRegistry.all; } @@ -101,7 +101,7 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor ) { super(); - this.viewContainerModels = new Map(); + this.viewContainerModels = new Map(); this.viewsVisibilityActionDisposables = new Map(); this.activeViewContextKeys = new Map>(); this.movableViewContextKeys = new Map>(); @@ -144,7 +144,7 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor this._register(this.extensionService.onDidRegisterExtensions(() => this.onDidRegisterExtensions())); } - private registerGroupedViews(groupedViews: Map): void { + private registerGroupedViews(groupedViews: Map): void { // Register views that have already been registered to their correct view containers for (const containerId of groupedViews.keys()) { const viewContainer = this.viewContainersRegistry.get(containerId); @@ -170,7 +170,7 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor } } - private deregisterGroupedViews(groupedViews: Map): void { + private deregisterGroupedViews(groupedViews: Map): void { // Register views that have already been registered to their correct view containers for (const viewContainerId of groupedViews.keys()) { const viewContainer = this.viewContainersRegistry.get(viewContainerId); @@ -212,7 +212,7 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor } } - private onDidRegisterViews(views: { views: IViewDescriptor[], viewContainer: ViewContainer }[]): void { + private onDidRegisterViews(views: { views: IViewDescriptor[]; viewContainer: ViewContainer }[]): void { this.contextKeyService.bufferChangeEvents(() => { views.forEach(({ views, viewContainer }) => { // When views are registered, we need to regroup them based on the cache @@ -241,8 +241,8 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor }); } - private regroupViews(containerId: string, views: IViewDescriptor[]): Map { - const ret = new Map(); + private regroupViews(containerId: string, views: IViewDescriptor[]): Map { + const ret = new Map(); views.forEach(viewDescriptor => { const containerInfo = this.cachedViewInfo.get(viewDescriptor.id); @@ -419,11 +419,11 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor } type ViewDescriptorServiceMoveViewsClassification = { - viewCount: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - fromContainer: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - toContainer: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - fromLocation: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; - toLocation: { classification: 'SystemMetaData', purpose: 'FeatureInsight' }; + viewCount: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + fromContainer: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + toContainer: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + fromLocation: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; + toLocation: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' }; }; this.telemetryService.publicLog2('viewDescriptorService.moveViews', { viewCount, fromContainer, toContainer, fromLocation, toLocation }); @@ -731,14 +731,14 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor } } - private onDidChangeActiveViews({ added, removed }: { added: ReadonlyArray, removed: ReadonlyArray; }): void { + private onDidChangeActiveViews({ added, removed }: { added: ReadonlyArray; removed: ReadonlyArray }): void { this.contextKeyService.bufferChangeEvents(() => { added.forEach(viewDescriptor => this.getOrCreateActiveViewContextKey(viewDescriptor).set(true)); removed.forEach(viewDescriptor => this.getOrCreateActiveViewContextKey(viewDescriptor).set(false)); }); } - private onDidChangeVisibleViews({ added, removed }: { added: IViewDescriptor[], removed: IViewDescriptor[]; }): void { + private onDidChangeVisibleViews({ added, removed }: { added: IViewDescriptor[]; removed: IViewDescriptor[] }): void { this.contextKeyService.bufferChangeEvents(() => { added.forEach(viewDescriptor => this.getOrCreateVisibleViewContextKey(viewDescriptor).set(true)); removed.forEach(viewDescriptor => this.getOrCreateVisibleViewContextKey(viewDescriptor).set(false)); diff --git a/src/vs/workbench/services/views/common/viewContainerModel.ts b/src/vs/workbench/services/views/common/viewContainerModel.ts index b373ac69109ed..21fbe13df29e4 100644 --- a/src/vs/workbench/services/views/common/viewContainerModel.ts +++ b/src/vs/workbench/services/views/common/viewContainerModel.ts @@ -68,7 +68,7 @@ interface IViewDescriptorState { visibleGlobal: boolean | undefined; visibleWorkspace: boolean | undefined; collapsed: boolean | undefined; - active: boolean + active: boolean; order?: number; size?: number; } @@ -79,7 +79,7 @@ class ViewDescriptorsState extends Disposable { private readonly globalViewsStateStorageId: string; private readonly state: Map; - private _onDidChangeStoredState = this._register(new Emitter<{ id: string, visible: boolean }[]>()); + private _onDidChangeStoredState = this._register(new Emitter<{ id: string; visible: boolean }[]>()); readonly onDidChangeStoredState = this._onDidChangeStoredState.event; constructor( @@ -109,7 +109,7 @@ class ViewDescriptorsState extends Disposable { } private updateWorkspaceState(viewDescriptors: ReadonlyArray): void { - const storedViewsStates: { [id: string]: IStoredWorkspaceViewState; } = JSON.parse(this.storageService.get(this.workspaceViewsStateStorageId, StorageScope.WORKSPACE, '{}')); + const storedViewsStates: { [id: string]: IStoredWorkspaceViewState } = JSON.parse(this.storageService.get(this.workspaceViewsStateStorageId, StorageScope.WORKSPACE, '{}')); for (const viewDescriptor of viewDescriptors) { const viewState = this.state.get(viewDescriptor.id); if (viewState) { @@ -147,7 +147,7 @@ class ViewDescriptorsState extends Disposable { && this.globalViewsStatesValue !== this.getStoredGlobalViewsStatesValue() /* This checks if current window changed the value or not */) { this._globalViewsStatesValue = undefined; const storedViewsVisibilityStates = this.getStoredGlobalState(); - const changedStates: { id: string, visible: boolean }[] = []; + const changedStates: { id: string; visible: boolean }[] = []; for (const [id, storedState] of storedViewsVisibilityStates) { const state = this.state.get(id); if (state) { @@ -164,7 +164,7 @@ class ViewDescriptorsState extends Disposable { private initialize(): Map { const viewStates = new Map(); - const workspaceViewsStates = <{ [id: string]: IStoredWorkspaceViewState; }>JSON.parse(this.storageService.get(this.workspaceViewsStateStorageId, StorageScope.WORKSPACE, '{}')); + const workspaceViewsStates = <{ [id: string]: IStoredWorkspaceViewState }>JSON.parse(this.storageService.get(this.workspaceViewsStateStorageId, StorageScope.WORKSPACE, '{}')); for (const id of Object.keys(workspaceViewsStates)) { const workspaceViewState = workspaceViewsStates[id]; viewStates.set(id, { @@ -232,7 +232,7 @@ class ViewDescriptorsState extends Disposable { this.globalViewsStatesValue = JSON.stringify([...storedGlobalState.values()]); } - private parseStoredGlobalState(value: string): { state: Map, hasDuplicates: boolean } { + private parseStoredGlobalState(value: string): { state: Map; hasDuplicates: boolean } { const storedValue = >JSON.parse(value); let hasDuplicates = false; const state = storedValue.reduce((result, storedState) => { @@ -295,17 +295,17 @@ export class ViewContainerModel extends Disposable implements IViewContainerMode private _keybindingId: string | undefined; get keybindingId(): string | undefined { return this._keybindingId; } - private _onDidChangeContainerInfo = this._register(new Emitter<{ title?: boolean, icon?: boolean, keybindingId?: boolean }>()); + private _onDidChangeContainerInfo = this._register(new Emitter<{ title?: boolean; icon?: boolean; keybindingId?: boolean }>()); readonly onDidChangeContainerInfo = this._onDidChangeContainerInfo.event; // All View Descriptors get allViewDescriptors(): ReadonlyArray { return this.viewDescriptorItems.map(item => item.viewDescriptor); } - private _onDidChangeAllViewDescriptors = this._register(new Emitter<{ added: ReadonlyArray, removed: ReadonlyArray }>()); + private _onDidChangeAllViewDescriptors = this._register(new Emitter<{ added: ReadonlyArray; removed: ReadonlyArray }>()); readonly onDidChangeAllViewDescriptors = this._onDidChangeAllViewDescriptors.event; // Active View Descriptors get activeViewDescriptors(): ReadonlyArray { return this.viewDescriptorItems.filter(item => item.state.active).map(item => item.viewDescriptor); } - private _onDidChangeActiveViewDescriptors = this._register(new Emitter<{ added: ReadonlyArray, removed: ReadonlyArray }>()); + private _onDidChangeActiveViewDescriptors = this._register(new Emitter<{ added: ReadonlyArray; removed: ReadonlyArray }>()); readonly onDidChangeActiveViewDescriptors = this._onDidChangeActiveViewDescriptors.event; // Visible View Descriptors @@ -317,8 +317,8 @@ export class ViewContainerModel extends Disposable implements IViewContainerMode private _onDidRemoveVisibleViewDescriptors = this._register(new Emitter()); readonly onDidRemoveVisibleViewDescriptors: Event = this._onDidRemoveVisibleViewDescriptors.event; - private _onDidMoveVisibleViewDescriptors = this._register(new Emitter<{ from: IViewDescriptorRef; to: IViewDescriptorRef; }>()); - readonly onDidMoveVisibleViewDescriptors: Event<{ from: IViewDescriptorRef; to: IViewDescriptorRef; }> = this._onDidMoveVisibleViewDescriptors.event; + private _onDidMoveVisibleViewDescriptors = this._register(new Emitter<{ from: IViewDescriptorRef; to: IViewDescriptorRef }>()); + readonly onDidMoveVisibleViewDescriptors: Event<{ from: IViewDescriptorRef; to: IViewDescriptorRef }> = this._onDidMoveVisibleViewDescriptors.event; constructor( readonly viewContainer: ViewContainer, @@ -393,11 +393,11 @@ export class ViewContainerModel extends Disposable implements IViewContainerMode this.updateVisibility([{ id, visible, size }]); } - private updateVisibility(viewDescriptors: { id: string, visible: boolean, size?: number }[]): void { + private updateVisibility(viewDescriptors: { id: string; visible: boolean; size?: number }[]): void { const { toBeAdded, toBeRemoved } = groupBy(viewDescriptors, viewDescriptor => viewDescriptor.visible ? 'toBeAdded' : 'toBeRemoved'); - const updateVisibility = (viewDescriptors: { id: string, visible: boolean, size?: number }[]): { viewDescriptorItem: IViewDescriptorItem, visibleIndex: number }[] => { - const result: { viewDescriptorItem: IViewDescriptorItem, visibleIndex: number }[] = []; + const updateVisibility = (viewDescriptors: { id: string; visible: boolean; size?: number }[]): { viewDescriptorItem: IViewDescriptorItem; visibleIndex: number }[] => { + const result: { viewDescriptorItem: IViewDescriptorItem; visibleIndex: number }[] = []; for (const { id, visible, size } of viewDescriptors) { const foundViewDescriptor = this.findAndIgnoreIfNotFound(id); if (!foundViewDescriptor) { @@ -525,7 +525,7 @@ export class ViewContainerModel extends Disposable implements IViewContainerMode this.viewDescriptorItems.sort(this.compareViewDescriptors.bind(this)); this._onDidChangeAllViewDescriptors.fire({ added: addedItems.map(({ viewDescriptor }) => viewDescriptor), removed: [] }); - const addedActiveItems: { viewDescriptorItem: IViewDescriptorItem, visible: boolean }[] = []; + const addedActiveItems: { viewDescriptorItem: IViewDescriptorItem; visible: boolean }[] = []; for (const viewDescriptorItem of addedItems) { if (viewDescriptorItem.state.active) { addedActiveItems.push({ viewDescriptorItem, visible: this.isViewDescriptorVisible(viewDescriptorItem) }); @@ -585,7 +585,7 @@ export class ViewContainerModel extends Disposable implements IViewContainerMode } private onDidChangeContext(): void { - const addedActiveItems: { item: IViewDescriptorItem, visibleWhenActive: boolean }[] = []; + const addedActiveItems: { item: IViewDescriptorItem; visibleWhenActive: boolean }[] = []; const removedActiveItems: IViewDescriptorItem[] = []; for (const item of this.viewDescriptorItems) { @@ -654,7 +654,7 @@ export class ViewContainerModel extends Disposable implements IViewContainerMode return !!viewDescriptorItem.state.visibleGlobal; } - private find(id: string): { index: number, visibleIndex: number, viewDescriptorItem: IViewDescriptorItem; } { + private find(id: string): { index: number; visibleIndex: number; viewDescriptorItem: IViewDescriptorItem } { const result = this.findAndIgnoreIfNotFound(id); if (result) { return result; @@ -662,7 +662,7 @@ export class ViewContainerModel extends Disposable implements IViewContainerMode throw new Error(`view descriptor ${id} not found`); } - private findAndIgnoreIfNotFound(id: string): { index: number, visibleIndex: number, viewDescriptorItem: IViewDescriptorItem; } | undefined { + private findAndIgnoreIfNotFound(id: string): { index: number; visibleIndex: number; viewDescriptorItem: IViewDescriptorItem } | undefined { for (let i = 0, visibleIndex = 0; i < this.viewDescriptorItems.length; i++) { const viewDescriptorItem = this.viewDescriptorItems[i]; if (viewDescriptorItem.viewDescriptor.id === id) { diff --git a/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.ts b/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.ts index 82498f418ccc2..90623819487d8 100644 --- a/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.ts +++ b/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.ts @@ -417,7 +417,7 @@ export class FileWorkingCopyManager }> { + private async doResolveSaveTarget(source: URI, target: URI): Promise<{ targetFileExists: boolean; targetStoredFileWorkingCopy: IStoredFileWorkingCopy }> { // Prefer an existing stored file working copy if it is already resolved // for the given target resource diff --git a/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.ts b/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.ts index 2d76e0ba43468..6e3e128939e90 100644 --- a/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.ts +++ b/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.ts @@ -323,14 +323,14 @@ export class StoredFileWorkingCopyManager //#region Working Copy File Events - private readonly mapCorrelationIdToWorkingCopiesToRestore = new Map(); + private readonly mapCorrelationIdToWorkingCopiesToRestore = new Map(); private onWillRunWorkingCopyFileOperation(e: WorkingCopyFileEvent): void { // Move / Copy: remember working copies to restore after the operation if (e.operation === FileOperation.MOVE || e.operation === FileOperation.COPY) { e.waitUntil((async () => { - const workingCopiesToRestore: { source: URI, target: URI, snapshot?: VSBufferReadableStream; }[] = []; + const workingCopiesToRestore: { source: URI; target: URI; snapshot?: VSBufferReadableStream }[] = []; for (const { source, target } of e.files) { if (source) { diff --git a/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.ts b/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.ts index 0a549727b85ab..18be856eb47f9 100644 --- a/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.ts +++ b/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.ts @@ -33,7 +33,7 @@ export class StoredFileWorkingCopySaveParticipant extends Disposable { return toDisposable(() => remove()); } - participate(workingCopy: IStoredFileWorkingCopy, context: { reason: SaveReason; }, token: CancellationToken): Promise { + participate(workingCopy: IStoredFileWorkingCopy, context: { reason: SaveReason }, token: CancellationToken): Promise { const cts = new CancellationTokenSource(token); return this.progressService.withProgress({ diff --git a/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.ts b/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.ts index c101e6a6ba940..7640a1350581b 100644 --- a/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.ts +++ b/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.ts @@ -79,7 +79,7 @@ export interface INewUntitledFileWorkingCopyWithAssociatedResourceOptions extend * Note: currently it is not possible to specify the `scheme` to use. The * untitled file working copy will saved to the default local or remote resource. */ - associatedResource: { authority?: string; path?: string; query?: string; fragment?: string; } + associatedResource: { authority?: string; path?: string; query?: string; fragment?: string }; } export interface INewOrExistingUntitledFileWorkingCopyOptions extends INewUntitledFileWorkingCopyOptions { diff --git a/src/vs/workbench/services/workingCopy/common/workingCopyBackupService.ts b/src/vs/workbench/services/workingCopy/common/workingCopyBackupService.ts index 056f9354ec722..9ccbda9d093a4 100644 --- a/src/vs/workbench/services/workingCopy/common/workingCopyBackupService.ts +++ b/src/vs/workbench/services/workingCopy/common/workingCopyBackupService.ts @@ -23,7 +23,7 @@ import { IWorkingCopyBackupMeta, IWorkingCopyIdentifier, NO_TYPE_ID } from 'vs/w export class WorkingCopyBackupsModel { - private readonly cache = new ResourceMap<{ versionId?: number, meta?: IWorkingCopyBackupMeta }>(); + private readonly cache = new ResourceMap<{ versionId?: number; meta?: IWorkingCopyBackupMeta }>(); static async create(backupRoot: URI, fileService: IFileService): Promise { const model = new WorkingCopyBackupsModel(backupRoot, fileService); @@ -515,7 +515,7 @@ class WorkingCopyBackupServiceImpl extends Disposable implements IWorkingCopyBac return { value, meta }; } - private parsePreambleMeta(preambleMetaRaw: string | undefined): { typeId: string | undefined, meta: T | undefined } { + private parsePreambleMeta(preambleMetaRaw: string | undefined): { typeId: string | undefined; meta: T | undefined } { let typeId: string | undefined = undefined; let meta: T | undefined = undefined; @@ -554,7 +554,7 @@ export class InMemoryWorkingCopyBackupService implements IWorkingCopyBackupServi declare readonly _serviceBrand: undefined; - private backups = new ResourceMap<{ typeId: string, content: VSBuffer, meta?: IWorkingCopyBackupMeta }>(); + private backups = new ResourceMap<{ typeId: string; content: VSBuffer; meta?: IWorkingCopyBackupMeta }>(); constructor() { } diff --git a/src/vs/workbench/services/workingCopy/common/workingCopyFileService.ts b/src/vs/workbench/services/workingCopy/common/workingCopyFileService.ts index 0990ac6c71395..5e830f345ef0e 100644 --- a/src/vs/workbench/services/workingCopy/common/workingCopyFileService.ts +++ b/src/vs/workbench/services/workingCopy/common/workingCopyFileService.ts @@ -34,7 +34,7 @@ export interface SourceTargetPair { /** * The target resource the event is about. */ - readonly target: URI + readonly target: URI; } export interface IFileOperationUndoRedoInfo { @@ -47,7 +47,7 @@ export interface IFileOperationUndoRedoInfo { /** * Flag indicates if the operation is an undo. */ - isUndoing?: boolean + isUndoing?: boolean; } export interface WorkingCopyFileEvent extends IWaitUntil { @@ -104,7 +104,7 @@ export interface ICreateOperation { } export interface ICreateFileOperation extends ICreateOperation { - contents?: VSBuffer | VSBufferReadable | VSBufferReadableStream, + contents?: VSBuffer | VSBufferReadable | VSBufferReadableStream; } export interface IDeleteOperation { @@ -191,7 +191,7 @@ export interface IWorkingCopyFileService { /** * Runs all available save participants for stored file working copies. */ - runSaveParticipants(workingCopy: IStoredFileWorkingCopy, context: { reason: SaveReason; }, token: CancellationToken): Promise; + runSaveParticipants(workingCopy: IStoredFileWorkingCopy, context: { reason: SaveReason }, token: CancellationToken): Promise; //#endregion @@ -492,7 +492,7 @@ export class WorkingCopyFileService extends Disposable implements IWorkingCopyFi return this.saveParticipants.addSaveParticipant(participant); } - runSaveParticipants(workingCopy: IStoredFileWorkingCopy, context: { reason: SaveReason; }, token: CancellationToken): Promise { + runSaveParticipants(workingCopy: IStoredFileWorkingCopy, context: { reason: SaveReason }, token: CancellationToken): Promise { return this.saveParticipants.participate(workingCopy, context, token); } diff --git a/src/vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker.ts b/src/vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker.ts index 497f47af677fe..1e799f1a565d4 100644 --- a/src/vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker.ts +++ b/src/vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker.ts @@ -217,7 +217,7 @@ export class NativeWorkingCopyBackupTracker extends WorkingCopyBackupTracker imp this.logService.error(error ? `[backup tracker] ${msg}: ${error}` : `[backup tracker] ${msg}`); } - private async backupBeforeShutdown(dirtyWorkingCopies: readonly IWorkingCopy[]): Promise<{ backups: IWorkingCopy[], error?: Error }> { + private async backupBeforeShutdown(dirtyWorkingCopies: readonly IWorkingCopy[]): Promise<{ backups: IWorkingCopy[]; error?: Error }> { const backups: IWorkingCopy[] = []; let error: Error | undefined = undefined; diff --git a/src/vs/workbench/services/workingCopy/test/browser/workingCopyBackupTracker.test.ts b/src/vs/workbench/services/workingCopy/test/browser/workingCopyBackupTracker.test.ts index 6e50280f54bad..59c2c3e7188fb 100644 --- a/src/vs/workbench/services/workingCopy/test/browser/workingCopyBackupTracker.test.ts +++ b/src/vs/workbench/services/workingCopy/test/browser/workingCopyBackupTracker.test.ts @@ -86,7 +86,7 @@ suite('WorkingCopyBackupTracker (browser)', function () { } } - async function createTracker(): Promise<{ accessor: TestServiceAccessor, part: EditorPart, tracker: TestWorkingCopyBackupTracker, workingCopyBackupService: InMemoryTestWorkingCopyBackupService, instantiationService: IInstantiationService, cleanup: () => void }> { + async function createTracker(): Promise<{ accessor: TestServiceAccessor; part: EditorPart; tracker: TestWorkingCopyBackupTracker; workingCopyBackupService: InMemoryTestWorkingCopyBackupService; instantiationService: IInstantiationService; cleanup: () => void }> { const disposables = new DisposableStore(); const workingCopyBackupService = new InMemoryTestWorkingCopyBackupService(); diff --git a/src/vs/workbench/services/workingCopy/test/browser/workingCopyFileService.test.ts b/src/vs/workbench/services/workingCopy/test/browser/workingCopyFileService.test.ts index d929db05b6497..2ae43c821ebc4 100644 --- a/src/vs/workbench/services/workingCopy/test/browser/workingCopyFileService.test.ts +++ b/src/vs/workbench/services/workingCopy/test/browser/workingCopyFileService.test.ts @@ -322,7 +322,7 @@ suite('WorkingCopyFileService', () => { return eventCounter; } - async function testMoveOrCopy(files: { source: URI, target: URI }[], move: boolean, targetDirty?: boolean): Promise { + async function testMoveOrCopy(files: { source: URI; target: URI }[], move: boolean, targetDirty?: boolean): Promise { let eventCounter = 0; const models = await Promise.all(files.map(async ({ source, target }, i) => { diff --git a/src/vs/workbench/services/workingCopy/test/electron-browser/workingCopyBackupTracker.test.ts b/src/vs/workbench/services/workingCopy/test/electron-browser/workingCopyBackupTracker.test.ts index 44575541afe51..afec37298daa5 100644 --- a/src/vs/workbench/services/workingCopy/test/electron-browser/workingCopyBackupTracker.test.ts +++ b/src/vs/workbench/services/workingCopy/test/electron-browser/workingCopyBackupTracker.test.ts @@ -92,7 +92,7 @@ flakySuite('WorkingCopyBackupTracker (native)', function () { private readonly _onDidSuspend = this._register(new Emitter()); readonly onDidSuspend = this._onDidSuspend.event; - protected override suspendBackupOperations(): { resume: () => void; } { + protected override suspendBackupOperations(): { resume: () => void } { const { resume } = super.suspendBackupOperations(); this._onDidSuspend.fire(); @@ -142,7 +142,7 @@ flakySuite('WorkingCopyBackupTracker (native)', function () { return Promises.rm(testDir); }); - async function createTracker(autoSaveEnabled = false): Promise<{ accessor: TestServiceAccessor, part: EditorPart, tracker: TestWorkingCopyBackupTracker, instantiationService: IInstantiationService, cleanup: () => Promise }> { + async function createTracker(autoSaveEnabled = false): Promise<{ accessor: TestServiceAccessor; part: EditorPart; tracker: TestWorkingCopyBackupTracker; instantiationService: IInstantiationService; cleanup: () => Promise }> { const workingCopyBackupService = new NodeTestWorkingCopyBackupService(testDir, workspaceBackupPath); const instantiationService = workbenchInstantiationService(disposables); instantiationService.stub(IWorkingCopyBackupService, workingCopyBackupService); diff --git a/src/vs/workbench/test/browser/parts/editor/editor.test.ts b/src/vs/workbench/test/browser/parts/editor/editor.test.ts index c0d0024eaaf6c..c0c2e4f1bf429 100644 --- a/src/vs/workbench/test/browser/parts/editor/editor.test.ts +++ b/src/vs/workbench/test/browser/parts/editor/editor.test.ts @@ -204,13 +204,13 @@ suite('Workbench editor utils', () => { assert.strictEqual(EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.SECONDARY, filterByScheme: Schemas.untitled })!.toString(), untitled.resource.toString()); assert.strictEqual(EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.SECONDARY, filterByScheme: [Schemas.file, Schemas.untitled] })!.toString(), untitled.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI, secondary: URI }).primary.toString(), file.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.file }) as { primary: URI, secondary: URI }).primary.toString(), file.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI, secondary: URI }).primary.toString(), file.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI; secondary: URI }).primary.toString(), file.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.file }) as { primary: URI; secondary: URI }).primary.toString(), file.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI; secondary: URI }).primary.toString(), file.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI, secondary: URI }).secondary.toString(), untitled.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.untitled }) as { primary: URI, secondary: URI }).secondary.toString(), untitled.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI, secondary: URI }).secondary.toString(), untitled.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI; secondary: URI }).secondary.toString(), untitled.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.untitled }) as { primary: URI; secondary: URI }).secondary.toString(), untitled.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getCanonicalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI; secondary: URI }).secondary.toString(), untitled.resource.toString()); assert.ok(!EditorResourceAccessor.getOriginalUri(input)); assert.ok(!EditorResourceAccessor.getOriginalUri(input, { filterByScheme: Schemas.file })); @@ -223,13 +223,13 @@ suite('Workbench editor utils', () => { assert.strictEqual(EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.SECONDARY, filterByScheme: Schemas.untitled })!.toString(), untitled.resource.toString()); assert.strictEqual(EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.SECONDARY, filterByScheme: [Schemas.file, Schemas.untitled] })!.toString(), untitled.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI, secondary: URI }).primary.toString(), file.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.file }) as { primary: URI, secondary: URI }).primary.toString(), file.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI, secondary: URI }).primary.toString(), file.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI; secondary: URI }).primary.toString(), file.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.file }) as { primary: URI; secondary: URI }).primary.toString(), file.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI; secondary: URI }).primary.toString(), file.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI, secondary: URI }).secondary.toString(), untitled.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.untitled }) as { primary: URI, secondary: URI }).secondary.toString(), untitled.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI, secondary: URI }).secondary.toString(), untitled.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI; secondary: URI }).secondary.toString(), untitled.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.untitled }) as { primary: URI; secondary: URI }).secondary.toString(), untitled.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getOriginalUri(input, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI; secondary: URI }).secondary.toString(), untitled.resource.toString()); } const resource = URI.file('/some/path.txt'); @@ -308,13 +308,13 @@ suite('Workbench editor utils', () => { assert.strictEqual(EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.SECONDARY, filterByScheme: Schemas.untitled })!.toString(), untitled.resource?.toString()); assert.strictEqual(EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.SECONDARY, filterByScheme: [Schemas.file, Schemas.untitled] })!.toString(), untitled.resource?.toString()); - assert.strictEqual((EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI, secondary: URI }).primary.toString(), file.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.file }) as { primary: URI, secondary: URI }).primary.toString(), file.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI, secondary: URI }).primary.toString(), file.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI; secondary: URI }).primary.toString(), file.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.file }) as { primary: URI; secondary: URI }).primary.toString(), file.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI; secondary: URI }).primary.toString(), file.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI, secondary: URI }).secondary.toString(), untitled.resource?.toString()); - assert.strictEqual((EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.untitled }) as { primary: URI, secondary: URI }).secondary.toString(), untitled.resource?.toString()); - assert.strictEqual((EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI, secondary: URI }).secondary.toString(), untitled.resource?.toString()); + assert.strictEqual((EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI; secondary: URI }).secondary.toString(), untitled.resource?.toString()); + assert.strictEqual((EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.untitled }) as { primary: URI; secondary: URI }).secondary.toString(), untitled.resource?.toString()); + assert.strictEqual((EditorResourceAccessor.getCanonicalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI; secondary: URI }).secondary.toString(), untitled.resource?.toString()); assert.ok(!EditorResourceAccessor.getOriginalUri(untypedInput)); assert.ok(!EditorResourceAccessor.getOriginalUri(untypedInput, { filterByScheme: Schemas.file })); @@ -327,13 +327,13 @@ suite('Workbench editor utils', () => { assert.strictEqual(EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.SECONDARY, filterByScheme: Schemas.untitled })!.toString(), untitled.resource?.toString()); assert.strictEqual(EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.SECONDARY, filterByScheme: [Schemas.file, Schemas.untitled] })!.toString(), untitled.resource?.toString()); - assert.strictEqual((EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI, secondary: URI }).primary.toString(), file.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.file }) as { primary: URI, secondary: URI }).primary.toString(), file.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI, secondary: URI }).primary.toString(), file.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI; secondary: URI }).primary.toString(), file.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.file }) as { primary: URI; secondary: URI }).primary.toString(), file.resource.toString()); + assert.strictEqual((EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI; secondary: URI }).primary.toString(), file.resource.toString()); - assert.strictEqual((EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI, secondary: URI }).secondary.toString(), untitled.resource?.toString()); - assert.strictEqual((EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.untitled }) as { primary: URI, secondary: URI }).secondary.toString(), untitled.resource?.toString()); - assert.strictEqual((EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI, secondary: URI }).secondary.toString(), untitled.resource?.toString()); + assert.strictEqual((EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH }) as { primary: URI; secondary: URI }).secondary.toString(), untitled.resource?.toString()); + assert.strictEqual((EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: Schemas.untitled }) as { primary: URI; secondary: URI }).secondary.toString(), untitled.resource?.toString()); + assert.strictEqual((EditorResourceAccessor.getOriginalUri(untypedInput, { supportSideBySide: SideBySideEditor.BOTH, filterByScheme: [Schemas.file, Schemas.untitled] }) as { primary: URI; secondary: URI }).secondary.toString(), untitled.resource?.toString()); } }); diff --git a/src/vs/workbench/test/browser/parts/editor/editorGroupModel.test.ts b/src/vs/workbench/test/browser/parts/editor/editorGroupModel.test.ts index a1dc48560bf28..e4d1a8c16a4d5 100644 --- a/src/vs/workbench/test/browser/parts/editor/editorGroupModel.test.ts +++ b/src/vs/workbench/test/browser/parts/editor/editorGroupModel.test.ts @@ -79,9 +79,9 @@ suite('EditorGroupModel', () => { } interface GroupEvents { - locked: number[], - active: number[], - index: number[], + locked: number[]; + active: number[]; + index: number[]; opened: IEditorOpenEvent[]; activated: EditorInput[]; closed: IEditorCloseEvent[]; diff --git a/src/vs/workbench/test/browser/parts/editor/editorPane.test.ts b/src/vs/workbench/test/browser/parts/editor/editorPane.test.ts index b85b95202db20..af2853ce8b68f 100644 --- a/src/vs/workbench/test/browser/parts/editor/editorPane.test.ts +++ b/src/vs/workbench/test/browser/parts/editor/editorPane.test.ts @@ -286,7 +286,7 @@ suite('EditorPane', () => { const configurationService = new TestTextResourceConfigurationService(); const editorGroupService = new TestEditorGroupsService([testGroup0]); - interface TestViewState { line: number; } + interface TestViewState { line: number } const rawMemento = Object.create(null); const memento = new EditorMemento('id', 'key', rawMemento, 3, editorGroupService, configurationService); @@ -419,7 +419,7 @@ suite('EditorPane', () => { })); const editorGroupService = new TestEditorGroupsService([testGroup0]); - interface TestViewState { line: number; } + interface TestViewState { line: number } const rawMemento = Object.create(null); const memento = new EditorMemento('id', 'key', rawMemento, 3, editorGroupService, configurationService); diff --git a/src/vs/workbench/test/browser/parts/statusbar/statusbarModel.test.ts b/src/vs/workbench/test/browser/parts/statusbar/statusbarModel.test.ts index ff8a88edb2e21..c42d46e4d887e 100644 --- a/src/vs/workbench/test/browser/parts/statusbar/statusbarModel.test.ts +++ b/src/vs/workbench/test/browser/parts/statusbar/statusbarModel.test.ts @@ -43,7 +43,7 @@ suite('Workbench status bar model', () => { assert.ok(model.findEntry(container)); - let didChangeEntryVisibility: { id: string, visible: boolean } = { id: '', visible: false }; + let didChangeEntryVisibility: { id: string; visible: boolean } = { id: '', visible: false }; model.onDidChangeEntryVisibility(e => { didChangeEntryVisibility = e; }); diff --git a/src/vs/workbench/test/browser/workbenchTestServices.ts b/src/vs/workbench/test/browser/workbenchTestServices.ts index 8b3611d732613..fd2868f623ea0 100644 --- a/src/vs/workbench/test/browser/workbenchTestServices.ts +++ b/src/vs/workbench/test/browser/workbenchTestServices.ts @@ -200,10 +200,10 @@ export interface ITestInstantiationService extends IInstantiationService { export function workbenchInstantiationService( overrides?: { textFileService?: (instantiationService: IInstantiationService) => ITextFileService; - pathService?: (instantiationService: IInstantiationService) => IPathService, - editorService?: (instantiationService: IInstantiationService) => IEditorService, - contextKeyService?: (instantiationService: IInstantiationService) => IContextKeyService, - textEditorService?: (instantiationService: IInstantiationService) => ITextEditorService + pathService?: (instantiationService: IInstantiationService) => IPathService; + editorService?: (instantiationService: IInstantiationService) => IEditorService; + contextKeyService?: (instantiationService: IInstantiationService) => IContextKeyService; + textEditorService?: (instantiationService: IInstantiationService) => ITextEditorService; }, disposables: DisposableStore = new DisposableStore() ): ITestInstantiationService { @@ -603,8 +603,8 @@ let activeViewlet: PaneComposite = {} as any; export class TestPaneCompositeService extends Disposable implements IPaneCompositePartService { declare readonly _serviceBrand: undefined; - onDidPaneCompositeOpen: Event<{ composite: IPaneComposite; viewContainerLocation: ViewContainerLocation; }>; - onDidPaneCompositeClose: Event<{ composite: IPaneComposite; viewContainerLocation: ViewContainerLocation; }>; + onDidPaneCompositeOpen: Event<{ composite: IPaneComposite; viewContainerLocation: ViewContainerLocation }>; + onDidPaneCompositeClose: Event<{ composite: IPaneComposite; viewContainerLocation: ViewContainerLocation }>; private parts = new Map(); @@ -718,13 +718,13 @@ export class TestViewsService implements IViewsService { declare readonly _serviceBrand: undefined; - onDidChangeViewContainerVisibility = new Emitter<{ id: string; visible: boolean; location: ViewContainerLocation; }>().event; + onDidChangeViewContainerVisibility = new Emitter<{ id: string; visible: boolean; location: ViewContainerLocation }>().event; isViewContainerVisible(id: string): boolean { return true; } getVisibleViewContainer(): ViewContainer | null { return null; } openViewContainer(id: string, focus?: boolean): Promise { return Promise.resolve(null); } closeViewContainer(id: string): void { } - onDidChangeViewVisibilityEmitter = new Emitter<{ id: string; visible: boolean; }>(); + onDidChangeViewVisibilityEmitter = new Emitter<{ id: string; visible: boolean }>(); onDidChangeViewVisibility = this.onDidChangeViewVisibilityEmitter.event; isViewVisible(id: string): boolean { return true; } getActiveViewWithId(id: string): T | null { return null; } @@ -769,8 +769,8 @@ export class TestEditorGroupsService implements IEditorGroupsService { findGroup(_scope: IFindGroupScope, _source?: number | IEditorGroup, _wrap?: boolean): IEditorGroup { throw new Error('not implemented'); } activateGroup(_group: number | IEditorGroup): IEditorGroup { throw new Error('not implemented'); } restoreGroup(_group: number | IEditorGroup): IEditorGroup { throw new Error('not implemented'); } - getSize(_group: number | IEditorGroup): { width: number, height: number; } { return { width: 100, height: 100 }; } - setSize(_group: number | IEditorGroup, _size: { width: number, height: number; }): void { } + getSize(_group: number | IEditorGroup): { width: number; height: number } { return { width: 100, height: 100 }; } + setSize(_group: number | IEditorGroup, _size: { width: number; height: number }): void { } arrangeGroups(_arrangement: GroupsArrangement): void { } applyLayout(_layout: EditorGroupLayout): void { } setGroupOrientation(_orientation: GroupOrientation): void { } @@ -820,7 +820,7 @@ export class TestEditorGroupView implements IEditorGroupView { onDidCloseEditor: Event = Event.None; onDidOpenEditorFail: Event = Event.None; onDidFocus: Event = Event.None; - onDidChange: Event<{ width: number; height: number; }> = Event.None; + onDidChange: Event<{ width: number; height: number }> = Event.None; onWillMoveEditor: Event = Event.None; onWillOpenEditor: Event = Event.None; onDidActiveEditorChange: Event = Event.None; @@ -979,7 +979,7 @@ export class TestFileService implements IFileService { }); } - async resolveAll(toResolve: { resource: URI, options?: IResolveFileOptions; }[]): Promise { + async resolveAll(toResolve: { resource: URI; options?: IResolveFileOptions }[]): Promise { const stats = await Promise.all(toResolve.map(resourceAndOption => this.resolve(resourceAndOption.resource, resourceAndOption.options))); return stats.map(stat => ({ stat, success: true })); @@ -1092,7 +1092,7 @@ export class TestFileService implements IFileService { return !!(provider && (provider.capabilities & capability)); } - async del(_resource: URI, _options?: { useTrash?: boolean, recursive?: boolean; }): Promise { } + async del(_resource: URI, _options?: { useTrash?: boolean; recursive?: boolean }): Promise { } readonly watches: URI[] = []; watch(_resource: URI): IDisposable { @@ -1107,7 +1107,7 @@ export class TestFileService implements IFileService { async canCreateFile(source: URI, options?: ICreateFileOptions): Promise { return true; } async canMove(source: URI, target: URI, overwrite?: boolean | undefined): Promise { return true; } async canCopy(source: URI, target: URI, overwrite?: boolean | undefined): Promise { return true; } - async canDelete(resource: URI, options?: { useTrash?: boolean | undefined; recursive?: boolean | undefined; } | undefined): Promise { return true; } + async canDelete(resource: URI, options?: { useTrash?: boolean | undefined; recursive?: boolean | undefined } | undefined): Promise { return true; } } export class TestWorkingCopyBackupService extends InMemoryWorkingCopyBackupService { @@ -1379,7 +1379,7 @@ export class TestHostService implements IHostService { async reload(): Promise { } async close(): Promise { } - async focus(options?: { force: boolean; }): Promise { } + async focus(options?: { force: boolean }): Promise { } async openWindow(arg1?: IOpenEmptyWindowOptions | IWindowOpenable[], arg2?: IOpenWindowOptions): Promise { } @@ -1895,7 +1895,7 @@ export class TestEditorWorkerService implements IEditorWorkerService { async computeDirtyDiff(original: URI, modified: URI, ignoreTrimWhitespace: boolean): Promise { return null; } async computeMoreMinimalEdits(resource: URI, edits: TextEdit[] | null | undefined): Promise { return undefined; } canComputeWordRanges(resource: URI): boolean { return false; } - async computeWordRanges(resource: URI, range: IRange): Promise<{ [word: string]: IRange[]; } | null> { return null; } + async computeWordRanges(resource: URI, range: IRange): Promise<{ [word: string]: IRange[] } | null> { return null; } canNavigateValueSet(resource: URI): boolean { return false; } async navigateValueSet(resource: URI, range: IRange, up: boolean): Promise { return null; } } diff --git a/src/vs/workbench/test/common/workbenchTestServices.ts b/src/vs/workbench/test/common/workbenchTestServices.ts index 57e0525c824b7..ff488993da7a8 100644 --- a/src/vs/workbench/test/common/workbenchTestServices.ts +++ b/src/vs/workbench/test/common/workbenchTestServices.ts @@ -192,7 +192,7 @@ export class TestWorkingCopyFileService implements IWorkingCopyFileService { readonly hasSaveParticipants = false; addSaveParticipant(participant: IStoredFileWorkingCopySaveParticipant): IDisposable { return Disposable.None; } - async runSaveParticipants(workingCopy: IWorkingCopy, context: { reason: SaveReason; }, token: CancellationToken): Promise { } + async runSaveParticipants(workingCopy: IWorkingCopy, context: { reason: SaveReason }, token: CancellationToken): Promise { } async delete(operations: IDeleteOperation[], token: CancellationToken, undoInfo?: IFileOperationUndoRedoInfo): Promise { } diff --git a/src/vs/workbench/test/electron-browser/workbenchTestServices.ts b/src/vs/workbench/test/electron-browser/workbenchTestServices.ts index aaa328478ee7d..3c405b15a33ae 100644 --- a/src/vs/workbench/test/electron-browser/workbenchTestServices.ts +++ b/src/vs/workbench/test/electron-browser/workbenchTestServices.ts @@ -204,7 +204,7 @@ export class TestNativeHostService implements INativeHostService { async minimizeWindow(): Promise { } async setMinimumSize(width: number | undefined, height: number | undefined): Promise { } async saveWindowSplash(value: IPartsSplash): Promise { } - async focusWindow(options?: { windowId?: number | undefined; } | undefined): Promise { } + async focusWindow(options?: { windowId?: number | undefined } | undefined): Promise { } async showMessageBox(options: Electron.MessageBoxOptions): Promise { throw new Error('Method not implemented.'); } async showSaveDialog(options: Electron.SaveDialogOptions): Promise { throw new Error('Method not implemented.'); } async showOpenDialog(options: Electron.OpenDialogOptions): Promise { throw new Error('Method not implemented.'); } @@ -234,7 +234,7 @@ export class TestNativeHostService implements INativeHostService { async installShellCommand(): Promise { } async uninstallShellCommand(): Promise { } async notifyReady(): Promise { } - async relaunch(options?: { addArgs?: string[] | undefined; removeArgs?: string[] | undefined; } | undefined): Promise { } + async relaunch(options?: { addArgs?: string[] | undefined; removeArgs?: string[] | undefined } | undefined): Promise { } async reload(): Promise { } async closeWindow(): Promise { } async closeWindowById(): Promise { } diff --git a/src/vscode-dts/vscode.d.ts b/src/vscode-dts/vscode.d.ts index eaa1ce09dd70d..92161fdb9f65e 100644 --- a/src/vscode-dts/vscode.d.ts +++ b/src/vscode-dts/vscode.d.ts @@ -338,7 +338,7 @@ declare module 'vscode' { * @return A position that reflects the given delta. Will return `this` position if the change * is not changing anything. */ - translate(change: { lineDelta?: number; characterDelta?: number; }): Position; + translate(change: { lineDelta?: number; characterDelta?: number }): Position; /** * Create a new position derived from this position. @@ -356,7 +356,7 @@ declare module 'vscode' { * @return A position that reflects the given change. Will return `this` position if the change * is not changing anything. */ - with(change: { line?: number; character?: number; }): Position; + with(change: { line?: number; character?: number }): Position; } /** @@ -462,7 +462,7 @@ declare module 'vscode' { * @return A range that reflects the given change. Will return `this` range if the change * is not changing anything. */ - with(change: { start?: Position, end?: Position }): Range; + with(change: { start?: Position; end?: Position }): Range; } /** @@ -1137,7 +1137,7 @@ declare module 'vscode' { * @param options The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit. * @return A promise that resolves with a value indicating if the edits could be applied. */ - edit(callback: (editBuilder: TextEditorEdit) => void, options?: { readonly undoStopBefore: boolean; readonly undoStopAfter: boolean; }): Thenable; + edit(callback: (editBuilder: TextEditorEdit) => void, options?: { readonly undoStopBefore: boolean; readonly undoStopAfter: boolean }): Thenable; /** * Insert a {@link SnippetString snippet} and put the editor into snippet mode. "Snippet mode" @@ -1150,7 +1150,7 @@ declare module 'vscode' { * @return A promise that resolves with a value indicating if the snippet could be inserted. Note that the promise does not signal * that the snippet is completely filled-in or accepted. */ - insertSnippet(snippet: SnippetString, location?: Position | Range | readonly Position[] | readonly Range[], options?: { readonly undoStopBefore: boolean; readonly undoStopAfter: boolean; }): Thenable; + insertSnippet(snippet: SnippetString, location?: Position | Range | readonly Position[] | readonly Range[], options?: { readonly undoStopBefore: boolean; readonly undoStopAfter: boolean }): Thenable; /** * Adds a set of decorations to the text editor. If a set of decorations already exists with @@ -3409,7 +3409,7 @@ declare module 'vscode' { * be applied successfully. * @param metadata Optional metadata for the entry. */ - createFile(uri: Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean }, metadata?: WorkspaceEditEntryMetadata): void; + createFile(uri: Uri, options?: { overwrite?: boolean; ignoreIfExists?: boolean }, metadata?: WorkspaceEditEntryMetadata): void; /** * Delete a file or folder. @@ -3417,7 +3417,7 @@ declare module 'vscode' { * @param uri The uri of the file that is to be deleted. * @param metadata Optional metadata for the entry. */ - deleteFile(uri: Uri, options?: { recursive?: boolean, ignoreIfNotExists?: boolean }, metadata?: WorkspaceEditEntryMetadata): void; + deleteFile(uri: Uri, options?: { recursive?: boolean; ignoreIfNotExists?: boolean }, metadata?: WorkspaceEditEntryMetadata): void; /** * Rename a file or folder. @@ -3428,7 +3428,7 @@ declare module 'vscode' { * ignored. When overwrite and ignoreIfExists are both set overwrite wins. * @param metadata Optional metadata for the entry. */ - renameFile(oldUri: Uri, newUri: Uri, options?: { overwrite?: boolean, ignoreIfExists?: boolean }, metadata?: WorkspaceEditEntryMetadata): void; + renameFile(oldUri: Uri, newUri: Uri, options?: { overwrite?: boolean; ignoreIfExists?: boolean }, metadata?: WorkspaceEditEntryMetadata): void; /** * Get all text edits grouped by resource. @@ -3543,7 +3543,7 @@ declare module 'vscode' { * @param token A cancellation token. * @return The range or range and placeholder text of the identifier that is to be renamed. The lack of a result can signaled by returning `undefined` or `null`. */ - prepareRename?(document: TextDocument, position: Position, token: CancellationToken): ProviderResult; + prepareRename?(document: TextDocument, position: Position, token: CancellationToken): ProviderResult; } /** @@ -4209,7 +4209,7 @@ declare module 'vscode' { * {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}. * *Note 2:* A insert range must be a prefix of a replace range, that means it must be contained and starting at the same position. */ - range?: Range | { inserting: Range; replacing: Range; }; + range?: Range | { inserting: Range; replacing: Range }; /** * An optional set of characters that when pressed while this completion is active will accept it first and @@ -4564,7 +4564,7 @@ declare module 'vscode' { * @return An array of color presentations or a thenable that resolves to such. The lack of a result * can be signaled by returning `undefined`, `null`, or an empty array. */ - provideColorPresentations(color: Color, context: { readonly document: TextDocument, readonly range: Range }, token: CancellationToken): ProviderResult; + provideColorPresentations(color: Color, context: { readonly document: TextDocument; readonly range: Range }, token: CancellationToken): ProviderResult; } /** @@ -5287,8 +5287,8 @@ declare module 'vscode' { defaultValue?: T; globalValue?: T; - workspaceValue?: T, - workspaceFolderValue?: T, + workspaceValue?: T; + workspaceFolderValue?: T; defaultLanguageValue?: T; globalLanguageValue?: T; @@ -7525,7 +7525,7 @@ declare module 'vscode' { * @throws {@linkcode FileSystemError.FileExists FileExists} when `uri` already exists, `create` is set but `overwrite` is not set. * @throws {@linkcode FileSystemError.NoPermissions NoPermissions} when permissions aren't sufficient. */ - writeFile(uri: Uri, content: Uint8Array, options: { readonly create: boolean, readonly overwrite: boolean }): void | Thenable; + writeFile(uri: Uri, content: Uint8Array, options: { readonly create: boolean; readonly overwrite: boolean }): void | Thenable; /** * Delete a file. @@ -7623,7 +7623,7 @@ declare module 'vscode' { * @param uri The resource that is to be deleted. * @param options Defines if trash can should be used and if deletion of folders is recursive */ - delete(uri: Uri, options?: { recursive?: boolean, useTrash?: boolean }): Thenable; + delete(uri: Uri, options?: { recursive?: boolean; useTrash?: boolean }): Thenable; /** * Rename a file or folder. @@ -9028,7 +9028,7 @@ declare module 'vscode' { * @param token A token that can be used to signal cancellation. * @return A promise that resolves to the selected items or `undefined`. */ - export function showQuickPick(items: readonly string[] | Thenable, options: QuickPickOptions & { canPickMany: true; }, token?: CancellationToken): Thenable; + export function showQuickPick(items: readonly string[] | Thenable, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): Thenable; /** * Shows a selection list. @@ -9048,7 +9048,7 @@ declare module 'vscode' { * @param token A token that can be used to signal cancellation. * @return A promise that resolves to the selected items or `undefined`. */ - export function showQuickPick(items: readonly T[] | Thenable, options: QuickPickOptions & { canPickMany: true; }, token?: CancellationToken): Thenable; + export function showQuickPick(items: readonly T[] | Thenable, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): Thenable; /** * Shows a selection list. @@ -9140,7 +9140,7 @@ declare module 'vscode' { * * @return New webview panel. */ - export function createWebviewPanel(viewType: string, title: string, showOptions: ViewColumn | { viewColumn: ViewColumn, preserveFocus?: boolean }, options?: WebviewPanelOptions & WebviewOptions): WebviewPanel; + export function createWebviewPanel(viewType: string, title: string, showOptions: ViewColumn | { viewColumn: ViewColumn; preserveFocus?: boolean }, options?: WebviewPanelOptions & WebviewOptions): WebviewPanel; /** * Set a message to the status bar. This is a short hand for the more powerful @@ -9541,7 +9541,7 @@ declare module 'vscode' { * * **NOTE:** The {@link TreeDataProvider} that the `TreeView` {@link window.createTreeView is registered with} with must implement {@link TreeDataProvider.getParent getParent} method to access this API. */ - reveal(element: T, options?: { select?: boolean, focus?: boolean, expand?: boolean | number }): Thenable; + reveal(element: T, options?: { select?: boolean; focus?: boolean; expand?: boolean | number }): Thenable; } /** @@ -10740,7 +10740,7 @@ declare module 'vscode' { /** * The files that are going to be renamed. */ - readonly files: ReadonlyArray<{ readonly oldUri: Uri, readonly newUri: Uri }>; + readonly files: ReadonlyArray<{ readonly oldUri: Uri; readonly newUri: Uri }>; /** * Allows to pause the event and to apply a {@link WorkspaceEdit workspace edit}. @@ -10780,7 +10780,7 @@ declare module 'vscode' { /** * The files that got renamed. */ - readonly files: ReadonlyArray<{ readonly oldUri: Uri, readonly newUri: Uri }>; + readonly files: ReadonlyArray<{ readonly oldUri: Uri; readonly newUri: Uri }>; } /** @@ -10988,7 +10988,7 @@ declare module 'vscode' { * @return true if the operation was successfully started and false otherwise if arguments were used that would result * in invalid workspace folder state (e.g. 2 folders with the same URI). */ - export function updateWorkspaceFolders(start: number, deleteCount: number | undefined | null, ...workspaceFoldersToAdd: { readonly uri: Uri, readonly name?: string }[]): boolean; + export function updateWorkspaceFolders(start: number, deleteCount: number | undefined | null, ...workspaceFoldersToAdd: { readonly uri: Uri; readonly name?: string }[]): boolean; /** * Creates a file system watcher that is notified on file events (create, change, delete) @@ -11191,7 +11191,7 @@ declare module 'vscode' { * @param options Options to control how the document will be created. * @return A promise that resolves to a {@link TextDocument document}. */ - export function openTextDocument(options?: { language?: string; content?: string; }): Thenable; + export function openTextDocument(options?: { language?: string; content?: string }): Thenable; /** * Register a text document content provider. @@ -11428,7 +11428,7 @@ declare module 'vscode' { * @param options Immutable metadata about the provider. * @return A {@link Disposable} that unregisters this provider when being disposed. */ - export function registerFileSystemProvider(scheme: string, provider: FileSystemProvider, options?: { readonly isCaseSensitive?: boolean, readonly isReadonly?: boolean }): Disposable; + export function registerFileSystemProvider(scheme: string, provider: FileSystemProvider, options?: { readonly isCaseSensitive?: boolean; readonly isReadonly?: boolean }): Disposable; /** * When true, the user has explicitly trusted the contents of the workspace. @@ -11447,7 +11447,7 @@ declare module 'vscode' { * a '{@link TextDocument}' or * a '{@link WorkspaceFolder}' */ - export type ConfigurationScope = Uri | TextDocument | WorkspaceFolder | { uri?: Uri, languageId: string }; + export type ConfigurationScope = Uri | TextDocument | WorkspaceFolder | { uri?: Uri; languageId: string }; /** * An event describing the change in Configuration @@ -12171,7 +12171,7 @@ declare module 'vscode' { /** * The times at which execution started and ended, as unix timestamps */ - readonly timing?: { readonly startTime: number, readonly endTime: number }; + readonly timing?: { readonly startTime: number; readonly endTime: number }; } /** @@ -12211,7 +12211,7 @@ declare module 'vscode' { * @return A range that reflects the given change. Will return `this` range if the change * is not changing anything. */ - with(change: { start?: number, end?: number }): NotebookRange; + with(change: { start?: number; end?: number }): NotebookRange; } /** @@ -12586,7 +12586,7 @@ declare module 'vscode' { * _Note_ that controller selection is persisted (by the controllers {@link NotebookController.id id}) and restored as soon as a * controller is re-created or as a notebook is {@link workspace.onDidOpenNotebookDocument opened}. */ - readonly onDidChangeSelectedNotebooks: Event<{ notebook: NotebookDocument, selected: boolean }>; + readonly onDidChangeSelectedNotebooks: Event<{ notebook: NotebookDocument; selected: boolean }>; /** * A controller can set affinities for specific notebook documents. This allows a controller diff --git a/src/vscode-dts/vscode.proposed.externalUriOpener.d.ts b/src/vscode-dts/vscode.proposed.externalUriOpener.d.ts index 2b5432404f799..757844d2ecd30 100644 --- a/src/vscode-dts/vscode.proposed.externalUriOpener.d.ts +++ b/src/vscode-dts/vscode.proposed.externalUriOpener.d.ts @@ -116,7 +116,7 @@ declare module 'vscode' { * * Currently only `http` and `https` are supported. */ - readonly schemes: readonly string[] + readonly schemes: readonly string[]; /** * Text displayed to the user that explains what the opener does. diff --git a/src/vscode-dts/vscode.proposed.fsChunks.d.ts b/src/vscode-dts/vscode.proposed.fsChunks.d.ts index fe5829493486b..e849a17434518 100644 --- a/src/vscode-dts/vscode.proposed.fsChunks.d.ts +++ b/src/vscode-dts/vscode.proposed.fsChunks.d.ts @@ -8,7 +8,7 @@ declare module 'vscode' { // https://github.com/microsoft/vscode/issues/84515 export interface FileSystemProvider { - open?(resource: Uri, options: { create: boolean; }): number | Thenable; + open?(resource: Uri, options: { create: boolean }): number | Thenable; close?(fd: number): void | Thenable; read?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable; write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable; diff --git a/src/vscode-dts/vscode.proposed.notebookDebugOptions.d.ts b/src/vscode-dts/vscode.proposed.notebookDebugOptions.d.ts index 0080161be08e2..af78d4a8ce6cd 100644 --- a/src/vscode-dts/vscode.proposed.notebookDebugOptions.d.ts +++ b/src/vscode-dts/vscode.proposed.notebookDebugOptions.d.ts @@ -18,7 +18,7 @@ declare module 'vscode' { * When true, the debug toolbar will not be shown for this session, the window statusbar color will not be changed, and the debug viewlet will not be automatically revealed. */ simple?: boolean; - } + }; /** * When true, a save will not be triggered for open editors when starting a debug session, regardless of the value of the `debug.saveBeforeStart` setting. diff --git a/src/vscode-dts/vscode.proposed.notebookEditor.d.ts b/src/vscode-dts/vscode.proposed.notebookEditor.d.ts index 0181b8f7ef26a..74162df35c29e 100644 --- a/src/vscode-dts/vscode.proposed.notebookEditor.d.ts +++ b/src/vscode-dts/vscode.proposed.notebookEditor.d.ts @@ -121,7 +121,7 @@ declare module 'vscode' { * The {@link NotebookEditor notebook editor} for which the selections have changed. */ readonly notebookEditor: NotebookEditor; - readonly selections: ReadonlyArray + readonly selections: ReadonlyArray; } export interface NotebookEditorVisibleRangesChangeEvent { diff --git a/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts b/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts index de2966db16cfa..ed477d10b3d34 100644 --- a/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts +++ b/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts @@ -9,7 +9,7 @@ declare module 'vscode' { export interface NotebookRegistrationData { displayName: string; - filenamePattern: (GlobPattern | { include: GlobPattern; exclude: GlobPattern; })[]; + filenamePattern: (GlobPattern | { include: GlobPattern; exclude: GlobPattern })[]; exclusive?: boolean; } diff --git a/src/vscode-dts/vscode.proposed.notebookMessaging.d.ts b/src/vscode-dts/vscode.proposed.notebookMessaging.d.ts index 88660ded2e679..4c66d33b455b9 100644 --- a/src/vscode-dts/vscode.proposed.notebookMessaging.d.ts +++ b/src/vscode-dts/vscode.proposed.notebookMessaging.d.ts @@ -43,7 +43,7 @@ declare module 'vscode' { * An event that fires when a {@link NotebookController.rendererScripts renderer script} has send a message to * the controller. */ - readonly onDidReceiveMessage: Event<{ editor: NotebookEditor, message: any }>; + readonly onDidReceiveMessage: Event<{ editor: NotebookEditor; message: any }>; /** * Send a message to the renderer of notebook editors. diff --git a/src/vscode-dts/vscode.proposed.portsAttributes.d.ts b/src/vscode-dts/vscode.proposed.portsAttributes.d.ts index 1842605a5e7e9..7a563e13e04ab 100644 --- a/src/vscode-dts/vscode.proposed.portsAttributes.d.ts +++ b/src/vscode-dts/vscode.proposed.portsAttributes.d.ts @@ -57,6 +57,6 @@ declare module 'vscode' { * The `portRange` is start inclusive and end exclusive. * @param provider The PortAttributesProvider */ - export function registerPortAttributesProvider(portSelector: { pid?: number, portRange?: [number, number], commandMatcher?: RegExp }, provider: PortAttributesProvider): Disposable; + export function registerPortAttributesProvider(portSelector: { pid?: number; portRange?: [number, number]; commandMatcher?: RegExp }, provider: PortAttributesProvider): Disposable; } } diff --git a/src/vscode-dts/vscode.proposed.resolvers.d.ts b/src/vscode-dts/vscode.proposed.resolvers.d.ts index 43c87ee0cb874..f436a5625ba7c 100644 --- a/src/vscode-dts/vscode.proposed.resolvers.d.ts +++ b/src/vscode-dts/vscode.proposed.resolvers.d.ts @@ -27,7 +27,7 @@ declare module 'vscode' { } export interface ResolvedOptions { - extensionHostEnv?: { [key: string]: string | null; }; + extensionHostEnv?: { [key: string]: string | null }; isTrusted?: boolean; @@ -44,7 +44,7 @@ declare module 'vscode' { } export interface TunnelOptions { - remoteAddress: { port: number, host: string; }; + remoteAddress: { port: number; host: string }; // The desired local port. If this port can't be used, then another will be chosen. localAddressPort?: number; label?: string; @@ -57,9 +57,9 @@ declare module 'vscode' { } export interface TunnelDescription { - remoteAddress: { port: number, host: string; }; + remoteAddress: { port: number; host: string }; //The complete local address(ex. localhost:1234) - localAddress: { port: number, host: string; } | string; + localAddress: { port: number; host: string } | string; /** * @deprecated Use privacy instead */ diff --git a/src/vscode-dts/vscode.proposed.tabs.d.ts b/src/vscode-dts/vscode.proposed.tabs.d.ts index 691cfd8f07cb1..ad2e35529cc51 100644 --- a/src/vscode-dts/vscode.proposed.tabs.d.ts +++ b/src/vscode-dts/vscode.proposed.tabs.d.ts @@ -45,8 +45,8 @@ declare module 'vscode' { * always be at index 0. */ readonly additionalResourcesAndViewIds: readonly { - readonly resource: Uri | undefined, - readonly viewId: string | undefined + readonly resource: Uri | undefined; + readonly viewId: string | undefined; }[]; /** diff --git a/src/vscode-dts/vscode.proposed.testCoverage.d.ts b/src/vscode-dts/vscode.proposed.testCoverage.d.ts index 3f0ec8f1d67c1..3d7092ebb3cc1 100644 --- a/src/vscode-dts/vscode.proposed.testCoverage.d.ts +++ b/src/vscode-dts/vscode.proposed.testCoverage.d.ts @@ -12,7 +12,7 @@ declare module 'vscode' { * Test coverage provider for this result. An extension can defer setting * this until after a run is complete and coverage is available. */ - coverageProvider?: TestCoverageProvider + coverageProvider?: TestCoverageProvider; // ... } diff --git a/src/vscode-dts/vscode.proposed.textSearchProvider.d.ts b/src/vscode-dts/vscode.proposed.textSearchProvider.d.ts index a65cc59a66694..4fbd0c053ec8c 100644 --- a/src/vscode-dts/vscode.proposed.textSearchProvider.d.ts +++ b/src/vscode-dts/vscode.proposed.textSearchProvider.d.ts @@ -156,16 +156,16 @@ declare module 'vscode' { /** * Markdown text of the message. */ - text: string, + text: string; /** * Whether the source of the message is trusted, command links are disabled for untrusted message sources. * Messaged are untrusted by default. */ - trusted?: boolean, + trusted?: boolean; /** * The message type, this affects how the message will be rendered. */ - type: TextSearchCompleteMessageType, + type: TextSearchCompleteMessageType; } /** diff --git a/src/vscode-dts/vscode.proposed.timeline.d.ts b/src/vscode-dts/vscode.proposed.timeline.d.ts index 625bc8c9bedc4..08811d33aaf4a 100644 --- a/src/vscode-dts/vscode.proposed.timeline.d.ts +++ b/src/vscode-dts/vscode.proposed.timeline.d.ts @@ -28,7 +28,7 @@ declare module 'vscode' { /** * The icon path or {@link ThemeIcon} for the timeline item. */ - iconPath?: Uri | { light: Uri; dark: Uri; } | ThemeIcon; + iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon; /** * A human readable string describing less prominent details of the timeline item. @@ -114,7 +114,7 @@ declare module 'vscode' { * An optional maximum number timeline items or the all timeline items newer (inclusive) than the timestamp or id that should be returned. * If `undefined` all timeline items should be returned. */ - limit?: number | { timestamp: number; id?: string; }; + limit?: number | { timestamp: number; id?: string }; } export interface TimelineProvider { diff --git a/src/vscode-dts/vscode.proposed.treeViewReveal.d.ts b/src/vscode-dts/vscode.proposed.treeViewReveal.d.ts index e71c2f71879cd..b8731e6caa2a5 100644 --- a/src/vscode-dts/vscode.proposed.treeViewReveal.d.ts +++ b/src/vscode-dts/vscode.proposed.treeViewReveal.d.ts @@ -8,6 +8,6 @@ declare module 'vscode' { // https://github.com/microsoft/vscode/issues/61313 @alexr00 export interface TreeView extends Disposable { - reveal(element: T | undefined, options?: { select?: boolean, focus?: boolean, expand?: boolean | number; }): Thenable; + reveal(element: T | undefined, options?: { select?: boolean; focus?: boolean; expand?: boolean | number }): Thenable; } } diff --git a/test/automation/src/application.ts b/test/automation/src/application.ts index a3adfffe3830c..15b7fbd9a9241 100644 --- a/test/automation/src/application.ts +++ b/test/automation/src/application.ts @@ -71,7 +71,7 @@ export class Application { await this.code.waitForElement('.explorer-folders-view'); } - async restart(options?: { workspaceOrFolder?: string, extraArgs?: string[] }): Promise { + async restart(options?: { workspaceOrFolder?: string; extraArgs?: string[] }): Promise { await this.stop(); await this._start(options?.workspaceOrFolder, options?.extraArgs); } diff --git a/test/automation/src/code.ts b/test/automation/src/code.ts index a86a8c84e3ac1..f8b5ffa5b93f7 100644 --- a/test/automation/src/code.ts +++ b/test/automation/src/code.ts @@ -30,7 +30,7 @@ export interface LaunchOptions { } interface ICodeInstance { - kill: () => Promise + kill: () => Promise; } const instances = new Set(); diff --git a/test/automation/src/electronDriver.ts b/test/automation/src/electronDriver.ts index eddfc7965500d..ed6b77261334c 100644 --- a/test/automation/src/electronDriver.ts +++ b/test/automation/src/electronDriver.ts @@ -18,7 +18,7 @@ import type { LaunchOptions } from './code'; const repoPath = path.join(__dirname, '../../..'); -export async function launch(options: LaunchOptions): Promise<{ electronProcess: ChildProcess, client: IDisposable, driver: IDriver, kill: () => Promise }> { +export async function launch(options: LaunchOptions): Promise<{ electronProcess: ChildProcess; client: IDisposable; driver: IDriver; kill: () => Promise }> { const { codePath, workspacePath, extensionsPath, userDataDir, remote, logger, verbose, extraArgs } = options; const env = { ...process.env }; const logsPath = path.join(repoPath, '.build', 'logs', remote ? 'smoke-tests-remote' : 'smoke-tests'); diff --git a/test/automation/src/playwrightDriver.ts b/test/automation/src/playwrightDriver.ts index 53568cb9c6596..3d3cee786a55c 100644 --- a/test/automation/src/playwrightDriver.ts +++ b/test/automation/src/playwrightDriver.ts @@ -196,7 +196,7 @@ class PlaywrightDriver implements IDriver { let port = 9000; -export async function launch(options: LaunchOptions): Promise<{ serverProcess: ChildProcess, client: IDisposable, driver: IDriver, kill: () => Promise }> { +export async function launch(options: LaunchOptions): Promise<{ serverProcess: ChildProcess; client: IDisposable; driver: IDriver; kill: () => Promise }> { // Launch server const { serverProcess, endpoint } = await launchServer(options); diff --git a/test/automation/src/terminal.ts b/test/automation/src/terminal.ts index bbc7f06ac4576..22f6f0867b64b 100644 --- a/test/automation/src/terminal.ts +++ b/test/automation/src/terminal.ts @@ -54,9 +54,9 @@ export enum TerminalCommandId { CreateNew = 'workbench.action.terminal.new' } interface TerminalLabel { - name?: string, - icon?: string, - color?: string + name?: string; + icon?: string; + color?: string; } type TerminalGroup = TerminalLabel[]; diff --git a/test/integration/browser/src/index.ts b/test/integration/browser/src/index.ts index 380962cfef246..aa275da6b06bc 100644 --- a/test/integration/browser/src/index.ts +++ b/test/integration/browser/src/index.ts @@ -108,7 +108,7 @@ function consoleLogFn(msg: playwright.ConsoleMessage) { return console.log; } -async function launchServer(browserType: BrowserType): Promise<{ endpoint: url.UrlWithStringQuery, server: cp.ChildProcess }> { +async function launchServer(browserType: BrowserType): Promise<{ endpoint: url.UrlWithStringQuery; server: cp.ChildProcess }> { // Ensure a tmp user-data-dir is used for the tests const tmpDir = tmp.dirSync({ prefix: 't' }); diff --git a/test/smoke/src/main.ts b/test/smoke/src/main.ts index 263658a728372..c4ad713d0712b 100644 --- a/test/smoke/src/main.ts +++ b/test/smoke/src/main.ts @@ -50,14 +50,14 @@ const opts = minimist(args, { verbose: false } }) as { - verbose?: boolean, - remote?: boolean, - headless?: boolean, - web?: boolean, - build?: string, - 'stable-build'?: string, - browser?: string, - electronArgs?: string + verbose?: boolean; + remote?: boolean; + headless?: boolean; + web?: boolean; + build?: string; + 'stable-build'?: string; + browser?: string; + electronArgs?: string; }; const logger = createLogger(); @@ -113,7 +113,7 @@ function fail(errorMessage): void { let quality: Quality; let version: string | undefined; -function parseVersion(version: string): { major: number, minor: number, patch: number } { +function parseVersion(version: string): { major: number; minor: number; patch: number } { const [, major, minor, patch] = /^(\d+)\.(\d+)\.(\d+)/.exec(version)!; return { major: parseInt(major), minor: parseInt(minor), patch: parseInt(patch) }; }