mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #871 from AndrewGaspar/through
I added definitions 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
+24
@@ -0,0 +1,24 @@
|
||||
// Type definitions for through
|
||||
// Project: https://github.com/dominictarr/through
|
||||
// Definitions by: Andrew Gaspar <https://github.com/AndrewGaspar/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <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