mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
45 lines
829 B
TypeScript
45 lines
829 B
TypeScript
/// <reference path="./through2.d.ts" />
|
|
/// <reference path="../node/node.d.ts" />
|
|
|
|
import through2 = require('through2');
|
|
|
|
var rws: NodeJS.ReadWriteStream;
|
|
|
|
rws = through2({
|
|
objectMode: true,
|
|
allowHalfOpen: true
|
|
}, function (entry: any, enc: string, callback: () => void) {
|
|
this.push('foo');
|
|
callback();
|
|
}, () => {
|
|
|
|
});
|
|
|
|
rws = through2(function (entry: any, enc: string, callback: () => void) {
|
|
this.push('foo');
|
|
callback();
|
|
}, () => {
|
|
|
|
});
|
|
|
|
rws = through2(function (entry: any, enc: string, callback: () => void) {
|
|
this.push('foo');
|
|
callback();
|
|
});
|
|
|
|
rws = through2();
|
|
|
|
// obj
|
|
rws = through2.obj(function (entry: any, enc: string, callback: () => void) {
|
|
this.push('foo');
|
|
callback();
|
|
}, () => {
|
|
|
|
});
|
|
|
|
rws = through2.obj(function (entry: any, enc: string, callback: () => void) {
|
|
this.push('foo');
|
|
callback();
|
|
});
|
|
|