mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
19 lines
613 B
TypeScript
19 lines
613 B
TypeScript
// Type definitions for pump 1.0
|
|
// Project: https://github.com/mafintosh/pump
|
|
// Definitions by: Tomek Łaziuk <https://github.com/tlaziuk>
|
|
// 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;
|