import { HashTable, type HashTableItem } from "../data/hash-table/table"; import { type Patch } from "../data/json-patch"; import { type FunctionKeys } from "../utils/types"; import { type Collection } from "./collection"; import { type MutationEvent } from "./observer"; export interface HistoryItem { operation: FunctionKeys>; args: unknown[]; } export interface CommitResult { history: HistoryItem[]; mutations: Patch; events: MutationEvent[]; } interface Or { inChain: boolean; inEffect: boolean; } export declare class Chain, SelectItem = Pick> { hashTable: HashTable; options: { properties?: SelectKeys[]; }; mutations: Patch; history: HistoryItem[]; or: Or; masterTable: HashTable; mutableTable: HashTable; constructor(hashTable: HashTable, options?: { properties?: SelectKeys[]; }); get data(): SelectItem[]; get nodes(): HashTableItem[]; get count(): number; get exists(): boolean; get lastOperation(): HistoryItem | null; private shouldProcess; private addToHistory; private mutate; update(nodes: HashTableItem[], operation?: HistoryItem): void; delete(): void; insert(items: DataType | DataType[]): void; private setOrReplace; set(update: Partial | ((item: DataType) => DataType | Partial)): void; replace(document: DataType | ((item: DataType) => DataType)): void; commit(): CommitResult; cloneForProperties(properties: K[]): Chain>; } export {};