import { History, Location, Action } from 'history'; export declare type PathConfig = { match: (pathname: string) => string[] | null; deserialize: (match: string[]) => Partial; serialize: (state: Partial) => string; is: (state: S) => boolean; pick: (state: S) => Partial; }; export declare type PathConfigs = Array>; export declare type PathConfigAndMatch = { path: PathConfig; match: string[]; }; export declare type BrowserState = { [k: string]: string; } & { view: string; }; export declare function parseBrowserState(paths: PathConfigs, location?: Location): BrowserState; export declare function serializeBrowserState(paths: PathConfigs, s: BrowserState): Partial; export default function (paths?: PathConfigs, history?: History): { syncToBrowser: (s: BrowserState, push?: boolean) => void; onBrowserChange: (callback: (s: BrowserState, action: Action) => void) => void; dryRunBrowserTransition: (s: S) => S; };