import { Logger } from "@adviser/cement"; import { BaseBlockstore, ClockHead, CRDT, DocFragment, DocTypes, IdxMeta, IndexKeyType, IndexRows, MapFn, QueryOpts } from "./types.js"; import { AnyLink } from "@fireproof/core-types-blockstore"; import { BaseNode } from "prolly-trees/base"; export interface IndexTree { cid?: AnyLink; root?: BaseNode; } export interface IndexIf { readonly blockstore: BaseBlockstore; readonly crdt: CRDT; readonly name: string; mapFn?: MapFn; readonly mapFnString: string; indexHead?: ClockHead; initError?: Error; byKey: IndexTree; byId: IndexTree; ready(): Promise; readonly logger: Logger; applyMapFn(name: string, mapFn?: MapFn, meta?: IdxMeta): void; query(opts: QueryOpts): Promise>; }