import { Cell } from "./cell.js"; import { Subtree } from "./subtree.js"; import { Operator } from "./utils/operator.js"; import { Magazine, Op, Options, Scan, Pair, Value } from "./types.js"; export declare class Kv { #private; /** facility for writing operations that could be committed. */ readonly op: Operator; /** methods that can access all entries under this scope, including child scopes. */ readonly subtree: Subtree; constructor(magazine?: Magazine, options?: Partial); /** create a cell which can set or get on a single key */ cell(key: string): Cell; /** create a sub kv where all keys inherit a prefix */ scope(...scopes: string[]): Kv; commit(ops: Op[]): Promise; set(key: string, value: X | undefined): Promise; setMany(changes: [key: string, value: X | undefined][]): Promise; delete(...keys: string[]): Promise; getMany(keys: string[]): Promise<(X | undefined)[]>; get(key: string): Promise; has(key: string): Promise; /** throw if the value is undefined or null */ need(key: string): Promise; /** throw if the value is undefined or null */ needMany(keys: string[]): Promise; entries(scan?: Scan): AsyncGenerator, void, unknown>; [Symbol.asyncIterator](): AsyncGenerator, void, unknown>; keys(scan?: Scan): AsyncGenerator; values(scan?: Scan): AsyncGenerator, void, unknown>; count(scan?: Scan): Promise; clear(scan?: Scan): Promise; }