提交 a20de9e7 编写于 作者: B Benjamin Pasero

debt - more strictPropertyInitialization (#78168)

上级 5a1242ab
......@@ -88,6 +88,7 @@ export class ExplorerItem {
private _mtime?: number,
) {
this._isDirectoryResolved = false;
this._isDisposed = false;
}
get isDisposed(): boolean {
......
......@@ -131,9 +131,6 @@ export class SettingsEditor2 extends BaseEditor {
private scheduledRefreshes: Map<string, DOM.IFocusTracker>;
private lastFocusedSettingElement: string | null = null;
private actionBar: ActionBar;
private actionsContainer: HTMLElement;
/** Don't spam warnings */
private hasWarnedMissingSettings = false;
......@@ -441,14 +438,14 @@ export class SettingsEditor2 extends BaseEditor {
this.settingsTargetsWidget.settingsTarget = ConfigurationTarget.USER_LOCAL;
this.settingsTargetsWidget.onDidTargetChange(target => this.onDidSettingsTargetChange(target));
this.actionsContainer = DOM.append(searchContainer, DOM.$('.settings-clear-widget'));
const actionsContainer = DOM.append(searchContainer, DOM.$('.settings-clear-widget'));
this.actionBar = this._register(new ActionBar(this.actionsContainer, {
const actionBar = this._register(new ActionBar(actionsContainer, {
animated: false,
actionViewItemProvider: (action: Action) => { return undefined; }
}));
this.actionBar.push([clearInputAction], { label: false, icon: true });
actionBar.push([clearInputAction], { label: false, icon: true });
}
private onDidSettingsTargetChange(target: SettingsTarget): void {
......
......@@ -50,8 +50,8 @@ export abstract class BaseWebview<T extends HTMLElement> extends Disposable {
private _element: T | undefined;
protected get element(): T | undefined { return this._element; }
private _focused: boolean;
protected get focused(): boolean { return this._focused; }
private _focused: boolean | undefined;
protected get focused(): boolean { return !!this._focused; }
private readonly _ready: Promise<void>;
......
......@@ -58,11 +58,11 @@ export class WalkThroughPart extends BaseEditor {
private readonly disposables = new DisposableStore();
private contentDisposables: IDisposable[] = [];
private content: HTMLDivElement;
private scrollbar: DomScrollableElement;
private content!: HTMLDivElement;
private scrollbar!: DomScrollableElement;
private editorFocus: IContextKey<boolean>;
private lastFocus: HTMLElement;
private size: Dimension;
private lastFocus: HTMLElement | undefined;
private size: Dimension | undefined;
private editorMemento: IEditorMemento<IWalkThroughEditorViewState>;
constructor(
......
......@@ -33,7 +33,7 @@ export class WorkspaceService extends Disposable implements IConfigurationServic
public _serviceBrand: undefined;
private workspace: Workspace;
private workspace!: Workspace;
private completeWorkspaceBarrier: Barrier;
private readonly configurationCache: IConfigurationCache;
private _configuration: Configuration;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册