smartstream/dist/index.d.ts

39 lines
927 B
TypeScript
Raw Normal View History

/// <reference types="q" />
import * as plugins from './smartstream.plugins';
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
*/
2016-09-25 14:28:42 +00:00
streamStarted(): plugins.q.Promise<any>;
/**
* attach listener to custom event
*/
onCustomEvent(eventNameArg: string, eventFunctionArg: ICustomEventFunction): void;
/**
* run the stream
* @returns Promise
*/
run(): plugins.q.Promise<void>;
2016-09-25 12:00:16 +00:00
}
2017-03-04 12:50:12 +00:00
export declare let cleanPipe: () => void;