// Type definitions for through2 v 2.0.0 // Project: https://github.com/rvagg/through2 // Definitions by: Bart van der Schoor , jedmao , Georgios Valotasios // Definitions: https://github.com/borisyankov/DefinitelyTyped /// 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; }