UNPKG

913 BTypeScriptView Raw
1/// <reference types="node"/>
2
3import { Transform, TransformCallback, TransformOptions } from "stream";
4
5type OnTransform = (chunk: any, callback: TransformCallback) => void;
6
7declare namespace ParallelTransform {
8 interface Options extends TransformOptions {
9 ordered?: boolean | undefined;
10 }
11}
12
13declare const ParallelTransform: {
14 (maxParallel: number, opts: ParallelTransform.Options | undefined | null, ontransform: OnTransform): Transform;
15 (opts: ParallelTransform.Options | number | undefined | null, ontransform: OnTransform): Transform;
16 (ontransform: OnTransform): Transform;
17 new(maxParallel: number, opts: ParallelTransform.Options | undefined | null, ontransform: OnTransform): Transform;
18 new(opts: ParallelTransform.Options | number | undefined | null, ontransform: OnTransform): Transform;
19 new(ontransform: OnTransform): Transform;
20};
21
22export = ParallelTransform;