UNPKG

840 BTypeScriptView Raw
1/// <reference types="node" />
2
3import * as stream from "stream";
4
5export = duplexify;
6
7interface DuplexifyConstructor {
8 (writable?: stream.Writable, readable?: stream.Readable, streamOptions?: stream.DuplexOptions): duplexify.Duplexify;
9 new(
10 writable?: stream.Writable,
11 readable?: stream.Readable,
12 streamOptions?: stream.DuplexOptions,
13 ): duplexify.Duplexify;
14
15 obj(
16 writable?: stream.Writable,
17 readable?: stream.Readable,
18 streamOptions?: stream.DuplexOptions,
19 ): duplexify.Duplexify;
20}
21declare var duplexify: DuplexifyConstructor;
22declare namespace duplexify {
23 interface Duplexify extends stream.Duplex {
24 cork(): void;
25 uncork(): void;
26 setWritable(writable: stream.Writable): void;
27 setReadable(readable: stream.Readable): void;
28 }
29}