forked from jbaroudi/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
through2.d.ts
30 lines (18 loc) · 1.02 KB
/
through2.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Type definitions for through2 v 2.0.0
// Project: https://github.com/rvagg/through2
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, jedmao <https://github.com/jedmao>, Georgios Valotasios <https://github.com/valotas>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module 'through2' {
import stream = require('stream');
type TransfofmCallback = (err?: any, data?: any) => void;
type TransformFunction = (chunk: any, enc: string, callback: TransfofmCallback) => void;
type FlashCallback = (flushCallback: () => void) => void;
function through2(transform?: TransformFunction, flush?: FlashCallback): NodeJS.ReadWriteStream;
function through2(opts?: stream.DuplexOptions, transform?: TransformFunction, flush?: FlashCallback): NodeJS.ReadWriteStream;
module through2 {
export function obj(transform?: TransformFunction, flush?: FlashCallback): NodeJS.ReadWriteStream;
export function push(data: any): void;
}
export = through2;
}