DefinitelyTyped/types/through/through-tests.ts
Carl Egbert e817b08dd4 @types/through: Add missing queue method to through.ThroughStream (#41427)
* Add queue method to through.ThroughStream

* no encoding arg

* formatting

* update tsconfig
2020-01-20 19:33:20 -05:00

13 lines
275 B
TypeScript

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