interface UseHistoryStateConfig { size?: number; overrideLastItemDebounceMS?: number; onChange?: (data: T) => void; } interface SetStateConfig { /** * Update last history element (not create new one) */ overrideLastItem?: boolean; } type HistoryActionResult = { success: false; } | { success: true; value: T; }; export declare function useHistoryState | string>(initialValue: T | (() => T), config?: UseHistoryStateConfig): readonly [T, (value: T, config?: SetStateConfig) => void, () => HistoryActionResult, () => HistoryActionResult]; export {};