/** * @fileoverview Module loading functions for TagLib Wasm initialization * * Handles both WASI (optimal for Deno/Node.js) and Emscripten (browser fallback) * module loading strategies. */ import type { LoadTagLibOptions } from "./loader-types.js"; import type { TagLibModule } from "../wasm.js"; /** * Load the TagLib Wasm module. * This function initializes the WebAssembly module and returns * the loaded module for use with the Full API. * * Automatically selects the optimal implementation: * - WASI for Deno/Node.js (faster filesystem access, MessagePack serialization) * - Emscripten for browsers (universal compatibility) * * @param options - Optional configuration for module initialization * @returns Promise resolving to the initialized TagLib module * * @example * ```typescript * import { loadTagLibModule, TagLib } from "taglib-wasm"; * * // Auto-select optimal implementation * const module = await loadTagLibModule(); * const taglib = new TagLib(module); * * // Force Emscripten mode (in-memory I/O) * const module = await loadTagLibModule({ forceWasmType: "emscripten" }); * * // Force WASI mode (Deno/Node.js only) * const module = await loadTagLibModule({ forceWasmType: "wasi" }); * * // With custom WASM binary * const wasmData = await fetch("taglib.wasm").then(r => r.arrayBuffer()); * const module = await loadTagLibModule({ wasmBinary: wasmData }); * ``` * * @note Most users should use `TagLib.initialize()` instead, * which handles module loading automatically. */ export declare function loadTagLibModule(options?: LoadTagLibOptions): Promise; //# sourceMappingURL=module-loader.d.ts.map