DefinitelyTyped/types/pump/index.d.ts
Jason fcd45613c0 pump: pump should return a single stream instead of an array. (#35238)
* Pump signature now returns a single stream instead of an array of streams.

* pump: Updates version and adds author
2019-05-13 15:18:59 -07:00

19 lines
654 B
TypeScript

// Type definitions for pump 1.1
// Project: https://github.com/mafintosh/pump
// Definitions by: Tomek Łaziuk <https://github.com/tlaziuk>, Jason Cordial <https://github.com/jcordial>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
declare function pump(streams: pump.Stream[], callback?: pump.Callback): pump.Stream;
// callback have to be passed as last argument
declare function pump(...streams: Array<pump.Stream | pump.Callback>): pump.Stream;
declare namespace pump {
type Callback = (err: Error) => any;
type Stream = NodeJS.ReadableStream | NodeJS.WritableStream;
}
export = pump;