/** * Shape of the Emscripten module returned by `globalThis.dazzleModule()`. * We type it loosely because the codegen surface is large and stable. */ export interface EmscriptenModule { ccall(name: string, returnType: 'number' | 'string' | null, argTypes: string[], args: unknown[]): unknown; _malloc(bytes: number): number; _free(ptr: number): void; UTF8ToString(ptr: number): string; stringToUTF8(str: string, ptr: number, maxBytes: number): void; lengthBytesUTF8(str: string): number; HEAPU8: Uint8Array; HEAPF32: Float32Array; } declare global { interface Window { dazzleModule?: () => Promise; } var dazzleModule: (() => Promise) | undefined; } export declare function loadDazzleModule(timeoutMs?: number): Promise; export declare class DazzleWasm { private readonly m; constructor(m: EmscriptenModule); private allocCString; private callI; /** Read a NUL-separated stream "a\0b\0c\0" as a JS array. */ private readZeroSeparatedList; hset(key: string, field: string, value: string): boolean; hget(key: string, field: string): string | null; hdel(key: string, field: string): boolean; hexists(key: string, field: string): boolean; hgetall(key: string): Record; del(key: string): boolean; vsCreate(name: string, opts: { dim: number; M?: number; efConstruction?: number; initialCapacity?: number; }): boolean; vsAdd(name: string, id: string, embedding: Float32Array): boolean; vsSearch(name: string, query: Float32Array, opts?: { topK?: number; ef?: number; }): { id: string; distance: number; }[]; vsDrop(name: string): boolean; saveSnapshot(): Uint8Array; loadSnapshot(bytes: Uint8Array): boolean; clear(): void; version(): string; } //# sourceMappingURL=dazzle_wasm_bindings.d.ts.map