UNPKG

568 BTypeScriptView Raw
1/// <reference types="node"/>
2
3interface MergedStream extends NodeJS.ReadWriteStream {
4 /**
5 * A method to dynamically add more sources to the stream. The argument supplied to add can be
6 * either a source or an array of sources.
7 */
8 add(source: NodeJS.ReadableStream | readonly NodeJS.ReadableStream[]): MergedStream;
9
10 /**
11 * A method that tells you if the merged stream is empty.
12 */
13 isEmpty(): boolean;
14}
15
16declare function merge<T extends NodeJS.ReadableStream>(...streams: Array<T | readonly T[]>): MergedStream;
17export = merge;