未验证 提交 1cba9117 编写于 作者: B Benjamin Pasero 提交者: GitHub

Strict init (#80190)

* strict init

* more strict props
上级 bdb28224
...@@ -27,11 +27,11 @@ export interface IIconLabelValueOptions { ...@@ -27,11 +27,11 @@ export interface IIconLabelValueOptions {
} }
class FastLabelNode { class FastLabelNode {
private disposed: boolean; private disposed: boolean | undefined;
private _textContent: string; private _textContent: string | undefined;
private _className: string; private _className: string | undefined;
private _title: string; private _title: string | undefined;
private _empty: boolean; private _empty: boolean | undefined;
constructor(private _element: HTMLElement) { constructor(private _element: HTMLElement) {
} }
...@@ -89,7 +89,7 @@ export class IconLabel extends Disposable { ...@@ -89,7 +89,7 @@ export class IconLabel extends Disposable {
private domNode: FastLabelNode; private domNode: FastLabelNode;
private labelDescriptionContainer: FastLabelNode; private labelDescriptionContainer: FastLabelNode;
private labelNode: FastLabelNode | HighlightedLabel; private labelNode: FastLabelNode | HighlightedLabel;
private descriptionNode: FastLabelNode | HighlightedLabel; private descriptionNode: FastLabelNode | HighlightedLabel | undefined;
private descriptionNodeFactory: () => FastLabelNode | HighlightedLabel; private descriptionNodeFactory: () => FastLabelNode | HighlightedLabel;
constructor(container: HTMLElement, options?: IIconLabelCreationOptions) { constructor(container: HTMLElement, options?: IIconLabelCreationOptions) {
......
...@@ -36,8 +36,8 @@ const defaultOpts = { ...@@ -36,8 +36,8 @@ const defaultOpts = {
export class ProgressBar extends Disposable { export class ProgressBar extends Disposable {
private options: IProgressBarOptions; private options: IProgressBarOptions;
private workedVal: number; private workedVal: number;
private element: HTMLElement; private element!: HTMLElement;
private bit: HTMLElement; private bit!: HTMLElement;
private totalWork: number | undefined; private totalWork: number | undefined;
private progressBarBackground: Color | undefined; private progressBarBackground: Color | undefined;
private showDelayedScheduler: RunOnceScheduler; private showDelayedScheduler: RunOnceScheduler;
...@@ -232,4 +232,4 @@ export class ProgressBar extends Disposable { ...@@ -232,4 +232,4 @@ export class ProgressBar extends Disposable {
this.bit.style.backgroundColor = background; this.bit.style.backgroundColor = background;
} }
} }
} }
\ No newline at end of file
...@@ -42,11 +42,11 @@ export interface IConfigOptions<T> { ...@@ -42,11 +42,11 @@ export interface IConfigOptions<T> {
* - configurable defaults * - configurable defaults
*/ */
export class ConfigWatcher<T> extends Disposable implements IConfigWatcher<T> { export class ConfigWatcher<T> extends Disposable implements IConfigWatcher<T> {
private cache: T; private cache: T | undefined;
private parseErrors: json.ParseError[]; private parseErrors: json.ParseError[] | undefined;
private disposed: boolean; private disposed: boolean | undefined;
private loaded: boolean; private loaded: boolean | undefined;
private timeoutHandle: NodeJS.Timer | null; private timeoutHandle: NodeJS.Timer | null | undefined;
private readonly _onDidUpdateConfiguration: Emitter<IConfigurationChangeEvent<T>>; private readonly _onDidUpdateConfiguration: Emitter<IConfigurationChangeEvent<T>>;
constructor(private _path: string, private options: IConfigOptions<T> = { defaultConfig: Object.create(null), onError: error => console.error(error) }) { constructor(private _path: string, private options: IConfigOptions<T> = { defaultConfig: Object.create(null), onError: error => console.error(error) }) {
...@@ -62,7 +62,7 @@ export class ConfigWatcher<T> extends Disposable implements IConfigWatcher<T> { ...@@ -62,7 +62,7 @@ export class ConfigWatcher<T> extends Disposable implements IConfigWatcher<T> {
} }
get hasParseErrors(): boolean { get hasParseErrors(): boolean {
return this.parseErrors && this.parseErrors.length > 0; return !!this.parseErrors && this.parseErrors.length > 0;
} }
get onDidUpdateConfiguration(): Event<IConfigurationChangeEvent<T>> { get onDidUpdateConfiguration(): Event<IConfigurationChangeEvent<T>> {
...@@ -161,7 +161,7 @@ export class ConfigWatcher<T> extends Disposable implements IConfigWatcher<T> { ...@@ -161,7 +161,7 @@ export class ConfigWatcher<T> extends Disposable implements IConfigWatcher<T> {
if (!objects.equals(currentConfig, this.cache)) { if (!objects.equals(currentConfig, this.cache)) {
this.updateCache(currentConfig); this.updateCache(currentConfig);
this._onDidUpdateConfiguration.fire({ config: this.cache }); this._onDidUpdateConfiguration.fire({ config: currentConfig });
} }
if (callback) { if (callback) {
...@@ -173,7 +173,7 @@ export class ConfigWatcher<T> extends Disposable implements IConfigWatcher<T> { ...@@ -173,7 +173,7 @@ export class ConfigWatcher<T> extends Disposable implements IConfigWatcher<T> {
getConfig(): T { getConfig(): T {
this.ensureLoaded(); this.ensureLoaded();
return this.cache; return this.cache!;
} }
private ensureLoaded(): void { private ensureLoaded(): void {
...@@ -186,4 +186,4 @@ export class ConfigWatcher<T> extends Disposable implements IConfigWatcher<T> { ...@@ -186,4 +186,4 @@ export class ConfigWatcher<T> extends Disposable implements IConfigWatcher<T> {
this.disposed = true; this.disposed = true;
super.dispose(); super.dispose();
} }
} }
\ No newline at end of file
...@@ -420,8 +420,8 @@ export class SQLiteStorageDatabase implements IStorageDatabase { ...@@ -420,8 +420,8 @@ export class SQLiteStorageDatabase implements IStorageDatabase {
} }
class SQLiteStorageDatabaseLogger { class SQLiteStorageDatabaseLogger {
private readonly logTrace: (msg: string) => void; private readonly logTrace: ((msg: string) => void) | undefined;
private readonly logError: (error: string | Error) => void; private readonly logError: ((error: string | Error) => void) | undefined;
constructor(options?: ISQLiteStorageDatabaseLoggingOptions) { constructor(options?: ISQLiteStorageDatabaseLoggingOptions) {
if (options && typeof options.logTrace === 'function') { if (options && typeof options.logTrace === 'function') {
......
...@@ -111,7 +111,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas ...@@ -111,7 +111,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
private readonly _notificationService: INotificationService; private readonly _notificationService: INotificationService;
private _domNode!: HTMLElement; private _domNode!: HTMLElement;
private _cachedHeight: number | null; private _cachedHeight: number | null = null;
private _findInput!: FindInput; private _findInput!: FindInput;
private _replaceInput!: ReplaceInput; private _replaceInput!: ReplaceInput;
......
...@@ -441,7 +441,7 @@ export class Configuration { ...@@ -441,7 +441,7 @@ export class Configuration {
return this._defaultConfiguration; return this._defaultConfiguration;
} }
private _userConfiguration: ConfigurationModel | null; private _userConfiguration: ConfigurationModel | null = null;
get userConfiguration(): ConfigurationModel { get userConfiguration(): ConfigurationModel {
if (!this._userConfiguration) { if (!this._userConfiguration) {
this._userConfiguration = this._remoteUserConfiguration.isEmpty() ? this._localUserConfiguration : this._localUserConfiguration.merge(this._remoteUserConfiguration); this._userConfiguration = this._remoteUserConfiguration.isEmpty() ? this._localUserConfiguration : this._localUserConfiguration.merge(this._remoteUserConfiguration);
......
...@@ -24,8 +24,8 @@ export interface IContextMenuHandlerOptions { ...@@ -24,8 +24,8 @@ export interface IContextMenuHandlerOptions {
} }
export class ContextMenuHandler { export class ContextMenuHandler {
private focusToReturn: HTMLElement; private focusToReturn: HTMLElement | null = null;
private block: HTMLElement | null; private block: HTMLElement | null = null;
private options: IContextMenuHandlerOptions = { blockMouse: true }; private options: IContextMenuHandlerOptions = { blockMouse: true };
constructor( constructor(
......
...@@ -38,7 +38,7 @@ export class DiskFileSystemProvider extends Disposable implements IFileSystemPro ...@@ -38,7 +38,7 @@ export class DiskFileSystemProvider extends Disposable implements IFileSystemPro
onDidChangeCapabilities: Event<void> = Event.None; onDidChangeCapabilities: Event<void> = Event.None;
protected _capabilities: FileSystemProviderCapabilities; protected _capabilities: FileSystemProviderCapabilities | undefined;
get capabilities(): FileSystemProviderCapabilities { get capabilities(): FileSystemProviderCapabilities {
if (!this._capabilities) { if (!this._capabilities) {
this._capabilities = this._capabilities =
......
...@@ -13,7 +13,7 @@ import { ThrottledDelayer } from 'vs/base/common/async'; ...@@ -13,7 +13,7 @@ import { ThrottledDelayer } from 'vs/base/common/async';
import { join, basename } from 'vs/base/common/path'; import { join, basename } from 'vs/base/common/path';
export class FileWatcher extends Disposable { export class FileWatcher extends Disposable {
private isDisposed: boolean; private isDisposed: boolean | undefined;
private fileChangesDelayer: ThrottledDelayer<void> = this._register(new ThrottledDelayer<void>(CHANGE_BUFFER_DELAY * 2 /* sync on delay from underlying library */)); private fileChangesDelayer: ThrottledDelayer<void> = this._register(new ThrottledDelayer<void>(CHANGE_BUFFER_DELAY * 2 /* sync on delay from underlying library */));
private fileChangesBuffer: IDiskFileChange[] = []; private fileChangesBuffer: IDiskFileChange[] = [];
...@@ -125,4 +125,4 @@ export class FileWatcher extends Disposable { ...@@ -125,4 +125,4 @@ export class FileWatcher extends Disposable {
super.dispose(); super.dispose();
} }
} }
\ No newline at end of file
...@@ -36,8 +36,8 @@ export class NsfwWatcherService implements IWatcherService { ...@@ -36,8 +36,8 @@ export class NsfwWatcherService implements IWatcherService {
private static readonly FS_EVENT_DELAY = 50; // aggregate and only emit events when changes have stopped for this duration (in ms) private static readonly FS_EVENT_DELAY = 50; // aggregate and only emit events when changes have stopped for this duration (in ms)
private _pathWatchers: { [watchPath: string]: IPathWatcher } = {}; private _pathWatchers: { [watchPath: string]: IPathWatcher } = {};
private _verboseLogging: boolean; private _verboseLogging: boolean | undefined;
private enospcErrorLogged: boolean; private enospcErrorLogged: boolean | undefined;
private _onWatchEvent = new Emitter<IDiskFileChange[]>(); private _onWatchEvent = new Emitter<IDiskFileChange[]>();
readonly onWatchEvent = this._onWatchEvent.event; readonly onWatchEvent = this._onWatchEvent.event;
......
...@@ -12,9 +12,10 @@ import { IWatcherRequest } from 'vs/platform/files/node/watcher/nsfw/watcher'; ...@@ -12,9 +12,10 @@ import { IWatcherRequest } from 'vs/platform/files/node/watcher/nsfw/watcher';
import { getPathFromAmdModule } from 'vs/base/common/amd'; import { getPathFromAmdModule } from 'vs/base/common/amd';
export class FileWatcher extends Disposable { export class FileWatcher extends Disposable {
private static readonly MAX_RESTARTS = 5; private static readonly MAX_RESTARTS = 5;
private service: WatcherChannelClient; private service: WatcherChannelClient | undefined;
private isDisposed: boolean; private isDisposed: boolean;
private restartCounter: number; private restartCounter: number;
...@@ -77,7 +78,7 @@ export class FileWatcher extends Disposable { ...@@ -77,7 +78,7 @@ export class FileWatcher extends Disposable {
setVerboseLogging(verboseLogging: boolean): void { setVerboseLogging(verboseLogging: boolean): void {
this.verboseLogging = verboseLogging; this.verboseLogging = verboseLogging;
if (!this.isDisposed) { if (!this.isDisposed && this.service) {
this.service.setVerboseLogging(verboseLogging); this.service.setVerboseLogging(verboseLogging);
} }
} }
...@@ -89,7 +90,9 @@ export class FileWatcher extends Disposable { ...@@ -89,7 +90,9 @@ export class FileWatcher extends Disposable {
setFolders(folders: IWatcherRequest[]): void { setFolders(folders: IWatcherRequest[]): void {
this.folders = folders; this.folders = folders;
this.service.setRoots(folders); if (this.service) {
this.service.setRoots(folders);
}
} }
dispose(): void { dispose(): void {
......
...@@ -37,11 +37,11 @@ export class ChokidarWatcherService implements IWatcherService { ...@@ -37,11 +37,11 @@ export class ChokidarWatcherService implements IWatcherService {
private _pollingInterval?: number; private _pollingInterval?: number;
private _usePolling?: boolean; private _usePolling?: boolean;
private _verboseLogging: boolean; private _verboseLogging: boolean | undefined;
private spamCheckStartTime: number; private spamCheckStartTime: number | undefined;
private spamWarningLogged: boolean; private spamWarningLogged: boolean | undefined;
private enospcErrorLogged: boolean; private enospcErrorLogged: boolean | undefined;
private _onWatchEvent = new Emitter<IDiskFileChange[]>(); private _onWatchEvent = new Emitter<IDiskFileChange[]>();
readonly onWatchEvent = this._onWatchEvent.event; readonly onWatchEvent = this._onWatchEvent.event;
...@@ -231,7 +231,7 @@ export class ChokidarWatcherService implements IWatcherService { ...@@ -231,7 +231,7 @@ export class ChokidarWatcherService implements IWatcherService {
if (undeliveredFileEvents.length === 0) { if (undeliveredFileEvents.length === 0) {
this.spamWarningLogged = false; this.spamWarningLogged = false;
this.spamCheckStartTime = now; this.spamCheckStartTime = now;
} else if (!this.spamWarningLogged && this.spamCheckStartTime + ChokidarWatcherService.EVENT_SPAM_WARNING_THRESHOLD < now) { } else if (!this.spamWarningLogged && typeof this.spamCheckStartTime === 'number' && this.spamCheckStartTime + ChokidarWatcherService.EVENT_SPAM_WARNING_THRESHOLD < now) {
this.spamWarningLogged = true; this.spamWarningLogged = true;
this.warn(`Watcher is busy catching up with ${undeliveredFileEvents.length} file changes in 60 seconds. Latest changed path is "${event.path}"`); this.warn(`Watcher is busy catching up with ${undeliveredFileEvents.length} file changes in 60 seconds. Latest changed path is "${event.path}"`);
} }
......
...@@ -16,7 +16,7 @@ export class FileWatcher extends Disposable { ...@@ -16,7 +16,7 @@ export class FileWatcher extends Disposable {
private isDisposed: boolean; private isDisposed: boolean;
private restartCounter: number; private restartCounter: number;
private service: WatcherChannelClient; private service: WatcherChannelClient | undefined;
constructor( constructor(
private folders: IWatcherRequest[], private folders: IWatcherRequest[],
...@@ -81,13 +81,18 @@ export class FileWatcher extends Disposable { ...@@ -81,13 +81,18 @@ export class FileWatcher extends Disposable {
setVerboseLogging(verboseLogging: boolean): void { setVerboseLogging(verboseLogging: boolean): void {
this.verboseLogging = verboseLogging; this.verboseLogging = verboseLogging;
this.service.setVerboseLogging(verboseLogging);
if (this.service) {
this.service.setVerboseLogging(verboseLogging);
}
} }
setFolders(folders: IWatcherRequest[]): void { setFolders(folders: IWatcherRequest[]): void {
this.folders = folders; this.folders = folders;
this.service.setRoots(folders); if (this.service) {
this.service.setRoots(folders);
}
} }
dispose(): void { dispose(): void {
......
...@@ -139,10 +139,10 @@ export class LifecycleService extends Disposable implements ILifecycleService { ...@@ -139,10 +139,10 @@ export class LifecycleService extends Disposable implements ILifecycleService {
private oneTimeListenerTokenGenerator = 0; private oneTimeListenerTokenGenerator = 0;
private windowCounter = 0; private windowCounter = 0;
private pendingQuitPromise: Promise<boolean> | null; private pendingQuitPromise: Promise<boolean> | null = null;
private pendingQuitPromiseResolve: { (veto: boolean): void } | null; private pendingQuitPromiseResolve: { (veto: boolean): void } | null = null;
private pendingWillShutdownPromise: Promise<void> | null; private pendingWillShutdownPromise: Promise<void> | null = null;
private _quitRequested = false; private _quitRequested = false;
get quitRequested(): boolean { return this._quitRequested; } get quitRequested(): boolean { return this._quitRequested; }
......
...@@ -152,7 +152,7 @@ export class GlobalStorageDatabaseChannelClient extends Disposable implements IS ...@@ -152,7 +152,7 @@ export class GlobalStorageDatabaseChannelClient extends Disposable implements IS
private readonly _onDidChangeItemsExternal: Emitter<IStorageItemsChangeEvent> = this._register(new Emitter<IStorageItemsChangeEvent>()); private readonly _onDidChangeItemsExternal: Emitter<IStorageItemsChangeEvent> = this._register(new Emitter<IStorageItemsChangeEvent>());
readonly onDidChangeItemsExternal: Event<IStorageItemsChangeEvent> = this._onDidChangeItemsExternal.event; readonly onDidChangeItemsExternal: Event<IStorageItemsChangeEvent> = this._onDidChangeItemsExternal.event;
private onDidChangeItemsOnMainListener: IDisposable; private onDidChangeItemsOnMainListener: IDisposable | undefined;
constructor(private channel: IChannel) { constructor(private channel: IChannel) {
super(); super();
......
...@@ -99,7 +99,7 @@ export class StorageMainService extends Disposable implements IStorageMainServic ...@@ -99,7 +99,7 @@ export class StorageMainService extends Disposable implements IStorageMainServic
private storage: IStorage; private storage: IStorage;
private initializePromise: Promise<void>; private initializePromise: Promise<void> | undefined;
constructor( constructor(
@ILogService private readonly logService: ILogService, @ILogService private readonly logService: ILogService,
......
...@@ -21,7 +21,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb ...@@ -21,7 +21,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
private readonly _proxy: ExtHostDebugServiceShape; private readonly _proxy: ExtHostDebugServiceShape;
private readonly _toDispose = new DisposableStore(); private readonly _toDispose = new DisposableStore();
private _breakpointEventsActive: boolean; private _breakpointEventsActive: boolean | undefined;
private readonly _debugAdapters: Map<number, ExtensionHostDebugAdapter>; private readonly _debugAdapters: Map<number, ExtensionHostDebugAdapter>;
private _debugAdaptersHandleCounter = 1; private _debugAdaptersHandleCounter = 1;
private readonly _debugConfigurationProviders: Map<number, IDebugConfigurationProvider>; private readonly _debugConfigurationProviders: Map<number, IDebugConfigurationProvider>;
......
...@@ -33,8 +33,8 @@ export abstract class Part extends Component implements ISerializableView { ...@@ -33,8 +33,8 @@ export abstract class Part extends Component implements ISerializableView {
get dimension(): Dimension { return this._dimension; } get dimension(): Dimension { return this._dimension; }
private parent: HTMLElement; private parent: HTMLElement;
private titleArea: HTMLElement | null; private titleArea: HTMLElement | null = null;
private contentArea: HTMLElement | null; private contentArea: HTMLElement | null = null;
private partLayout: PartLayout; private partLayout: PartLayout;
constructor( constructor(
......
...@@ -41,8 +41,8 @@ export abstract class BaseEditor extends Panel implements IEditor { ...@@ -41,8 +41,8 @@ export abstract class BaseEditor extends Panel implements IEditor {
readonly onDidSizeConstraintsChange: Event<{ width: number; height: number; } | undefined> = Event.None; readonly onDidSizeConstraintsChange: Event<{ width: number; height: number; } | undefined> = Event.None;
protected _input: EditorInput | null; protected _input: EditorInput | null = null;
protected _options: EditorOptions | null; protected _options: EditorOptions | null = null;
private _group?: IEditorGroup; private _group?: IEditorGroup;
...@@ -172,7 +172,7 @@ interface MapGroupToMemento<T> { ...@@ -172,7 +172,7 @@ interface MapGroupToMemento<T> {
} }
export class EditorMemento<T> implements IEditorMemento<T> { export class EditorMemento<T> implements IEditorMemento<T> {
private cache: LRUCache<string, MapGroupToMemento<T>>; private cache: LRUCache<string, MapGroupToMemento<T>> | undefined;
private cleanedUp = false; private cleanedUp = false;
constructor( constructor(
......
...@@ -229,7 +229,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(ChangeEOLAction, Chang ...@@ -229,7 +229,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(ChangeEOLAction, Chang
registry.registerWorkbenchAction(new SyncActionDescriptor(ChangeEncodingAction, ChangeEncodingAction.ID, ChangeEncodingAction.LABEL), 'Change File Encoding'); registry.registerWorkbenchAction(new SyncActionDescriptor(ChangeEncodingAction, ChangeEncodingAction.ID, ChangeEncodingAction.LABEL), 'Change File Encoding');
export class QuickOpenActionContributor extends ActionBarContributor { export class QuickOpenActionContributor extends ActionBarContributor {
private openToSideActionInstance: OpenToSideFromQuickOpenAction; private openToSideActionInstance: OpenToSideFromQuickOpenAction | undefined;
constructor(@IInstantiationService private readonly instantiationService: IInstantiationService) { constructor(@IInstantiationService private readonly instantiationService: IInstantiationService) {
super(); super();
......
...@@ -263,7 +263,10 @@ function registerDiffEditorCommands(): void { ...@@ -263,7 +263,10 @@ function registerDiffEditorCommands(): void {
const candidates = [editorService.activeControl, ...editorService.visibleControls].filter(e => e instanceof TextDiffEditor); const candidates = [editorService.activeControl, ...editorService.visibleControls].filter(e => e instanceof TextDiffEditor);
if (candidates.length > 0) { if (candidates.length > 0) {
next ? (<TextDiffEditor>candidates[0]).getDiffNavigator().next() : (<TextDiffEditor>candidates[0]).getDiffNavigator().previous(); const navigator = (<TextDiffEditor>candidates[0]).getDiffNavigator();
if (navigator) {
next ? navigator.next() : navigator.previous();
}
} }
} }
......
...@@ -35,11 +35,11 @@ export class EditorControl extends Disposable { ...@@ -35,11 +35,11 @@ export class EditorControl extends Disposable {
private _onDidSizeConstraintsChange = this._register(new Emitter<{ width: number; height: number; } | undefined>()); private _onDidSizeConstraintsChange = this._register(new Emitter<{ width: number; height: number; } | undefined>());
get onDidSizeConstraintsChange(): Event<{ width: number; height: number; } | undefined> { return this._onDidSizeConstraintsChange.event; } get onDidSizeConstraintsChange(): Event<{ width: number; height: number; } | undefined> { return this._onDidSizeConstraintsChange.event; }
private _activeControl: BaseEditor | null; private _activeControl: BaseEditor | null = null;
private controls: BaseEditor[] = []; private controls: BaseEditor[] = [];
private readonly activeControlDisposables = this._register(new DisposableStore()); private readonly activeControlDisposables = this._register(new DisposableStore());
private dimension: Dimension; private dimension: Dimension | undefined;
private editorOperation: LongRunningOperation; private editorOperation: LongRunningOperation;
constructor( constructor(
......
...@@ -25,11 +25,11 @@ class DropOverlay extends Themable { ...@@ -25,11 +25,11 @@ class DropOverlay extends Themable {
private static OVERLAY_ID = 'monaco-workbench-editor-drop-overlay'; private static OVERLAY_ID = 'monaco-workbench-editor-drop-overlay';
private container: HTMLElement; private container!: HTMLElement;
private overlay: HTMLElement; private overlay!: HTMLElement;
private currentDropOperation?: IDropOperation; private currentDropOperation: IDropOperation | undefined;
private _disposed: boolean; private _disposed: boolean | undefined;
private cleanupOverlayScheduler: RunOnceScheduler; private cleanupOverlayScheduler: RunOnceScheduler;
...@@ -50,7 +50,7 @@ class DropOverlay extends Themable { ...@@ -50,7 +50,7 @@ class DropOverlay extends Themable {
} }
get disposed(): boolean { get disposed(): boolean {
return this._disposed; return !!this._disposed;
} }
private create(): void { private create(): void {
......
...@@ -40,7 +40,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditor { ...@@ -40,7 +40,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditor {
static readonly ID = TEXT_DIFF_EDITOR_ID; static readonly ID = TEXT_DIFF_EDITOR_ID;
private diffNavigator: DiffNavigator; private diffNavigator: DiffNavigator | undefined;
private readonly diffNavigatorDisposables = this._register(new DisposableStore()); private readonly diffNavigatorDisposables = this._register(new DisposableStore());
constructor( constructor(
...@@ -257,7 +257,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditor { ...@@ -257,7 +257,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditor {
super.clearInput(); super.clearInput();
} }
getDiffNavigator(): DiffNavigator { getDiffNavigator(): DiffNavigator | undefined {
return this.diffNavigator; return this.diffNavigator;
} }
......
...@@ -57,7 +57,7 @@ export abstract class TitleControl extends Themable { ...@@ -57,7 +57,7 @@ export abstract class TitleControl extends Themable {
private currentPrimaryEditorActionIds: string[] = []; private currentPrimaryEditorActionIds: string[] = [];
private currentSecondaryEditorActionIds: string[] = []; private currentSecondaryEditorActionIds: string[] = [];
protected editorActionsToolbar: ToolBar; private editorActionsToolbar: ToolBar;
private resourceContext: ResourceContextKey; private resourceContext: ResourceContextKey;
private editorPinnedContext: IContextKey<boolean>; private editorPinnedContext: IContextKey<boolean>;
......
...@@ -39,7 +39,7 @@ export abstract class ViewContainerViewlet extends PanelViewlet implements IView ...@@ -39,7 +39,7 @@ export abstract class ViewContainerViewlet extends PanelViewlet implements IView
private readonly viewletState: MementoObject; private readonly viewletState: MementoObject;
private didLayout = false; private didLayout = false;
private dimension: DOM.Dimension; private dimension: DOM.Dimension | undefined;
private areExtensionsReady: boolean = false; private areExtensionsReady: boolean = false;
private readonly visibleViewsCountFromCache: number | undefined; private readonly visibleViewsCountFromCache: number | undefined;
......
...@@ -41,7 +41,7 @@ export class SimpleUpdateService implements IUpdateService { ...@@ -41,7 +41,7 @@ export class SimpleUpdateService implements IUpdateService {
_serviceBrand: undefined; _serviceBrand: undefined;
onStateChange = Event.None; onStateChange = Event.None;
state: State; state!: State;
checkForUpdates(context: any): Promise<void> { checkForUpdates(context: any): Promise<void> {
return Promise.resolve(undefined); return Promise.resolve(undefined);
......
...@@ -16,7 +16,7 @@ export class DiffEditorInput extends SideBySideEditorInput { ...@@ -16,7 +16,7 @@ export class DiffEditorInput extends SideBySideEditorInput {
static readonly ID = 'workbench.editors.diffEditorInput'; static readonly ID = 'workbench.editors.diffEditorInput';
private cachedModel: DiffEditorModel | null; private cachedModel: DiffEditorModel | null = null;
constructor(name: string, description: string | undefined, original: EditorInput, modified: EditorInput, private readonly forceOpenAsBinary?: boolean) { constructor(name: string, description: string | undefined, original: EditorInput, modified: EditorInput, private readonly forceOpenAsBinary?: boolean) {
super(name, description, original, modified); super(name, description, original, modified);
...@@ -86,4 +86,4 @@ export class DiffEditorInput extends SideBySideEditorInput { ...@@ -86,4 +86,4 @@ export class DiffEditorInput extends SideBySideEditorInput {
super.dispose(); super.dispose();
} }
} }
\ No newline at end of file
...@@ -94,8 +94,8 @@ export class EditorGroup extends Disposable { ...@@ -94,8 +94,8 @@ export class EditorGroup extends Disposable {
private mru: EditorInput[] = []; private mru: EditorInput[] = [];
private mapResourceToEditorCount: ResourceMap<number> = new ResourceMap<number>(); private mapResourceToEditorCount: ResourceMap<number> = new ResourceMap<number>();
private preview: EditorInput | null; // editor in preview state private preview: EditorInput | null = null; // editor in preview state
private active: EditorInput | null; // editor in active state private active: EditorInput | null = null; // editor in active state
private editorOpenPositioning: 'left' | 'right' | 'first' | 'last'; private editorOpenPositioning: 'left' | 'right' | 'first' | 'last';
private focusRecentEditorAfterClose: boolean; private focusRecentEditorAfterClose: boolean;
......
...@@ -17,8 +17,8 @@ export class ResourceEditorInput extends EditorInput implements IModeSupport { ...@@ -17,8 +17,8 @@ export class ResourceEditorInput extends EditorInput implements IModeSupport {
static readonly ID: string = 'workbench.editors.resourceEditorInput'; static readonly ID: string = 'workbench.editors.resourceEditorInput';
private cachedModel: ResourceEditorModel | null; private cachedModel: ResourceEditorModel | null = null;
private modelReference: Promise<IReference<ITextEditorModel>> | null; private modelReference: Promise<IReference<ITextEditorModel>> | null = null;
constructor( constructor(
private name: string, private name: string,
......
...@@ -17,7 +17,7 @@ export class TextDiffEditorModel extends DiffEditorModel { ...@@ -17,7 +17,7 @@ export class TextDiffEditorModel extends DiffEditorModel {
protected readonly _originalModel: BaseTextEditorModel; protected readonly _originalModel: BaseTextEditorModel;
protected readonly _modifiedModel: BaseTextEditorModel; protected readonly _modifiedModel: BaseTextEditorModel;
private _textDiffEditorModel: IDiffEditorModel | null; private _textDiffEditorModel: IDiffEditorModel | null = null;
constructor(originalModel: BaseTextEditorModel, modifiedModel: BaseTextEditorModel) { constructor(originalModel: BaseTextEditorModel, modifiedModel: BaseTextEditorModel) {
super(originalModel, modifiedModel); super(originalModel, modifiedModel);
......
...@@ -23,8 +23,8 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport ...@@ -23,8 +23,8 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport
static readonly ID: string = 'workbench.editors.untitledEditorInput'; static readonly ID: string = 'workbench.editors.untitledEditorInput';
private cachedModel: UntitledEditorModel | null; private cachedModel: UntitledEditorModel | null = null;
private modelResolve: Promise<UntitledEditorModel & IResolvedTextEditorModel> | null; private modelResolve: Promise<UntitledEditorModel & IResolvedTextEditorModel> | null = null;
private readonly _onDidModelChangeContent: Emitter<void> = this._register(new Emitter<void>()); private readonly _onDidModelChangeContent: Emitter<void> = this._register(new Emitter<void>());
readonly onDidModelChangeContent: Event<void> = this._onDidModelChangeContent.event; readonly onDidModelChangeContent: Event<void> = this._onDidModelChangeContent.event;
......
...@@ -33,7 +33,7 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { ...@@ -33,7 +33,7 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput {
private forceOpenAs: ForceOpenAs = ForceOpenAs.None; private forceOpenAs: ForceOpenAs = ForceOpenAs.None;
private textModelReference: Promise<IReference<ITextEditorModel>> | null; private textModelReference: Promise<IReference<ITextEditorModel>> | null = null;
private name: string; private name: string;
/** /**
......
...@@ -58,7 +58,7 @@ export class Marker { ...@@ -58,7 +58,7 @@ export class Marker {
get resource(): URI { return this.marker.resource; } get resource(): URI { return this.marker.resource; }
get range(): IRange { return this.marker; } get range(): IRange { return this.marker; }
private _lines: string[]; private _lines: string[] | undefined;
get lines(): string[] { get lines(): string[] {
if (!this._lines) { if (!this._lines) {
this._lines = this.marker.message.split(/\r\n|\r|\n/g); this._lines = this.marker.message.split(/\r\n|\r|\n/g);
......
...@@ -26,7 +26,7 @@ import { FOLDER_SETTINGS_PATH, IPreferencesService, USE_SPLIT_JSON_SETTING } fro ...@@ -26,7 +26,7 @@ import { FOLDER_SETTINGS_PATH, IPreferencesService, USE_SPLIT_JSON_SETTING } fro
const schemaRegistry = Registry.as<JSONContributionRegistry.IJSONContributionRegistry>(JSONContributionRegistry.Extensions.JSONContribution); const schemaRegistry = Registry.as<JSONContributionRegistry.IJSONContributionRegistry>(JSONContributionRegistry.Extensions.JSONContribution);
export class PreferencesContribution implements IWorkbenchContribution { export class PreferencesContribution implements IWorkbenchContribution {
private editorOpeningListener: IDisposable; private editorOpeningListener: IDisposable | undefined;
private settingsListener: IDisposable; private settingsListener: IDisposable;
constructor( constructor(
......
...@@ -217,8 +217,8 @@ class CommandPaletteEditorAction extends EditorAction { ...@@ -217,8 +217,8 @@ class CommandPaletteEditorAction extends EditorAction {
} }
abstract class BaseCommandEntry extends QuickOpenEntryGroup { abstract class BaseCommandEntry extends QuickOpenEntryGroup {
private description: string; private description: string | undefined;
private alias: string; private alias: string | undefined;
private labelLowercase: string; private labelLowercase: string;
private readonly keybindingAriaLabel?: string; private readonly keybindingAriaLabel?: string;
...@@ -258,7 +258,7 @@ abstract class BaseCommandEntry extends QuickOpenEntryGroup { ...@@ -258,7 +258,7 @@ abstract class BaseCommandEntry extends QuickOpenEntryGroup {
return this.labelLowercase; return this.labelLowercase;
} }
getDescription(): string { getDescription(): string | undefined {
return this.description; return this.description;
} }
...@@ -270,7 +270,7 @@ abstract class BaseCommandEntry extends QuickOpenEntryGroup { ...@@ -270,7 +270,7 @@ abstract class BaseCommandEntry extends QuickOpenEntryGroup {
return this.keybinding; return this.keybinding;
} }
getDetail(): string { getDetail(): string | undefined {
return this.alias; return this.alias;
} }
...@@ -381,13 +381,13 @@ export class CommandsHandler extends QuickOpenHandler implements IDisposable { ...@@ -381,13 +381,13 @@ export class CommandsHandler extends QuickOpenHandler implements IDisposable {
static readonly ID = 'workbench.picker.commands'; static readonly ID = 'workbench.picker.commands';
private commandHistoryEnabled: boolean; private commandHistoryEnabled: boolean | undefined;
private readonly commandsHistory: CommandsHistory; private readonly commandsHistory: CommandsHistory;
private readonly disposables = new DisposableStore(); private readonly disposables = new DisposableStore();
private readonly disposeOnClose = new DisposableStore(); private readonly disposeOnClose = new DisposableStore();
private waitedForExtensionsRegistered: boolean; private waitedForExtensionsRegistered: boolean | undefined;
constructor( constructor(
@IEditorService private readonly editorService: IEditorService, @IEditorService private readonly editorService: IEditorService,
......
...@@ -29,15 +29,15 @@ interface IConfiguration extends IWindowsConfiguration { ...@@ -29,15 +29,15 @@ interface IConfiguration extends IWindowsConfiguration {
export class SettingsChangeRelauncher extends Disposable implements IWorkbenchContribution { export class SettingsChangeRelauncher extends Disposable implements IWorkbenchContribution {
private titleBarStyle: 'native' | 'custom'; private titleBarStyle: 'native' | 'custom' | undefined;
private nativeTabs: boolean; private nativeTabs: boolean | undefined;
private nativeFullScreen: boolean; private nativeFullScreen: boolean | undefined;
private clickThroughInactive: boolean; private clickThroughInactive: boolean | undefined;
private updateMode: string; private updateMode: string | undefined;
private enableCrashReporter: boolean; private enableCrashReporter: boolean | undefined;
private treeHorizontalScrolling: boolean; private treeHorizontalScrolling: boolean | undefined;
private useGridLayout: boolean; private useGridLayout: boolean | undefined;
private debugConsoleWordWrap: boolean; private debugConsoleWordWrap: boolean | undefined;
constructor( constructor(
@IWindowsService private readonly windowsService: IWindowsService, @IWindowsService private readonly windowsService: IWindowsService,
......
...@@ -114,7 +114,7 @@ export interface IOpenFileOptions { ...@@ -114,7 +114,7 @@ export interface IOpenFileOptions {
export class OpenFileHandler extends QuickOpenHandler { export class OpenFileHandler extends QuickOpenHandler {
private options: IOpenFileOptions | undefined; private options: IOpenFileOptions | undefined;
private queryBuilder: QueryBuilder; private queryBuilder: QueryBuilder;
private cacheState: CacheState; private cacheState: CacheState | undefined;
constructor( constructor(
@IInstantiationService private readonly instantiationService: IInstantiationService, @IInstantiationService private readonly instantiationService: IInstantiationService,
...@@ -143,7 +143,7 @@ export class OpenFileHandler extends QuickOpenHandler { ...@@ -143,7 +143,7 @@ export class OpenFileHandler extends QuickOpenHandler {
} }
// Do find results // Do find results
return this.doFindResults(query, token, this.cacheState.cacheKey, maxSortedResults); return this.doFindResults(query, token, this.cacheState ? this.cacheState.cacheKey : undefined, maxSortedResults);
} }
private async doFindResults(query: IPreparedQuery, token: CancellationToken, cacheKey?: string, maxSortedResults?: number): Promise<FileQuickOpenModel> { private async doFindResults(query: IPreparedQuery, token: CancellationToken, cacheKey?: string, maxSortedResults?: number): Promise<FileQuickOpenModel> {
...@@ -246,7 +246,7 @@ export class OpenFileHandler extends QuickOpenHandler { ...@@ -246,7 +246,7 @@ export class OpenFileHandler extends QuickOpenHandler {
} }
get isCacheLoaded(): boolean { get isCacheLoaded(): boolean {
return this.cacheState && this.cacheState.isLoaded; return !!this.cacheState && this.cacheState.isLoaded;
} }
getGroupLabel(): string { getGroupLabel(): string {
...@@ -279,14 +279,14 @@ export class CacheState { ...@@ -279,14 +279,14 @@ export class CacheState {
private loadingPhase = LoadingPhase.Created; private loadingPhase = LoadingPhase.Created;
private promise: Promise<void> | undefined; private promise: Promise<void> | undefined;
constructor(cacheQuery: (cacheKey: string) => IFileQuery, private doLoad: (query: IFileQuery) => Promise<any>, private doDispose: (cacheKey: string) => Promise<void>, private previous: CacheState | null) { constructor(cacheQuery: (cacheKey: string) => IFileQuery, private doLoad: (query: IFileQuery) => Promise<any>, private doDispose: (cacheKey: string) => Promise<void>, private previous: CacheState | undefined) {
this.query = cacheQuery(this._cacheKey); this.query = cacheQuery(this._cacheKey);
if (this.previous) { if (this.previous) {
const current = objects.assign({}, this.query, { cacheKey: null }); const current = objects.assign({}, this.query, { cacheKey: null });
const previous = objects.assign({}, this.previous.query, { cacheKey: null }); const previous = objects.assign({}, this.previous.query, { cacheKey: null });
if (!objects.equals(current, previous)) { if (!objects.equals(current, previous)) {
this.previous.dispose(); this.previous.dispose();
this.previous = null; this.previous = undefined;
} }
} }
} }
...@@ -315,7 +315,7 @@ export class CacheState { ...@@ -315,7 +315,7 @@ export class CacheState {
this.loadingPhase = LoadingPhase.Loaded; this.loadingPhase = LoadingPhase.Loaded;
if (this.previous) { if (this.previous) {
this.previous.dispose(); this.previous.dispose();
this.previous = null; this.previous = undefined;
} }
}, err => { }, err => {
this.loadingPhase = LoadingPhase.Errored; this.loadingPhase = LoadingPhase.Errored;
...@@ -337,7 +337,7 @@ export class CacheState { ...@@ -337,7 +337,7 @@ export class CacheState {
} }
if (this.previous) { if (this.previous) {
this.previous.dispose(); this.previous.dispose();
this.previous = null; this.previous = undefined;
} }
} }
} }
...@@ -91,7 +91,7 @@ const PyModulesToLookFor = [ ...@@ -91,7 +91,7 @@ const PyModulesToLookFor = [
export class WorkspaceStatsService implements IWorkspaceStatsService { export class WorkspaceStatsService implements IWorkspaceStatsService {
_serviceBrand: undefined; _serviceBrand: undefined;
private _tags: Tags; private _tags: Tags | undefined;
constructor( constructor(
@IFileService private readonly fileService: IFileService, @IFileService private readonly fileService: IFileService,
......
...@@ -22,8 +22,7 @@ import { CancellationToken } from 'vs/base/common/cancellation'; ...@@ -22,8 +22,7 @@ import { CancellationToken } from 'vs/base/common/cancellation';
export class TelemetryOptOut implements IWorkbenchContribution { export class TelemetryOptOut implements IWorkbenchContribution {
private static TELEMETRY_OPT_OUT_SHOWN = 'workbench.telemetryOptOutShown'; private static TELEMETRY_OPT_OUT_SHOWN = 'workbench.telemetryOptOutShown';
private privacyUrl: string; private privacyUrl: string | undefined;
private optOutUrl: string;
constructor( constructor(
@IStorageService storageService: IStorageService, @IStorageService storageService: IStorageService,
...@@ -50,7 +49,6 @@ export class TelemetryOptOut implements IWorkbenchContribution { ...@@ -50,7 +49,6 @@ export class TelemetryOptOut implements IWorkbenchContribution {
} }
storageService.store(TelemetryOptOut.TELEMETRY_OPT_OUT_SHOWN, true, StorageScope.GLOBAL); storageService.store(TelemetryOptOut.TELEMETRY_OPT_OUT_SHOWN, true, StorageScope.GLOBAL);
this.optOutUrl = product.telemetryOptOutUrl;
this.privacyUrl = product.privacyStatementUrl || product.telemetryOptOutUrl; this.privacyUrl = product.privacyStatementUrl || product.telemetryOptOutUrl;
if (experimentState && experimentState.state === ExperimentState.Run && telemetryService.isOptedIn) { if (experimentState && experimentState.state === ExperimentState.Run && telemetryService.isOptedIn) {
...@@ -58,15 +56,15 @@ export class TelemetryOptOut implements IWorkbenchContribution { ...@@ -58,15 +56,15 @@ export class TelemetryOptOut implements IWorkbenchContribution {
return; return;
} }
const optOutNotice = localize('telemetryOptOut.optOutNotice', "Help improve VS Code by allowing Microsoft to collect usage data. Read our [privacy statement]({0}) and learn how to [opt out]({1}).", this.privacyUrl, this.optOutUrl); const optOutNotice = localize('telemetryOptOut.optOutNotice', "Help improve VS Code by allowing Microsoft to collect usage data. Read our [privacy statement]({0}) and learn how to [opt out]({1}).", this.privacyUrl, product.telemetryOptOutUrl);
const optInNotice = localize('telemetryOptOut.optInNotice', "Help improve VS Code by allowing Microsoft to collect usage data. Read our [privacy statement]({0}) and learn how to [opt in]({1}).", this.privacyUrl, this.optOutUrl); const optInNotice = localize('telemetryOptOut.optInNotice', "Help improve VS Code by allowing Microsoft to collect usage data. Read our [privacy statement]({0}) and learn how to [opt in]({1}).", this.privacyUrl, product.telemetryOptOutUrl);
notificationService.prompt( notificationService.prompt(
Severity.Info, Severity.Info,
telemetryService.isOptedIn ? optOutNotice : optInNotice, telemetryService.isOptedIn ? optOutNotice : optInNotice,
[{ [{
label: localize('telemetryOptOut.readMore', "Read More"), label: localize('telemetryOptOut.readMore', "Read More"),
run: () => openerService.open(URI.parse(this.optOutUrl)) run: () => openerService.open(URI.parse(product.telemetryOptOutUrl))
}], }],
{ sticky: true } { sticky: true }
); );
......
...@@ -70,12 +70,12 @@ const TextInputActions: IAction[] = [ ...@@ -70,12 +70,12 @@ const TextInputActions: IAction[] = [
export class ElectronWindow extends Disposable { export class ElectronWindow extends Disposable {
private touchBarMenu?: IMenu; private touchBarMenu: IMenu | undefined;
private touchBarUpdater: RunOnceScheduler; private touchBarUpdater: RunOnceScheduler | undefined;
private readonly touchBarDisposables = this._register(new DisposableStore()); private readonly touchBarDisposables = this._register(new DisposableStore());
private lastInstalledTouchedBar: ICommandAction[][]; private lastInstalledTouchedBar: ICommandAction[][] | undefined;
private previousConfiguredZoomLevel: number; private previousConfiguredZoomLevel: number | undefined;
private addFoldersScheduler: RunOnceScheduler; private addFoldersScheduler: RunOnceScheduler;
private pendingFoldersToAdd: URI[]; private pendingFoldersToAdd: URI[];
...@@ -406,7 +406,7 @@ export class ElectronWindow extends Disposable { ...@@ -406,7 +406,7 @@ export class ElectronWindow extends Disposable {
if (!this.touchBarMenu) { if (!this.touchBarMenu) {
this.touchBarMenu = this.editorService.invokeWithinEditorContext(accessor => this.menuService.createMenu(MenuId.TouchBarContext, accessor.get(IContextKeyService))); this.touchBarMenu = this.editorService.invokeWithinEditorContext(accessor => this.menuService.createMenu(MenuId.TouchBarContext, accessor.get(IContextKeyService)));
this.touchBarDisposables.add(this.touchBarMenu); this.touchBarDisposables.add(this.touchBarMenu);
this.touchBarDisposables.add(this.touchBarMenu.onDidChange(() => this.touchBarUpdater.schedule())); this.touchBarDisposables.add(this.touchBarMenu.onDidChange(() => this.touchBarUpdater!.schedule()));
} }
const actions: Array<MenuItemAction | Separator> = []; const actions: Array<MenuItemAction | Separator> = [];
......
...@@ -113,7 +113,7 @@ export class BackupFileService implements IBackupFileService { ...@@ -113,7 +113,7 @@ export class BackupFileService implements IBackupFileService {
@IWorkbenchEnvironmentService private environmentService: IWorkbenchEnvironmentService, @IWorkbenchEnvironmentService private environmentService: IWorkbenchEnvironmentService,
@IFileService protected fileService: IFileService @IFileService protected fileService: IFileService
) { ) {
this.initialize(); this.impl = this.initialize();
} }
protected hashPath(resource: URI): string { protected hashPath(resource: URI): string {
...@@ -122,13 +122,13 @@ export class BackupFileService implements IBackupFileService { ...@@ -122,13 +122,13 @@ export class BackupFileService implements IBackupFileService {
return hash(str).toString(16); return hash(str).toString(16);
} }
private initialize(): void { private initialize(): IBackupFileService {
const backupWorkspaceResource = this.environmentService.configuration.backupWorkspaceResource; const backupWorkspaceResource = this.environmentService.configuration.backupWorkspaceResource;
if (backupWorkspaceResource) { if (backupWorkspaceResource) {
this.impl = new BackupFileServiceImpl(backupWorkspaceResource, this.hashPath, this.fileService); return new BackupFileServiceImpl(backupWorkspaceResource, this.hashPath, this.fileService);
} else {
this.impl = new InMemoryBackupFileService(this.hashPath);
} }
return new InMemoryBackupFileService(this.hashPath);
} }
reinitialize(): void { reinitialize(): void {
......
...@@ -60,7 +60,7 @@ class LocalStorageCredentialsProvider implements ICredentialsProvider { ...@@ -60,7 +60,7 @@ class LocalStorageCredentialsProvider implements ICredentialsProvider {
static readonly CREDENTIALS_OPENED_KEY = 'credentials.provider'; static readonly CREDENTIALS_OPENED_KEY = 'credentials.provider';
private _credentials: ICredential[]; private _credentials: ICredential[] | undefined;
private get credentials(): ICredential[] { private get credentials(): ICredential[] {
if (!this._credentials) { if (!this._credentials) {
try { try {
......
...@@ -60,7 +60,7 @@ export class KeybindingsEditorInput extends EditorInput { ...@@ -60,7 +60,7 @@ export class KeybindingsEditorInput extends EditorInput {
static readonly ID: string = 'workbench.input.keybindings'; static readonly ID: string = 'workbench.input.keybindings';
readonly keybindingsModel: KeybindingsEditorModel; readonly keybindingsModel: KeybindingsEditorModel;
searchOptions: IKeybindingsEditorSearchOptions | null; searchOptions: IKeybindingsEditorSearchOptions | null = null;
constructor(@IInstantiationService instantiationService: IInstantiationService) { constructor(@IInstantiationService instantiationService: IInstantiationService) {
super(); super();
......
...@@ -106,6 +106,7 @@ export class TestContextService implements IWorkspaceContextService { ...@@ -106,6 +106,7 @@ export class TestContextService implements IWorkspaceContextService {
constructor(workspace: any = TestWorkspace, options: any = null) { constructor(workspace: any = TestWorkspace, options: any = null) {
this.workspace = workspace; this.workspace = workspace;
this.options = options || Object.create(null); this.options = options || Object.create(null);
this._onDidChangeWorkspaceName = new Emitter<void>();
this._onDidChangeWorkspaceFolders = new Emitter<IWorkspaceFoldersChangeEvent>(); this._onDidChangeWorkspaceFolders = new Emitter<IWorkspaceFoldersChangeEvent>();
this._onDidChangeWorkbenchState = new Emitter<WorkbenchState>(); this._onDidChangeWorkbenchState = new Emitter<WorkbenchState>();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册