mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 05:20:25 +00:00
fix(merge2): the package uses PassThrough stream (#40755)
This commit is contained in:
committed by
Ron Buckton
parent
28a61b913d
commit
51eeca659d
Vendored
+4
-2
@@ -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
|
||||
*
|
||||
|
||||
@@ -65,3 +65,6 @@ streamA.add(stream6);
|
||||
stream.on('readable', () => {
|
||||
console.log('Stream has data!!');
|
||||
});
|
||||
|
||||
// should have PassThrough methods
|
||||
stream.destroy();
|
||||
|
||||
Reference in New Issue
Block a user