diff --git a/src/vs/workbench/api/common/extHostQuickOpen.ts b/src/vs/workbench/api/common/extHostQuickOpen.ts index c8587620994a7bee97166ea485c1451fa2c0f95f..65f94310001952c094b23ec8fc3685703c7d7cd0 100644 --- a/src/vs/workbench/api/common/extHostQuickOpen.ts +++ b/src/vs/workbench/api/common/extHostQuickOpen.ts @@ -234,16 +234,16 @@ class ExtHostQuickInput implements QuickInput { private static _nextId = 1; _id = ExtHostQuickPick._nextId++; - private _title: string; - private _steps: number; - private _totalSteps: number; + private _title: string | undefined; + private _steps: number | undefined; + private _totalSteps: number | undefined; private _visible = false; private _expectingHide = false; private _enabled = true; private _busy = false; private _ignoreFocusOut = true; private _value = ''; - private _placeholder: string; + private _placeholder: string | undefined; private _buttons: QuickInputButton[] = []; private _handlesToButtons = new Map(); private readonly _onDidAcceptEmitter = new Emitter(); @@ -268,7 +268,7 @@ class ExtHostQuickInput implements QuickInput { return this._title; } - set title(title: string) { + set title(title: string | undefined) { this._title = title; this.update({ title }); } @@ -277,7 +277,7 @@ class ExtHostQuickInput implements QuickInput { return this._steps; } - set step(step: number) { + set step(step: number | undefined) { this._steps = step; this.update({ step }); } @@ -286,7 +286,7 @@ class ExtHostQuickInput implements QuickInput { return this._totalSteps; } - set totalSteps(totalSteps: number) { + set totalSteps(totalSteps: number | undefined) { this._totalSteps = totalSteps; this.update({ totalSteps }); } @@ -331,7 +331,7 @@ class ExtHostQuickInput implements QuickInput { return this._placeholder; } - set placeholder(placeholder: string) { + set placeholder(placeholder: string | undefined) { this._placeholder = placeholder; this.update({ placeholder }); } @@ -398,7 +398,7 @@ class ExtHostQuickInput implements QuickInput { } } - public dispose(): void { + dispose(): void { if (this._disposed) { return; } @@ -587,9 +587,9 @@ class ExtHostQuickPick extends ExtHostQuickInput implem class ExtHostInputBox extends ExtHostQuickInput implements InputBox { - private _password: boolean; - private _prompt: string; - private _validationMessage: string; + private _password = false; + private _prompt: string | undefined; + private _validationMessage: string | undefined; constructor(proxy: MainThreadQuickOpenShape, extensionId: ExtensionIdentifier, onDispose: () => void) { super(proxy, extensionId, onDispose); @@ -609,7 +609,7 @@ class ExtHostInputBox extends ExtHostQuickInput implements InputBox { return this._prompt; } - set prompt(prompt: string) { + set prompt(prompt: string | undefined) { this._prompt = prompt; this.update({ prompt }); } @@ -618,7 +618,7 @@ class ExtHostInputBox extends ExtHostQuickInput implements InputBox { return this._validationMessage; } - set validationMessage(validationMessage: string) { + set validationMessage(validationMessage: string | undefined) { this._validationMessage = validationMessage; this.update({ validationMessage }); } diff --git a/src/vs/workbench/services/configuration/browser/configurationService.ts b/src/vs/workbench/services/configuration/browser/configurationService.ts index 5df245052bf5d919efb1ce0aceb84679cad6476f..168076becf7952eb2fa1bfcb85de148e6cddc6e2 100644 --- a/src/vs/workbench/services/configuration/browser/configurationService.ts +++ b/src/vs/workbench/services/configuration/browser/configurationService.ts @@ -59,10 +59,10 @@ export class WorkspaceService extends Disposable implements IConfigurationServic protected readonly _onDidChangeWorkbenchState: Emitter = this._register(new Emitter()); public readonly onDidChangeWorkbenchState: Event = this._onDidChangeWorkbenchState.event; - private configurationEditingService: ConfigurationEditingService; - private jsonEditingService: JSONEditingService; - - private cyclicDependencyReady: Function; + // TODO@sandeep debt with cyclic dependencies + private configurationEditingService!: ConfigurationEditingService; + private jsonEditingService!: JSONEditingService; + private cyclicDependencyReady!: Function; private cyclicDependency = new Promise(resolve => this.cyclicDependencyReady = resolve); constructor( diff --git a/src/vs/workbench/services/preferences/common/preferencesModels.ts b/src/vs/workbench/services/preferences/common/preferencesModels.ts index 61be470078619f1f0aeacd068e046c6cf1a7e602..59dcd697acf21e219d2ae001d4d93ce2cd5f6527 100644 --- a/src/vs/workbench/services/preferences/common/preferencesModels.ts +++ b/src/vs/workbench/services/preferences/common/preferencesModels.ts @@ -429,7 +429,7 @@ function parse(model: ITextModel, isSettingsProperty: (currentProperty: string, export class WorkspaceConfigurationEditorModel extends SettingsEditorModel { - private _configurationGroups: ISettingsGroup[]; + private _configurationGroups: ISettingsGroup[] = []; get configurationGroups(): ISettingsGroup[] { return this._configurationGroups; @@ -448,9 +448,9 @@ export class WorkspaceConfigurationEditorModel extends SettingsEditorModel { export class DefaultSettings extends Disposable { - private _allSettingsGroups: ISettingsGroup[]; - private _content: string; - private _settingsByName: Map; + private _allSettingsGroups: ISettingsGroup[] | undefined; + private _content: string | undefined; + private _settingsByName = new Map(); readonly _onDidChange: Emitter = this._register(new Emitter()); readonly onDidChange: Event = this._onDidChange.event; @@ -467,7 +467,7 @@ export class DefaultSettings extends Disposable { this.initialize(); } - return this._content; + return this._content!; } getSettingsGroups(forceUpdate = false): ISettingsGroup[] { @@ -475,7 +475,7 @@ export class DefaultSettings extends Disposable { this.initialize(); } - return this._allSettingsGroups; + return this._allSettingsGroups!; } private initialize(): void {