2016-09-25 14:10:06 +00:00
|
|
|
/// <reference types="q" />
|
|
|
|
import * as plugins from './smartstream.plugins';
|
2016-09-25 12:00:16 +00:00
|
|
|
export interface IErrorFunction {
|
2016-09-25 14:10:06 +00:00
|
|
|
(err: any): any;
|
2016-09-25 12:00:16 +00:00
|
|
|
}
|
2016-09-25 14:10:06 +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[]);
|
2016-09-25 14:10:06 +00:00
|
|
|
/**
|
|
|
|
* 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;
|
2016-09-25 14:10:06 +00:00
|
|
|
/**
|
|
|
|
* 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;
|