INNER CODE UNIT · TypeScript

terminateWorkers

gildas-lormeau/zip.js · index.d.ts:643

export function terminateWorkers(): Promise<void>;

/**
 * Initializes a custom web worker script. This function is exposed by the `@zip.js/zip.js/worker` entry point and must be called
 * in the worker script created by {@link Configuration#createWorker} or referenced by {@link Configuration#workerURI}.
 *
 * Here is a complete example of a worker script using fflate as the compression engine, e.g. to reduce the bundle size:
 * ```
 * import { initWorker } from "@zip.js/zip.js/worker";
 * import { Deflate, Inflate } from "fflate";
 *
 * const FORMAT_DEFLATE_RAW = "deflate-raw";
 *
 * class FflateStream extends TransformStream {
 *   constructor(codec) {
 *     super({
 *       start(controller) {
 *         codec.ondata = chunk => {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…