mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
wasm-pack auto-downloads and runs a fixed version of wasm-opt, but wasm-pack itself hasn't been maintained for a while, and so wasm-opt that comes with it is also severely outdated, leading to all sorts of hidden issues (compiler errors, broken atomics code, etc.) as well as missed optimisations. This change disable wasm-opt feature of wasm-pack in all Rust codecs and runs the latest wasm-opt manually instead.
30 lines
1.0 KiB
TypeScript
Generated
30 lines
1.0 KiB
TypeScript
Generated
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* @param {Uint32Array} input_image
|
|
* @param {number} input_width
|
|
* @param {number} input_height
|
|
* @param {number} factor
|
|
* @returns {Uint32Array}
|
|
*/
|
|
export function resize(input_image: Uint32Array, input_width: number, input_height: number, factor: number): Uint32Array;
|
|
|
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
|
|
export interface InitOutput {
|
|
readonly memory: WebAssembly.Memory;
|
|
readonly resize: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
readonly __wbindgen_malloc: (a: number) => number;
|
|
readonly __wbindgen_free: (a: number, b: number) => void;
|
|
}
|
|
|
|
/**
|
|
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
*
|
|
* @param {InitInput | Promise<InitInput>} module_or_path
|
|
*
|
|
* @returns {Promise<InitOutput>}
|
|
*/
|
|
export default function init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
|