DefinitelyTyped/types/through/through-tests.ts
2017-03-24 14:27:52 -07:00

11 lines
193 B
TypeScript

import through = require('through');
var i = 0;
through(
function () {
this.queue((i++).toString());
}, function () {
this.queue(null);
}, { autoDestroy: true }).pipe(process.stdout);