import { ClockHead, MapFn, QueryOpts, IdxMeta } from './types';
import { IndexBlockstore } from './transaction';
import { IndexTree } from './indexer-helpers';
import { CRDT } from './crdt';
export declare function index({ _crdt }: {
    _crdt: CRDT;
}, name: string, mapFn?: MapFn, meta?: IdxMeta): Indexer;
export declare class Indexer {
    blocks: IndexBlockstore;
    crdt: CRDT;
    name: string | null;
    mapFn: MapFn | null;
    mapFnString: string;
    byKey: IndexTree;
    byId: IndexTree;
    indexHead: ClockHead | undefined;
    includeDocsDefault: boolean;
    initError: Error | null;
    ready: Promise<void>;
    constructor(crdt: CRDT, name: string, mapFn?: MapFn, meta?: IdxMeta);
    applyMapFn(name: string, mapFn?: MapFn, meta?: IdxMeta): void;
    query(opts?: QueryOpts): Promise<{
        rows: import("./types").IndexRow[];
    }>;
    _hydrateIndex(): Promise<void>;
    _updateIndex(): Promise<(IdxMeta & import("./types").CarCommit) | {
        byId: IndexTree;
        byKey: IndexTree;
    }>;
}
