/** * @file src/wasm/index.ts * @description WASM solver integration * * Provides async initialization and synchronous solving via WebAssembly. * In Node.js, auto-initializes when the module is loaded. */ import type { Model, SolveResult } from "../types/solver"; interface WasmModule { solve: (modelJson: string) => string; } /** * Initialize the WASM module from a pre-loaded wasm-bindgen module. * * @example * // In browser: * import init, * as wasm from './lp_solver_wasm.js'; * await init(); * solver.initWasm(wasm); * * @example * // In Node.js: * const wasm = await import('./lp_solver_wasm.js'); * await wasm.default(); * solver.initWasm(wasm); */ export declare function initWasm(module?: WasmModule): Promise; /** * Check if WASM is initialized and available. */ export declare function isWasmAvailable(): boolean; /** * Solve a model using WASM. * Throws if WASM is not initialized. */ export declare function solveWasm(model: Model): SolveResult; declare const _default: { initWasm: typeof initWasm; isWasmAvailable: typeof isWasmAvailable; solveWasm: typeof solveWasm; }; export default _default;