UNPKG

@morjs/runtime-web

Version:
57 lines (56 loc) 1.12 kB
export interface IPage { onShow: () => void; onHide: () => void; onUnload: () => void; pageId: string; location?: ILocation; __location: ILocation; } declare global { interface IApp { onLaunch: (options: any) => void; onShow: (options: any) => void; onHide: () => void; } } export interface IRouterAction { location: any; action: Action; delta?: number; } export declare enum Action { POP = "POP", PUSH = "PUSH", REPLACE = "REPLACE" } export interface ILocation { pathname: string; hash: string; search: string; } export interface IRouterConfig { router: { customRoutes: Record<string, string>[]; mode: string; baseName: string; }; routes: IRoute[]; pages: any[]; tabBar: ITabbarConfig; } export interface IRoute { path: string; loader: any; } export interface IRouterApiParams { url: string; delta?: number; } export interface IRouterChangeDetail { action: Action; delta: number; location: ILocation; } export interface ITabbarConfig { items: []; }