smartstream/dist/index.d.ts

39 lines
901 B
TypeScript
Raw Normal View History

2017-03-04 13:26:10 +00:00
/// <reference types="node" />
import { Transform } from 'stream';
2016-09-25 12:00:16 +00:00
export interface IErrorFunction {
(err: any): any;
2016-09-25 12:00:16 +00:00
}
export interface ICustomEventFunction {
(): any;
}
export interface ICustomEventObject {
eventName: string;
eventFunction: ICustomEventFunction;
}
/**
* class Smartstream handles
*/
2016-09-25 12:00:16 +00:00
export declare class Smartstream {
2016-09-25 14:28:42 +00:00
private streamArray;
private customEventObjectArray;
private streamStartedDeferred;
/**
* constructor
*/
2016-09-25 12:00:16 +00:00
constructor(streamArrayArg: any[]);
/**
* make something with the stream itself
*/
2017-06-30 16:32:32 +00:00
streamStarted(): Promise<any>;
2016-09-25 14:28:42 +00:00
/**
* attach listener to custom event
*/
onCustomEvent(eventNameArg: string, eventFunctionArg: ICustomEventFunction): void;
/**
* run the stream
* @returns Promise
*/
2017-06-30 16:32:32 +00:00
run(): Promise<void>;
2016-09-25 12:00:16 +00:00
}
2017-03-04 13:26:10 +00:00
export declare let cleanPipe: () => Transform;