/* auto-generated by NAPI-RS */ /* eslint-disable */ /** * Convert JavaScript source code into a WebAssembly component. * * Takes a WIT definition and JavaScript source, compiles them into a * WebAssembly component using the QuickJS runtime. */ export declare function componentize(opts: ComponentizeOpts): Promise /** Options for componentizing a JavaScript source into a WebAssembly component. */ export interface ComponentizeOpts { /** Path to the WIT file or directory */ witPath: string /** JavaScript source code */ jsSource: string /** Path to the JavaScript entry file, used as the base for resolving imports */ jsPath?: string /** Root directory exposed during Wizer for resolving JavaScript imports */ moduleRoot?: string /** World name to use from the WIT (omit for default world) */ world?: string /** Stub all WASI imports with traps (default: false) */ stubWasi?: boolean /** Disable automatic garbage collection (default: false) */ disableGc?: boolean /** Use the built-in runtime optimized for smaller generated components */ optSize?: boolean /** * Use the built-in non-async runtime, producing components that do not use * the component-model async ABI */ sync?: boolean /** Path to a custom QuickJS runtime Wasm module */ runtime?: string /** Custom QuickJS runtime Wasm bytes */ runtimeBytes?: Buffer } /** Result of componentizing a JavaScript source. */ export interface ComponentizeResult { /** The WebAssembly component bytes */ component: Buffer } /** * NAPI CLI entry point. * * Returns `true` if the command succeeded, `false` otherwise. */ export declare function runCli(args: Array): Promise