@fireproof/database
Version:
Live database for the web
21 lines (20 loc) • 752 B
TypeScript
import { TransactionBlockstore, IndexBlockstore } from './transaction';
import type { DocUpdate, BulkResult, ClockHead, FireproofOptions } from './types';
import type { Index } from './index';
export declare class CRDT {
name: string | null;
opts: FireproofOptions;
ready: Promise<void>;
blocks: TransactionBlockstore;
indexBlocks: IndexBlockstore;
indexers: Map<string, Index>;
private _head;
constructor(name?: string, opts?: FireproofOptions);
bulk(updates: DocUpdate[], options?: object): Promise<BulkResult>;
get(key: string): Promise<import("./types").DocValue | null>;
changes(since?: ClockHead): Promise<{
result: DocUpdate[];
head: ClockHead;
}>;
compact(): Promise<void>;
}