UNPKG

627 BTypeScriptView Raw
1// Type definitions for through
2// Project: https://github.com/dominictarr/through
3// Definitions by: Andrew Gaspar <https://github.com/AndrewGaspar>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6/// <reference types="node" />
7
8import stream = require('stream');
9
10declare function through(
11 write?: (data: any) => void,
12 end?: () => void,
13 opts?: {
14 autoDestroy: boolean;
15 },
16): through.ThroughStream;
17
18declare namespace through {
19 export interface ThroughStream extends stream.Transform {
20 autoDestroy: boolean;
21 queue: (chunk: any) => any;
22 }
23}
24
25export = through;