UNPKG

@worker-tools/html-rewriter

Version:

WASM-based implementation of Cloudflare's HTML Rewriter for use in Deno, browsers, etc.

24 lines (23 loc) 663 B
export type WasmExports = { memory: WebAssembly.Memory; asyncify_get_state: Function; asyncify_start_unwind: Function; asyncify_stop_unwind: Function; asyncify_start_rewind: Function; asyncify_stop_rewind: Function; }; /** * @param {number} stackPtr * @param {Promise} promise */ export function awaitPromise(stackPtr: number, promise: Promise<any>): void; /** * @param {WasmExports} wasmExports */ export function setWasmExports(wasmExports: WasmExports): void; /** * @param {HTMLRewriter} rewriter * @param {Function} fn * @param args */ export function wrap(rewriter: HTMLRewriter, fn: Function, ...args: any[]): Promise<any>;