UNPKG

taglib-wasm

Version:

TagLib for TypeScript platforms: Deno, Node.js, Bun, Electron, browsers, and Cloudflare Workers

51 lines 1.59 kB
/** * @fileoverview Deno compile support for taglib-wasm * * This module provides utilities to make taglib-wasm work seamlessly * with Deno compile by handling WASM loading appropriately. */ import type { LoadTagLibOptions } from "../index.ts"; /** * Detects if running in a Deno compiled binary */ export declare function isDenoCompiled(): boolean; /** * Enhanced WASM loading options for Deno compile */ export interface DenoCompileOptions extends LoadTagLibOptions { /** * Path to WASM file for runtime loading (not compiled binaries) */ wasmPath?: string; /** * Fallback URL if local WASM is not found */ fallbackUrl?: string; } /** * Smart WASM loader that handles both development and compiled environments * * @example * ```typescript * // In your application * import { TagLib } from "taglib-wasm"; * import { loadWasmForDeno } from "taglib-wasm/deno-compile-support"; * * const wasmBinary = await loadWasmForDeno(); * const taglib = await TagLib.initialize({ wasmBinary }); * ``` */ export declare function loadWasmForDeno(options?: DenoCompileOptions): Promise<Uint8Array | undefined>; /** * Simplified initialization for Deno applications * * @example * ```typescript * import { initializeForDeno } from "taglib-wasm/deno-compile-support"; * * // Works in development, production, and compiled binaries * const taglib = await initializeForDeno(); * ``` */ export declare function initializeForDeno(options?: DenoCompileOptions): Promise<import("./mod.ts").TagLib>; //# sourceMappingURL=deno-compile-support.d.ts.map