2017-06-17 12:44:55 +00:00
|
|
|
/// <reference types="node" />
|
2016-09-22 10:00:33 +00:00
|
|
|
import * as plugins from './lik.plugins';
|
|
|
|
import { Objectmap } from './lik.objectmap';
|
|
|
|
import { Observable } from 'rxjs/Rx';
|
|
|
|
/**
|
|
|
|
* bundles an observable with an emitter
|
|
|
|
*/
|
|
|
|
export interface ObservableEmitterBundle {
|
|
|
|
observable: plugins.rx.Observable<any>;
|
|
|
|
emitter: plugins.events.EventEmitter;
|
|
|
|
event: string;
|
|
|
|
}
|
2016-11-19 22:08:54 +00:00
|
|
|
/**
|
|
|
|
* manages observables by making sure that only one observable is regsitered per event
|
|
|
|
*/
|
2016-09-22 10:00:33 +00:00
|
|
|
export declare class Observablemap {
|
|
|
|
ObservableEmitterBundleObjectmap: Objectmap<ObservableEmitterBundle>;
|
2016-11-19 22:08:54 +00:00
|
|
|
/**
|
|
|
|
* creates a new observable if not yet registered for the same event.
|
|
|
|
* In case event has been registered before the same observable is returned.
|
|
|
|
*/
|
2016-09-22 10:00:33 +00:00
|
|
|
getObservableForEmitterEvent(emitterArg: plugins.events.EventEmitter, eventArg: string): Observable<any>;
|
|
|
|
}
|