import { type SetStateAction } from 'react'; /** Serialization controls for a browser-storage value. @public */ export interface StorageOptions { /** Converts a value into the string written to Storage. */ readonly serialize?: (value: T) => string; /** Converts a stored string back into a value. */ readonly deserialize?: (value: string) => T; } /** The current value and the most recent storage or codec failure. @public */ export interface StorageState { readonly value: T; readonly error: unknown; } /** State and stable actions returned by a storage Hook. @public */ export interface UseStorageResult extends StorageState { readonly setValue: (next: SetStateAction) => void; readonly remove: () => void; } /** Syncs a value with localStorage. @public */ export declare function useLocalStorage(key: string, initialValue: T | (() => T), options?: StorageOptions): UseStorageResult; /** Syncs a value with sessionStorage. @public */ export declare function useSessionStorage(key: string, initialValue: T | (() => T), options?: StorageOptions): UseStorageResult;