taglib-wasm
Version:
TagLib for TypeScript platforms: Deno, Node.js, Bun, Electron, browsers, and Cloudflare Workers
41 lines • 1.63 kB
TypeScript
/**
* @fileoverview WASI to TagLibModule adapter
*
* Handles the complex task of adapting WASI module interface to
* TagLibModule interface. Each method is kept simple and focused.
*/
import type { FileHandle, TagLibModule } from "../wasm.ts";
import type { WasiModule } from "./wasmer-sdk-loader.ts";
/**
* Adapter class to make WASI module compatible with TagLibModule interface
*/
export declare class WasiToTagLibAdapter implements TagLibModule {
private readonly wasi;
private readonly heap;
constructor(wasiModule: WasiModule);
FileHandle: new () => FileHandle;
TagWrapper: new () => import("../wasm.ts").TagWrapper;
AudioPropertiesWrapper: new () => import("../wasm.ts").AudioPropertiesWrapper;
get ready(): Promise<this>;
get HEAP8(): Int8Array;
get HEAP16(): Int16Array;
get HEAPU8(): Uint8Array;
get HEAP32(): Int32Array;
get HEAPU16(): Uint16Array;
get HEAPU32(): Uint32Array;
get HEAPF32(): Float32Array;
get HEAPF64(): Float64Array;
_malloc(size: number): number;
_free(ptr: number): void;
_realloc(ptr: number, newSize: number): number;
UTF8ToString(ptr: number): string;
stringToUTF8(str: string, ptr: number, maxBytes: number): number;
lengthBytesUTF8(str: string): number;
createFileHandle(): FileHandle;
version(): string;
addFunction(func: any): number;
removeFunction(ptr: number): void;
cwrap(name: string, returnType: string | null, argTypes: string[]): any;
ccall(name: string, returnType: string | null, argTypes: string[], args: any[]): any;
}
//# sourceMappingURL=wasi-adapter.d.ts.map