@difizen/mana-core
Version:
24 lines • 994 B
TypeScript
import type { Event } from '@difizen/mana-common';
import { Emitter, Deferred } from '@difizen/mana-common';
import { DebugService } from '../common/debug';
export declare enum ApplicationState {
Default = "Default",
Initialized = "Initialized",
Started = "Started",
ViewStarted = "ViewStarted",
Ready = "Ready",
Closing = "Closing"
}
export declare class ApplicationStateService {
state: ApplicationState;
protected readonly debugService: DebugService;
constructor(debugService: DebugService);
protected deferred: Record<string, Deferred<void>>;
protected readonly stateChanged: Emitter<ApplicationState>;
setState(state: ApplicationState): void;
get onStateChanged(): Event<ApplicationState>;
protected getStateDeferred(state: ApplicationState): Deferred<void>;
reachedState(state: ApplicationState): Promise<void>;
reachedAnyState(...states: ApplicationState[]): Promise<void>;
}
//# sourceMappingURL=application-state.d.ts.map