Added exclusive operator.

This commit is contained in:
Igor Oleinikov
2014-07-15 08:51:27 -07:00
parent 436ecfdb3b
commit b5c9860090
+10
View File
@@ -352,6 +352,16 @@ declare module Rx {
* @returns An ES6 compatible promise with the last value from the observable sequence.
*/
toPromise(promiseCtor?: { new (resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void): IPromise<T>; }): IPromise<T>;
// Experimental Flattening
/**
* Performs a exclusive waiting for the first to finish before subscribing to another observable.
* Observables that come in between subscriptions will be dropped on the floor.
* Can be applied on `Observable<Observable<R>>` or `Observable<IPromise<R>>`.
* @returns A exclusive observable with only the results that happen when subscribed.
*/
exclusive<R>(): Observable<T>;
}
interface ObservableStatic {