/** * Index Backend - Dynamically selects between WASM and TypeScript implementations * * Uses Rust/WASM for production performance, falls back to TS for testing/development */ import type { IndexConfig, IndexQuery } from './index-types.js'; export interface IIndexBackend { createIndex(config: IndexConfig): void; updateRecord(recordId: string, oldValue: Record | null, newValue: Record): void; queryIndex(name: string, query: IndexQuery): string[]; queryCompoundIndex(name: string, values: Record): string[]; listIndexes(): IndexConfig[]; } export declare class IndexBackend implements IIndexBackend { private tsBackend; private wasmBackend; private useWasm; constructor(); initializeWasm(): Promise; createIndex(config: IndexConfig): void; updateRecord(recordId: string, oldValue: Record | null, newValue: Record): void; /** * Discard indexed entries, keeping definitions. Reports whether it worked. * * The WASM backend exposes no reset, so a caller that needs the index to * reflect a specific snapshot must treat `false` as "do not trust the index" * rather than assuming the reset happened. */ resetEntries(): boolean; queryIndex(name: string, query: IndexQuery): string[]; queryCompoundIndex(name: string, values: Record): string[]; listIndexes(): IndexConfig[]; } //# sourceMappingURL=index-backend.d.ts.map