import { RouterActions } from './actions/types'; export interface RouteableState { key: string; routeName: string; params: any; componentName: string; } export interface RouteState extends RouteableState { } export interface RouterState extends RouteableState { index: number; routes: RouteState[]; } export declare type HandledReducerResult = { handled: true; state: RouterState; }; export declare type UnhandledReducerResult = { handled: false; }; export declare type ReducerResult = HandledReducerResult | UnhandledReducerResult; export declare type InitialStateOptions = { key?: string; params?: any; }; export interface RouteableReducer { name: string; children: RouteableReducer[]; isRouter: boolean; params?: any; getInitialState: (options?: InitialStateOptions) => RouteableState; dispatch: (action: RouterActions, state?: RouteableState) => ReducerResult; } export interface RouteReducer extends RouteableReducer { isRouter: false; getInitialState: (options?: InitialStateOptions) => RouteState; } export interface RouterReducer extends RouteableReducer { isRouter: true; getInitialState: (options?: InitialStateOptions) => RouterState; }