@biomejs/js-api
Version:
JavaScript APIs for the Biome package
43 lines • 1.33 kB
TypeScript
export type WasmBundler = typeof import("@biomejs/wasm-bundler");
export type WasmNodejs = typeof import("@biomejs/wasm-nodejs");
export type WasmWeb = typeof import("@biomejs/wasm-web");
export type WasmModule = WasmBundler | WasmNodejs | WasmWeb;
/**
* What kind of client Biome should use to communicate with the binary
*/
export declare enum Distribution {
/**
* Use this if you want to communicate with the WebAssembly client built for bundlers
*/
BUNDLER = 0,
/**
* Use this if you want to communicate with the WebAssembly client built for Node.JS
*/
NODE = 1,
/**
* Use this if you want to communicate with the WebAssembly client built for the Web
*/
WEB = 2
}
export declare function loadModule(dist: Distribution): Promise<WasmModule>;
/**
* The error generated when communicating with WebAssembly
*/
declare class WasmError extends Error {
/**
* The stack trace of the error.
*
* It might be useful, but the first like of the stack trace contains the error
*/
stackTrace: string;
private constructor();
static fromError(e: unknown): WasmError;
}
/**
* Creates wrap a WebAssembly error into a native JS Error
*
* @param e
*/
export declare function wrapError(e: unknown): WasmError;
export {};
//# sourceMappingURL=wasm.d.ts.map