UNPKG

655 BTypeScriptView Raw
1// Type definitions for pump 1.1
2// Project: https://github.com/mafintosh/pump
3// Definitions by: Tomek Łaziuk <https://github.com/tlaziuk>, Jason Cordial <https://github.com/jcordial>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6/// <reference types="node" />
7
8declare function pump(streams: pump.Stream[], callback?: pump.Callback): pump.Stream;
9
10// callback have to be passed as last argument
11declare function pump(...streams: Array<pump.Stream | pump.Callback>): pump.Stream;
12
13declare namespace pump {
14 type Callback = (err?: Error) => any;
15 type Stream = NodeJS.ReadableStream | NodeJS.WritableStream;
16}
17
18export = pump;