/** * Storage class implementing the W3C Web Storage API. * https://html.spec.whatwg.org/multipage/webstorage.html */ export declare class Storage { private _data; constructor(); /** Returns the number of key/value pairs. */ get length(): number; /** Returns the name of the nth key, or null if n >= length. */ key(index: number): string | null; /** Returns the value associated with the given key, or null. */ getItem(key: string): string | null; /** Sets the value of the pair identified by key to value. */ setItem(key: string, value: string): void; /** Removes the key/value pair with the given key. */ removeItem(key: string): void; /** Removes all key/value pairs. */ clear(): void; /** @internal Get all entries (for serialization). */ _entries(): [string, string][]; /** @internal Load data from entries (for deserialization). */ _load(entries: [string, string][]): void; get [Symbol.toStringTag](): string; } /** * localStorage — persistent key/value storage. * * On GJS, persistence could be achieved via Gio.File to * `GLib.get_user_data_dir()/gjsify/localStorage.json`. * Currently backed by in-memory storage for cross-platform compatibility. */ export declare const localStorage: Storage; /** * sessionStorage — per-session key/value storage. * Data is lost when the process exits. */ export declare const sessionStorage: Storage; declare const _default: { Storage: typeof Storage; localStorage: Storage; sessionStorage: Storage; }; export default _default;