mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
28 lines
684 B
TypeScript
28 lines
684 B
TypeScript
import * as through2 from 'through2-concurrent';
|
|
import { Transform } from 'stream';
|
|
|
|
let str: Transform;
|
|
|
|
const transformFn = (err: any, data: any) => {};
|
|
function flushCb(this: Transform, cb: () => void) {
|
|
cb();
|
|
}
|
|
const opts = {
|
|
allowHalfOpen: false,
|
|
maxConcurrency: 5
|
|
};
|
|
|
|
str = through2();
|
|
str = through2(opts);
|
|
str = through2(transformFn);
|
|
str = through2(opts, transformFn);
|
|
str = through2(transformFn, flushCb);
|
|
str = through2(opts, transformFn, flushCb);
|
|
|
|
str = through2.obj();
|
|
str = through2.obj(opts);
|
|
str = through2.obj(transformFn);
|
|
str = through2.obj(opts, transformFn);
|
|
str = through2.obj(transformFn, flushCb);
|
|
str = through2.obj(opts, transformFn, flushCb);
|