import * as React from 'react'; import type { RequiredWith } from "../type"; import type { ParseOptions, StringifyOptions } from 'query-string'; export interface UrlStateOptions { disabled?: boolean; navigateMode?: 'push' | 'replace'; parseOptions?: ParseOptions; stringifyOptions?: StringifyOptions; /** * @desc get is transform S to T, set is transform T to S */ transform?: (value: T | S, type: 'set' | 'get') => S | T; } type UrlState = Record; declare function useUrlState(group: string, initialState?: T | (() => T), options?: RequiredWith, 'transform'>): [T, (s: React.SetStateAction) => void]; declare function useUrlState(group: string, initialState?: S | (() => S), options?: Omit, 'transform'>): [S, (s: React.SetStateAction) => void]; export default useUrlState;