forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lazypipe.d.ts
31 lines (27 loc) · 1 KB
/
lazypipe.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Type definitions for lazypipe
// Project: https://github.com/OverZealous/lazypipe
// Definitions by: Thomas Corbière <https://github.com/tomc974>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts"/>
declare module "lazypipe"
{
interface IPipelineBuilder
{
/**
* Returns a stream where all the internal steps are processed sequentially
* and the final result is passed on.
*/
(): NodeJS.ReadWriteStream;
/**
* Creates a new lazy pipeline with all the previous steps, and the new step added to the end.
* @param fn A stream creation function to call when the pipeline is created later.
* @param args Any remaining arguments are saved and passed into fn when the pipeline is created.
*/
pipe(fn: Function, ...args: any[]): IPipelineBuilder;
}
/**
* Initializes a lazypipe.
*/
function lazypipe(): IPipelineBuilder;
export = lazypipe;
}