DefinitelyTyped/through/through-tests.ts
2016-02-16 01:20:30 +09:00

12 lines
233 B
TypeScript

/// <reference path="./through.d.ts" />
import through = require('through');
var i = 0;
through(
function () {
this.queue((i++).toString());
}, function () {
this.queue(null);
}, { autoDestroy: true }).pipe(process.stdout);