import { MaybeAsyncMap, MaybeAsyncMapBatch } from '../map.js'; import { SyncMapBatchAdapter } from './batchmap.js'; /** * A map that stores data in local storage with prefixed keys. * Note that this does not preserve insertion order. */ export declare class LocalStorageMap extends SyncMapBatchAdapter implements MaybeAsyncMap, MaybeAsyncMapBatch, Map, Iterable<[K, V]> { /** Unique prefix for keys. */ protected readonly prefix: string; /** The underlying storage. */ protected readonly storage: Storage; constructor( /** Unique prefix for keys. */ prefix?: string, /** The underlying storage. */ storage?: Storage); /** * Returns the size of this map. * Note that this is a heavy operation that loops through * the storage to count the number of keys with matching prefix. */ get size(): number; get(key: K): V | undefined; has(key: K): boolean; set(key: K, value: V): this; delete(key: K): boolean; clear(): void; forEach(callbackfn: (value: V, key: K, map: LocalStorageMap) => void, thisArg?: unknown): void; keys(): IterableIterator; values(): IterableIterator; entries(): IterableIterator<[K, V]>; [Symbol.iterator](): IterableIterator<[K, V]>; get [Symbol.toStringTag](): string; private encodeKey; private decodeKey; private getValue; } //# sourceMappingURL=storagemap.d.ts.map