import { Options } from '../internal/resolveValue.ts'; import { Observer } from '../Observer/Observer.ts'; /** * Local-storage-backed state management. * Data persists across browser sessions until explicitly cleared. */ export declare class LocalState extends Observer { static get(key: string, options: Options & { strict: true; }): T; static get(key: string, options: Options & { fallback: T; }): T; static get(key: string, options?: Options): T | undefined; /** * Stores a value in local storage. * * Always JSON-serialises. This is a deliberate change from the previous * implementation, which stored strings raw — that caused values like * `"42"` or `"true"` to come back as `42` and `true` after a roundtrip. * * @throws when the value cannot be serialised (circular refs, functions, * symbols, undefined) or when localStorage refuses the write * (QuotaExceededError, SecurityError). */ static set(key: string, value: T): void; /** * Removes a value from local storage. */ static remove(key: string): void; /** * Clears every value in local storage and emits a `null` event for each removed key. */ static clear(): void; static has(key: string): boolean; }