UNPKG

760 BTypeScriptView Raw
1/// <reference types="node" />
2
3import * as duplexify from "duplexify";
4import { Duplex, Readable, Stream, Writable } from "stream";
5
6declare class Pumpify extends Duplex implements duplexify.Duplexify {
7 constructor(...streams: Stream[]);
8 constructor(streams: Stream[]);
9 setPipeline(...streams: Stream[]): void;
10 setPipeline(streams: Stream[]): void;
11
12 // Duplexify members
13 setWritable(writable: Writable): void;
14 setReadable(readable: Readable): void;
15}
16
17interface PumpifyFactoryOptions {
18 autoDestroy: boolean;
19 destroy: boolean;
20 objectMode: boolean;
21 highWaterMark: number;
22}
23
24declare namespace Pumpify {
25 let obj: typeof Pumpify;
26 function ctor(opts: PumpifyFactoryOptions): typeof Pumpify;
27}
28
29export = Pumpify;