DefinitelyTyped/types/lazypipe/index.d.ts
2017-03-24 14:27:52 -07:00

29 lines
917 B
TypeScript

// 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 types="node"/>
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.
*/
declare function lazypipe(): IPipelineBuilder;
export = lazypipe;