import { SetStateAction } from 'react'; export declare type HistoryAction = 'push' | 'replace'; export declare type Pathname = string; export declare type Search = string; export declare type Location = { pathname: Pathname; search: Search; }; export declare type UnregisterCallback = () => void; export declare type HistoryAdapter = { listen: (listener: () => void) => UnregisterCallback; location: Location; push: (location: Location) => void; replace: (location: Location) => void; }; export declare const html5HistoryAdapter: () => HistoryAdapter; export declare type FlatStringy = { [Key in keyof T]: T[Key] extends string ? T[Key] : string; }; export declare type Parse = (queryString: string) => T; export declare type Stringify = (state: T) => string; export declare type Serialisation = { parse: Parse; stringify: Stringify; }; export declare type Config = { history: HistoryAdapter; serialisation: Serialisation; }; export declare function useUrlState>(initialState: ParseResult, config?: Partial>): [ParseResult, (newState: SetStateAction, historyAction?: HistoryAction) => void];