import { BaseReactModel } from "./base-react-model"; import { EnumReactAppInitStage } from "./react-app-init-stage.enum"; export declare enum ReactRouteInitStatus { NONE = 0, LOADING = 1, SUCCESS = 2, ERROR = 3 } export interface ReactPageInitState { pathname: string; init: ReactRouteInitStatus; initStatic: ReactRouteInitStatus; revalidate?: number; } export interface IInitialModelState { /** * 获取预渲染的状态 */ initModelStaticState?(): Promise; /** * 获取绑定model中的初始化状态。 * @param context */ initModelState?(): Promise; } export declare class ReactAppInitManager extends BaseReactModel<{ [pathname: string]: T; }> { initStage: EnumReactAppInitStage; initDelay: boolean; constructor(); getInitState(): {}; setInitState(pathnameArg: string | { pathname: string; index?: boolean; }, { initStatic, init, revalidate }: { initStatic?: ReactRouteInitStatus; init?: ReactRouteInitStatus; revalidate?: number; }): void; getRouteTreeInitState(pathname: string): T[]; getRouteInitState(pathnameArg: string | { pathname: string; index?: boolean; }): T; resetInitState(pathnameArg: string | { pathname: string; index: boolean; }): void; private routeControllers; registerRouteController(pathname: string, ctl: IInitialModelState): void; unregisterRouteController(pathname: string, ctl: IInitialModelState): void; getRouteControllers(pathname: string): IInitialModelState[] | undefined; getAllRouteControllers(): Map; initControllers(pathname: string): Promise<{ revalidate?: number; initStaticCount?: number; initDynamicCount?: number; }>; }