fix(merge2): the package uses PassThrough stream (#40755)

This commit is contained in:
Denis Malinochkin
2019-12-02 19:39:15 -08:00
committed by Ron Buckton
parent 28a61b913d
commit 51eeca659d
2 changed files with 7 additions and 2 deletions
+4 -2
View File
@@ -1,4 +1,4 @@
// Type definitions for merge2 1.1
// Type definitions for merge2 1.3
// Project: https://github.com/teambition/merge2
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
// Chigozirim C. <https://github.com/smac89>
@@ -6,6 +6,8 @@
/// <reference types="node" />
import { PassThrough } from 'stream';
/**
* @summary This function takes an arbitrary number of streams and returns a
* Merge2Stream.
@@ -37,7 +39,7 @@ declare namespace merge2 {
objectMode?: boolean;
}
interface Merge2Stream extends NodeJS.ReadWriteStream {
interface Merge2Stream extends PassThrough {
/**
* @summary Add more streams to an existing merged stream
*
+3
View File
@@ -65,3 +65,6 @@ streamA.add(stream6);
stream.on('readable', () => {
console.log('Stream has data!!');
});
// should have PassThrough methods
stream.destroy();