DefinitelyTyped/types/duplexer2/index.d.ts
Simon Oulevay c04cbed8b0 [duplexer2] Support regular stream.Duplex options (#35122)
As documented in https://www.npmjs.com/package/duplexer2#duplexer2-1,
options should not only be the duplexer2-specific `bubbleErrors` option,
but also regular stream.Duplex options.
2019-05-02 10:28:25 -07:00

21 lines
766 B
TypeScript

// Type definitions for duplexer2 0.1
// Project: https://github.com/deoxxa/duplexer2
// Definitions by: Zlatko Andonovski <https://github.com/Goldsmith42>
// Simon Oulevay <https://github.com/AlphaHydrae>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Definition file started by dts-gen
/// <reference types="node" />
import { DuplexOptions } from 'stream';
interface Duplexer2Options extends DuplexOptions {
bubbleErrors?: boolean;
}
declare function duplexer2(options: Duplexer2Options, writable: NodeJS.WritableStream, readable: NodeJS.ReadableStream): NodeJS.ReadWriteStream;
declare function duplexer2(writable: NodeJS.WritableStream, readable: NodeJS.ReadableStream): NodeJS.ReadWriteStream;
export = duplexer2;