/** * @class KV * * @implements {IKV} */ export class KV implements IKV { /** * @param {import('./types').Options} [options] */ constructor(options?: import("./types").Options); /** * @template [T=unknown] * @param {KvKey} key - Key to watch * @param {(newValue?: T, oldValue?: T) => void} callback * @param {boolean} [once] */ onChange(key: KvKey, callback: (newValue?: T, oldValue?: T) => void, once?: boolean): () => void; /** * @template [T=unknown] * @param {KvKey} key * @returns {Promise} */ get(key: KvKey): Promise; /** * Set a value in the store * * @template [T=unknown] * @param {KvKey} key * @param {T} value * @param {import('./types').SetOptions} [options] */ set(key: KvKey, value: T, options?: import("./types").SetOptions): Promise; delete(key: import("./types").KvKey): Promise; has(key: import("./types").KvKey): import("./types").Await; clear(): Promise; /** * Retrieve a list of keys in the database * * Each list operation must specify a selector which is used to specify the range of keys to return. The selector can either be a prefix selector, or a range selector: * * - A prefix selector selects all keys that start with the given prefix of key parts. For example, the selector ["users"] will select all keys that start with the prefix ["users"], such as ["users", "alice"] and ["users", "bob"]. Note that you can not partially match a key part, so the selector ["users", "a"] will not match the key ["users", "alice"]. A prefix selector may specify a start key that is used to skip over keys that are lexicographically less than the start key. * * - A range selector selects all keys that are lexicographically between the given start and end keys (including the start, and excluding the end). For example, the selector ["users", "a"], ["users", "n"] will select all keys that start with the prefix ["users"] and have a second key part that is lexicographically between a and n, such as ["users", "alice"], ["users", "bob"], and ["users", "mike"], but not ["users", "noa"] or ["users", "zoe"]. * * @template Value * @param {import('./types').KvListSelector} selector * @param {import('./types').KvListOptions} [options] * @returns {import('./types').KvListIterator>} */ list(selector: import("./types").KvListSelector, options?: import("./types").KvListOptions): import("./types").KvListIterator>; /** * @template [Value=unknown] * @returns {AsyncIterableIterator<{key: KvKey, value: Value}>} */ [Symbol.asyncIterator](): AsyncIterableIterator<{ key: KvKey; value: Value; }>; #private; } export type Driver = import("./types").Driver; export type IKV = import("./types").IKV; export type KvKey = import("./types").KvKey; //# sourceMappingURL=index.d.ts.map