import { Controller } from "@hotwired/stimulus"; export type Serializer = { deserialize(raw: string): T; serialize(value: T): string; isEmpty(value: T): boolean; }; export interface LocalStorageProxy { get value(): T; set value(value: T); read(): T; write(value: T): void; clear(): void; isEmpty(): boolean; } export declare const StorageSerializers: Record<"boolean" | "object" | "number" | "any" | "string" | "map" | "set", Serializer> & { [idx: string]: Serializer; }; export declare function useLocalStorage(controller: Controller, key: string, defaultValue?: any, opts?: { onChange?: ((newValue: any, oldValue: any) => void) | null; writeDefaults?: boolean; }): LocalStorageProxy;