mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Pump signature now returns a single stream instead of an array of streams. * pump: Updates version and adds author
19 lines
654 B
TypeScript
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;
|