import type { KeyValueStore } from './types.js'; export declare class LevelStore implements KeyValueStore { private store; constructor(location?: string); clear(): Promise; close(): Promise; delete(key: string): Promise; get(key: string): Promise; set(key: string, value: any): Promise; } /** * The `MemoryStore` class is an implementation of * `KeyValueStore` that holds data in memory. * * It provides a basic key-value store that works synchronously and keeps all * data in memory. This can be used for testing, or for handling small amounts * of data with simple key-value semantics. * * Example usage: * * ```ts * const memoryStore = new MemoryStore(); * await memoryStore.set("key1", 1); * const value = await memoryStore.get("key1"); * console.log(value); // 1 * ``` * * @public */ export declare class MemoryStore implements KeyValueStore { /** * A private field that contains the Map used as the key-value store. */ private store; /** * Clears all entries in the key-value store. * * @returns A Promise that resolves when the operation is complete. */ clear(): Promise; /** * This operation is no-op for `MemoryStore` * and will log a warning if called. */ close(): Promise; /** * Deletes an entry from the key-value store by its key. * * @param id - The key of the entry to delete. * @returns A Promise that resolves to a boolean indicating whether the entry was successfully deleted. */ delete(id: K): Promise; /** * Retrieves the value of an entry by its key. * * @param id - The key of the entry to retrieve. * @returns A Promise that resolves to the value of the entry, or `undefined` if the entry does not exist. */ get(id: K): Promise; /** * Checks for the presence of an entry by key. * * @param id - The key to check for the existence of. * @returns A Promise that resolves to a boolean indicating whether an element with the specified key exists or not. */ has(id: K): Promise; /** * Retrieves all values in the key-value store. * * @returns A Promise that resolves to an array of all values in the store. */ list(): Promise; /** * Sets the value of an entry in the key-value store. * * @param id - The key of the entry to set. * @param key - The new value for the entry. * @returns A Promise that resolves when the operation is complete. */ set(id: K, key: V): Promise; } //# sourceMappingURL=stores.d.ts.map