/** Like React.setState: either a value or a function of the previous value */
type Updater<T> = T | ((prev: T) => T);
/**
 * A hook to persist state in localStorage with cross-instance synchronization.
 *
 * Features:
 * - JSON serialization/deserialization
 * - Syncs between hook instances with the same key (same tab)
 * - Syncs across browser tabs via storage event
 * - SSR-safe (gracefully handles missing localStorage)
 * - Supports lazy initial value
 *
 * @param key - The localStorage key. Pass `null` or `undefined` to disable the hook.
 * @param initialValue - Initial value or lazy initializer function
 * @returns Tuple of [value, setValue] similar to useState
 *
 * @example
 * ```tsx
 * // Basic usage
 * const [theme, setTheme] = useLocalStorage('theme', 'light');
 *
 * // With lazy initializer
 * const [settings, setSettings] = useLocalStorage('settings', () => getDefaultSettings());
 *
 * // Disabled (returns initialValue, setValue is no-op)
 * const [value, setValue] = useLocalStorage(null, 'default');
 *
 * // Conditionally enabled
 * const [data, setData] = useLocalStorage(isEnabled ? 'my-key' : null, {});
 * ```
 */
export declare function useLocalStorage<T>(key: string | null | undefined, initialValue: T | (() => T)): readonly [T, (value: Updater<T>) => void];
export {};
