Skip to content

Commit 8b14c93

Browse files
committed
strictPropertyInitialization
microsoft#78168
1 parent 1fa8c2f commit 8b14c93

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/vs/base/browser/ui/selectBox/selectBoxNative.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class SelectBoxNative extends Disposable implements ISelectBoxDelegate {
1616
private selectElement: HTMLSelectElement;
1717
private selectBoxOptions: ISelectBoxOptions;
1818
private options: ISelectOptionItem[];
19-
private selected: number;
19+
private selected = 0;
2020
private readonly _onDidSelect: Emitter<ISelectData>;
2121
private styles: ISelectBoxStyles;
2222

src/vs/base/common/history.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { INavigator, ArrayNavigator } from 'vs/base/common/iterator';
77

88
export class HistoryNavigator<T> implements INavigator<T> {
99

10-
private _history: Set<T>;
10+
private _history!: Set<T>;
1111
private _limit: number;
12-
private _navigator: ArrayNavigator<T>;
12+
private _navigator!: ArrayNavigator<T>;
1313

1414
constructor(history: T[] = [], limit: number = 10) {
1515
this._initialize(history);

src/vs/workbench/browser/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export interface IActionBarRegistry {
156156
class ActionBarRegistry implements IActionBarRegistry {
157157
private readonly actionBarContributorConstructors: { scope: string; ctor: IConstructorSignature0<ActionBarContributor>; }[] = [];
158158
private readonly actionBarContributorInstances: Map<string, ActionBarContributor[]> = new Map();
159-
private instantiationService: IInstantiationService;
159+
private instantiationService!: IInstantiationService;
160160

161161
start(accessor: ServicesAccessor): void {
162162
this.instantiationService = accessor.get(IInstantiationService);

src/vs/workbench/browser/composite.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export abstract class Composite extends Component implements IComposite {
3535
private readonly _onDidChangeVisibility: Emitter<boolean> = this._register(new Emitter<boolean>());
3636
readonly onDidChangeVisibility: Event<boolean> = this._onDidChangeVisibility.event;
3737

38-
private _onDidFocus: Emitter<void>;
38+
private _onDidFocus!: Emitter<void>;
3939
get onDidFocus(): Event<void> {
4040
if (!this._onDidFocus) {
4141
this.registerFocusTrackEvents();
@@ -50,7 +50,7 @@ export abstract class Composite extends Component implements IComposite {
5050
}
5151
}
5252

53-
private _onDidBlur: Emitter<void>;
53+
private _onDidBlur!: Emitter<void>;
5454
get onDidBlur(): Event<void> {
5555
if (!this._onDidBlur) {
5656
this.registerFocusTrackEvents();
@@ -68,10 +68,10 @@ export abstract class Composite extends Component implements IComposite {
6868
this._register(focusTracker.onDidBlur(() => this._onDidBlur.fire()));
6969
}
7070

71-
protected actionRunner: IActionRunner;
71+
protected actionRunner: IActionRunner | undefined;
7272

7373
private visible: boolean;
74-
private parent: HTMLElement;
74+
private parent!: HTMLElement;
7575

7676
constructor(
7777
id: string,

src/vs/workbench/browser/panel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class PanelDescriptor extends CompositeDescriptor<Panel> {
2525
}
2626

2727
export class PanelRegistry extends CompositeRegistry<Panel> {
28-
private defaultPanelId: string;
28+
private defaultPanelId!: string;
2929

3030
/**
3131
* Registers a panel to the platform.

src/vs/workbench/browser/parts/compositePart.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ export abstract class CompositePart<T extends Composite> extends Part {
5858
protected readonly onDidCompositeOpen = this._register(new Emitter<{ composite: IComposite, focus: boolean }>());
5959
protected readonly onDidCompositeClose = this._register(new Emitter<IComposite>());
6060

61-
protected toolBar: ToolBar;
61+
protected toolBar!: ToolBar;
6262

6363
private mapCompositeToCompositeContainer = new Map<string, HTMLElement>();
6464
private mapActionsBindingToComposite = new Map<string, () => void>();
6565
private activeComposite: Composite | null;
6666
private lastActiveCompositeId: string;
6767
private instantiatedCompositeItems: Map<string, CompositeItem>;
68-
private titleLabel: ICompositeTitleLabel;
69-
private progressBar: ProgressBar;
70-
private contentAreaSize: Dimension;
68+
private titleLabel!: ICompositeTitleLabel;
69+
private progressBar!: ProgressBar;
70+
private contentAreaSize: Dimension | undefined;
7171
private readonly telemetryActionsListener = this._register(new MutableDisposable());
72-
private currentCompositeOpenToken: string;
72+
private currentCompositeOpenToken: string | undefined;
7373

7474
constructor(
7575
private notificationService: INotificationService,

0 commit comments

Comments
 (0)