
- Store Emscripten cache inside node_modules/.em_cache. Docker image ships without LTO libs, so Emscripten has to rebuild stdlibs on every build otherwise. - Merge webp_enc + webp_dec build scripts. Core libwebp library is same in both cases, so there's no point in storing and building two copies of it.
14 lines
271 B
TypeScript
14 lines
271 B
TypeScript
interface RawImage {
|
|
buffer: Uint8Array;
|
|
width: number;
|
|
height: number;
|
|
}
|
|
|
|
interface WebPModule extends EmscriptenWasm.Module {
|
|
decode(data: BufferSource): RawImage;
|
|
free_result(): void;
|
|
}
|
|
|
|
export default function(opts: EmscriptenWasm.ModuleOpts): WebPModule;
|
|
|