export interface UseLocalStorageOptions { /** * Runtime shape check applied to every value decoded from storage — the * first read and each cross-tab update. Returning false discards the stored * value and falls back to `initialValue`. * * Without it the stored JSON is trusted to be a `T`, which only holds while * nothing else writes the key and the persisted shape never changes. Pass a * guard for anything whose shape has versions. * * Keep the identity stable (module scope or `useCallback`) — an inline * predicate re-subscribes the cross-tab listeners on every render. */ validate?: (parsed: unknown) => parsed is T; } /** * Hook to use localStorage with state * @param key - localStorage key * @param initialValue - Initial value if key doesn't exist * @param options - Optional `validate` guard for the stored payload * @returns [storedValue, setValue] tuple */ export declare function useLocalStorage(key: string, initialValue: T, options?: UseLocalStorageOptions): [T, (value: T | ((val: T) => T)) => void]; //# sourceMappingURL=use-local-storage.d.ts.map