From c2d3b574026ef8a7d716ef27939ccd0dd371c8bd Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 7 Nov 2019 20:19:15 -0800 Subject: [PATCH] Fix compile error --- src/vs/editor/common/config/editorOptions.ts | 3 ++- src/vs/workbench/contrib/files/browser/files.contribution.ts | 4 ++-- .../contrib/remote/electron-browser/remote.contribution.ts | 3 ++- .../services/preferences/common/preferencesModels.ts | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 1920af832ea..b20246a3734 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -12,6 +12,7 @@ import { USUAL_WORD_SEPARATORS } from 'vs/editor/common/model/wordHelper'; import { AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility'; import { IConfigurationPropertySchema } from 'vs/platform/configuration/common/configurationRegistry'; import { IDimension } from 'vs/editor/common/editorCommon'; +import { IJSONSchema } from 'vs/base/common/jsonSchema'; //#region typed options @@ -1323,7 +1324,7 @@ class EditorGoToLocation extends BaseEditorOption(WorkbenchExtensions.Workbench).regi // Configuration const configurationRegistry = Registry.as(ConfigurationExtensions.Configuration); -const hotExitConfiguration = platform.isNative ? +const hotExitConfiguration: IConfigurationPropertySchema = platform.isNative ? { 'type': 'string', 'scope': ConfigurationScope.APPLICATION, diff --git a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts index f8e1f3d3a13..39f1667ca88 100644 --- a/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts +++ b/src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts @@ -38,6 +38,7 @@ import { IHostService } from 'vs/workbench/services/host/browser/host'; import { RemoteConnectionState, Deprecated_RemoteAuthorityContext, RemoteFileDialogContext } from 'vs/workbench/browser/contextkeys'; import { IDownloadService } from 'vs/platform/download/common/download'; import { OpenLocalFileFolderCommand, OpenLocalFileCommand, OpenLocalFolderCommand, SaveLocalFileCommand } from 'vs/workbench/services/dialogs/browser/simpleFileDialog'; +import { IJSONSchema } from 'vs/base/common/jsonSchema'; const WINDOW_ACTIONS_COMMAND_ID = 'workbench.action.remote.showMenu'; const CLOSE_REMOTE_COMMAND_ID = 'workbench.action.remote.close'; @@ -365,7 +366,7 @@ workbenchContributionsRegistry.registerWorkbenchContribution(RemoteWindowActiveI workbenchContributionsRegistry.registerWorkbenchContribution(RemoteTelemetryEnablementUpdater, LifecyclePhase.Ready); workbenchContributionsRegistry.registerWorkbenchContribution(RemoteEmptyWorkbenchPresentation, LifecyclePhase.Starting); -const extensionKindSchema = { +const extensionKindSchema: IJSONSchema = { type: 'string', enum: [ 'ui', diff --git a/src/vs/workbench/services/preferences/common/preferencesModels.ts b/src/vs/workbench/services/preferences/common/preferencesModels.ts index 59dcd697acf..1406adf1750 100644 --- a/src/vs/workbench/services/preferences/common/preferencesModels.ts +++ b/src/vs/workbench/services/preferences/common/preferencesModels.ts @@ -1117,7 +1117,7 @@ export function createValidator(prop: IConfigurationPropertySchema): (value: any patternRegex = new RegExp(prop.pattern); } - const type = Array.isArray(prop.type) ? prop.type : [prop.type]; + const type: (string | undefined)[] = Array.isArray(prop.type) ? prop.type : [prop.type]; const canBeType = (t: string) => type.indexOf(t) > -1; const isNullable = canBeType('null'); -- GitLab