mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Add queue method to through.ThroughStream * no encoding arg * formatting * update tsconfig
13 lines
275 B
TypeScript
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);
|