2017-10-26 20:56:01 +00:00
|
|
|
/// <reference types="node" />
|
|
|
|
import * as plugins from './smartrx.plugins';
|
2017-11-01 13:59:28 +00:00
|
|
|
import { Observable } from 'rxjs';
|
2017-10-26 20:56:01 +00:00
|
|
|
import { Objectmap } from 'lik';
|
|
|
|
/**
|
|
|
|
* bundles an observable with an emitter
|
|
|
|
*/
|
|
|
|
export interface ObservableEmitterBundle {
|
|
|
|
observable: plugins.rxjs.Observable<any>;
|
|
|
|
emitter: plugins.events.EventEmitter;
|
|
|
|
event: string;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* manages observables by making sure that only one observable is regsitered per event
|
|
|
|
*/
|
|
|
|
export declare class Observablemap {
|
|
|
|
ObservableEmitterBundleObjectmap: Objectmap<ObservableEmitterBundle>;
|
|
|
|
/**
|
|
|
|
* creates a new observable if not yet registered for the same event.
|
|
|
|
* In case event has been registered before the same observable is returned.
|
|
|
|
*/
|
2017-11-01 13:59:28 +00:00
|
|
|
getObservableForEmitterEvent(emitterArg: plugins.events.EventEmitter, eventArg: string): Observable<any>;
|
2017-10-26 20:56:01 +00:00
|
|
|
}
|