refactor(core): removed getter and changed to readonly variable (#19117)
PR Close #19117
This commit is contained in:
@ -27,11 +27,11 @@ export class ApplicationInitStatus {
|
||||
private resolve: Function;
|
||||
private reject: Function;
|
||||
private initialized = false;
|
||||
private _donePromise: Promise<any>;
|
||||
private _done = false;
|
||||
public readonly donePromise: Promise<any>;
|
||||
public readonly done = false;
|
||||
|
||||
constructor(@Inject(APP_INITIALIZER) @Optional() private appInits: (() => any)[]) {
|
||||
this._donePromise = new Promise((res, rej) => {
|
||||
this.donePromise = new Promise((res, rej) => {
|
||||
this.resolve = res;
|
||||
this.reject = rej;
|
||||
});
|
||||
@ -46,7 +46,7 @@ export class ApplicationInitStatus {
|
||||
const asyncInitPromises: Promise<any>[] = [];
|
||||
|
||||
const complete = () => {
|
||||
this._done = true;
|
||||
(this as{done: boolean}).done = true;
|
||||
this.resolve();
|
||||
};
|
||||
|
||||
@ -66,8 +66,4 @@ export class ApplicationInitStatus {
|
||||
}
|
||||
this.initialized = true;
|
||||
}
|
||||
|
||||
get done(): boolean { return this._done; }
|
||||
|
||||
get donePromise(): Promise<any> { return this._donePromise; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user