type Action = (state: State, args: T) => State | Array export interface Options { baseUrl?: string; loader?: (state: State) => any notFound?: (state: State) => any fastClicks?: boolean eagerLoad?: boolean navigationDelay?: number } export interface Config { routes: Record | any>; options?: Options; init: Record; view: (state: State) => any; subscriptions?: (state: State) => any[]; } export interface LocationState { route?: string; path: string; params: any; query: any; } export type PathStatus = 'iddle' | 'loading' | 'fetching' | 'ready' | 'error'; export interface State { location: LocationState; paths: Record; [x: string]: any; } export interface ViewContext { state: State options: Options meta: any getLocation: (path: string) => LocationState PreloadPage: Action LocationChanged: Action } export interface PathInfo extends LocationState { status: PathStatus; active: boolean; }