Files
DefinitelyTyped/through2/through2-0.4.2-test.ts
2016-05-10 12:22:25 -07:00

45 lines
777 B
TypeScript

/// <reference types="node" />
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();
});