Skip to content

Commit

Permalink
feat: add missing readonly modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
yifanwww committed Sep 1, 2023
1 parent 4e494f4 commit 9986570
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions packages/app-main/src/main/appInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import path from 'node:path';
export class AppInfo {
private static _instance?: AppInfo;

private _appPath: string;
private _srcPath: string;
private _userDataPath: string;
private readonly _appPath: string;
private readonly _srcPath: string;
private readonly _userDataPath: string;

private _startedTime: number;
private readonly _startedTime: number;

private constructor() {
const isInASAR = __dirname.includes('.asar');
Expand Down
12 changes: 6 additions & 6 deletions packages/app-main/src/main/configuration/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ interface IWindowStateKeeperOptions {
}

export class WindowStateKeeper {
private _type: WindowType;
private readonly _type: WindowType;

private _state: IWindowState;
private readonly _state: IWindowState;
private _stateChangeTimer: Nullable<NodeJS.Timer>;
private _windowRef: Nullable<BrowserWindow>;

private _defaultWidth: number;
private _defaultHeight: number;
private _defaultMaximized: boolean;
private _defaultFullScreen: boolean;
private readonly _defaultWidth: number;
private readonly _defaultHeight: number;
private readonly _defaultMaximized: boolean;
private readonly _defaultFullScreen: boolean;

constructor(type: WindowType, options?: IWindowStateKeeperOptions) {
this._type = type;
Expand Down
2 changes: 1 addition & 1 deletion packages/app-main/src/main/window/windowManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class WindowManager {
return WindowManager._instance;
}

private _store: WindowStore;
private readonly _store: WindowStore;

private constructor() {
this._store = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type { Compiler } from 'webpack';
const electron = _electron as unknown as string;

export class ReloadElectronWebpackPlugin {
private _cwd: string;
private _projectDir: string;
private readonly _cwd: string;
private readonly _projectDir: string;
private _process: child.ChildProcess | null;

constructor(projectDir: string, cwd: string) {
Expand Down

0 comments on commit 9986570

Please sign in to comment.