mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Added tests for through
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import through = require('through');
|
||||
|
||||
var i = 0;
|
||||
through(
|
||||
function () {
|
||||
this.queue((i++).toString());
|
||||
}, function () {
|
||||
this.queue(null);
|
||||
}, { autoDestroy: true }).pipe(process.stdout);
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
|
||||
|
||||
declare module "through" {
|
||||
import Stream = require("stream");
|
||||
|
||||
function through(write: (data) => void,
|
||||
end?: () => void,
|
||||
opts?: {
|
||||
autoDestroy: boolean;
|
||||
}): through.ThroughStream;
|
||||
|
||||
module through {
|
||||
export interface ThroughStream extends Stream.ReadWriteStream {
|
||||
autoDestroy: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export = through;
|
||||
}
|
||||
Reference in New Issue
Block a user