import { StringMap } from '@react-force/utils'; /** * Holds the state of the router. */ export interface RouterState { routeName: string; params: StringMap; queryParams: { [key: string]: any; }; options: { [key: string]: any; }; } /** * createRouterState() is a factory method to create RouterState. * * - Always use this method to create a new RouterState instance. * - Treat RouterState as immutable. If you need a new RouterState, create a fresh one. * - RouterState can be serialized and deserialized. This is useful for server-side rendering. * * @param routeName * Example 'department' * * @param options (optional) { [key: string]: any } * Any key-value pair that application wants to stuff in RouterState. * The following options have special meaning to mobx-state-router. * * params: StringMap * Example { id: 'electronics' } * * queryParams: { [key: string]: any } * Example { q: 'apple' } or { items: ['E1', 'E2'] } * * replaceHistory: boolean * If true, the router uses history.replace() when transitioning to a new state. * The default is to use history.push(). */ export declare const createRouterState: (routeName: string, options?: { [key: string]: any; }) => { routeName: string; params: {}; queryParams: {}; options: { [key: string]: any; replaceHistory: boolean; }; };