From 42207d2410878bccbe65ec731e572ce137036812 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Sun, 18 May 2014 11:56:26 +0400 Subject: [PATCH 1/2] Syncing with RxJS/master (77bfc46) --- rx.js/rx-lite.d.ts | 3 ++- rx.js/rx.aggregates.d.ts | 1 + rx.js/rx.coincidence-lite.d.ts | 32 ++++++++++++++++++++++++++++++++ rx.js/rx.coincidence.d.ts | 1 + rx.js/rx.lite.d.ts | 1 + rx.js/rx.time-lite.d.ts | 2 ++ 6 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 rx.js/rx.coincidence-lite.d.ts diff --git a/rx.js/rx-lite.d.ts b/rx.js/rx-lite.d.ts index 15767ac61f..3bbdc2faad 100644 --- a/rx.js/rx-lite.d.ts +++ b/rx.js/rx-lite.d.ts @@ -196,7 +196,6 @@ declare module Rx { export interface Observable extends IObservable { forEach(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable; // alias for subscribe - finalValue(): Observable; toArray(): Observable; catch(handler: (exception: any) => Observable): Observable; @@ -234,9 +233,11 @@ declare module Rx { mergeAll(): T; mergeObservable(): T; // alias for mergeAll skipUntil(other: Observable): Observable; + skipUntil(other: IPromise): Observable; switch(): T; switchLatest(): T; // alias for switch takeUntil(other: Observable): Observable; + takeUntil(other: IPromise): Observable; zip(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable; zip(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable; zip(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable; diff --git a/rx.js/rx.aggregates.d.ts b/rx.js/rx.aggregates.d.ts index ea5cca99ba..b0329b6c31 100644 --- a/rx.js/rx.aggregates.d.ts +++ b/rx.js/rx.aggregates.d.ts @@ -8,6 +8,7 @@ declare module Rx { export interface Observable { + finalValue(): Observable; aggregate(accumulator: (acc: T, value: T) => T): Observable; aggregate(seed: TAcc, accumulator: (acc: TAcc, value: T) => TAcc): Observable; diff --git a/rx.js/rx.coincidence-lite.d.ts b/rx.js/rx.coincidence-lite.d.ts new file mode 100644 index 0000000000..8dee43a0c6 --- /dev/null +++ b/rx.js/rx.coincidence-lite.d.ts @@ -0,0 +1,32 @@ +// This file contains common part of defintions for rx.time.d.ts and rx.lite.d.ts +// Do not include the file separately. + +/// + +declare module Rx { + + interface Observable { + /** + * Returns a new observable that triggers on the second and subsequent triggerings of the input observable. + * The Nth triggering of the input observable passes the arguments from the N-1th and Nth triggering as a pair. + * The argument passed to the N-1th triggering is held in hidden internal state until the Nth triggering occurs. + * @returns An observable that triggers on successive pairs of observations from the input observable as an array. + */ + pairwise(): Observable; + + /** + * Returns two observables which partition the observations of the source by the given function. + * The first will trigger observations for those values for which the predicate returns true. + * The second will trigger observations for those values where the predicate returns false. + * The predicate is executed once for each subscribed observer. + * Both also propagate all error observations arising from the source and each completes + * when the source completes. + * @param predicate + * The function to determine which output Observable will trigger a particular observation. + * @returns + * An array of observables. The first triggers when the predicate returns true, + * and the second triggers when the predicate returns false. + */ + partition(predicate: (value: T, index: number, source: Observable) => boolean, thisArg: any): Observable[]; + } +} diff --git a/rx.js/rx.coincidence.d.ts b/rx.js/rx.coincidence.d.ts index bf9841b41e..d47cc5b75e 100644 --- a/rx.js/rx.coincidence.d.ts +++ b/rx.js/rx.coincidence.d.ts @@ -5,6 +5,7 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped /// +/// declare module Rx { diff --git a/rx.js/rx.lite.d.ts b/rx.js/rx.lite.d.ts index e01b7e34ba..cb91342ea4 100644 --- a/rx.js/rx.lite.d.ts +++ b/rx.js/rx.lite.d.ts @@ -9,6 +9,7 @@ /// /// /// +/// declare module Rx { export class Scheduler implements IScheduler { diff --git a/rx.js/rx.time-lite.d.ts b/rx.js/rx.time-lite.d.ts index 736d872e87..36a07a8259 100644 --- a/rx.js/rx.time-lite.d.ts +++ b/rx.js/rx.time-lite.d.ts @@ -39,7 +39,9 @@ declare module Rx { skipWithTime(duration: number, scheduler?: IScheduler): Observable; skipUntilWithTime(startTime: Date, scheduler?: IScheduler): Observable; + skipUntilWithTime(duration: number, scheduler?: IScheduler): Observable; takeUntilWithTime(endTime: Date, scheduler?: IScheduler): Observable; + takeUntilWithTime(duration: number, scheduler?: IScheduler): Observable; } interface ObservableStatic { From c1323216677fa557437962a6f4fa51b46cc14cc0 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Thu, 22 May 2014 15:06:28 +0400 Subject: [PATCH 2/2] RxJS: Updated to version 2.2.24 --- rx.js/rx.aggregates.d.ts | 2 +- rx.js/rx.all.ts | 17 +++++++++++++++++ rx.js/rx.async.d.ts | 2 +- rx.js/rx.backpressure.d.ts | 2 +- rx.js/rx.binding.d.ts | 2 +- rx.js/rx.coincidence.d.ts | 2 +- rx.js/rx.d.ts | 2 +- rx.js/rx.experimental.d.ts | 2 +- rx.js/rx.joinpatterns.d.ts | 2 +- rx.js/rx.testing.d.ts | 2 +- rx.js/rx.time.d.ts | 2 +- rx.js/rx.virtualtime.d.ts | 2 +- 12 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 rx.js/rx.all.ts diff --git a/rx.js/rx.aggregates.d.ts b/rx.js/rx.aggregates.d.ts index b0329b6c31..eb80475b1f 100644 --- a/rx.js/rx.aggregates.d.ts +++ b/rx.js/rx.aggregates.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS-Aggregates v2.2.20 +// Type definitions for RxJS-Aggregates v2.2.24 // Project: http://rx.codeplex.com/ // Definitions by: Carl de Billy // Definitions by: Igor Oleinikov diff --git a/rx.js/rx.all.ts b/rx.js/rx.all.ts new file mode 100644 index 0000000000..7180cc292d --- /dev/null +++ b/rx.js/rx.all.ts @@ -0,0 +1,17 @@ +// Type definitions for RxJS-All v2.2.24 +// Project: http://rx.codeplex.com/ +// Definitions by: Carl de Billy +// Definitions by: Igor Oleinikov +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// \ No newline at end of file diff --git a/rx.js/rx.async.d.ts b/rx.js/rx.async.d.ts index 9a03bb33b4..f25a64774d 100644 --- a/rx.js/rx.async.d.ts +++ b/rx.js/rx.async.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS-Async v2.2.20 +// Type definitions for RxJS-Async v2.2.24 // Project: http://rx.codeplex.com/ // Definitions by: zoetrope // Definitions by: Igor Oleinikov diff --git a/rx.js/rx.backpressure.d.ts b/rx.js/rx.backpressure.d.ts index 5ec8c3f91f..0580be7ebd 100644 --- a/rx.js/rx.backpressure.d.ts +++ b/rx.js/rx.backpressure.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS-BackPressure v2.2.20 +// Type definitions for RxJS-BackPressure v2.2.24 // Project: http://rx.codeplex.com/ // Definitions by: Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx.binding.d.ts b/rx.js/rx.binding.d.ts index cf3744c4e2..c74bcf2326 100644 --- a/rx.js/rx.binding.d.ts +++ b/rx.js/rx.binding.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS-Binding v2.2.20 +// Type definitions for RxJS-Binding v2.2.24 // Project: http://rx.codeplex.com/ // Definitions by: Carl de Billy // Definitions by: Igor Oleinikov diff --git a/rx.js/rx.coincidence.d.ts b/rx.js/rx.coincidence.d.ts index d47cc5b75e..5785867419 100644 --- a/rx.js/rx.coincidence.d.ts +++ b/rx.js/rx.coincidence.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS-Coincidence v2.2.20 +// Type definitions for RxJS-Coincidence v2.2.24 // Project: http://rx.codeplex.com/ // Definitions by: Carl de Billy // Definitions by: Igor Oleinikov diff --git a/rx.js/rx.d.ts b/rx.js/rx.d.ts index 1a5d775a5e..768adbd99f 100644 --- a/rx.js/rx.d.ts +++ b/rx.js/rx.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS v2.2.20 +// Type definitions for RxJS v2.2.24 // Project: http://rx.codeplex.com/ // Definitions by: gsino // Definitions by: Igor Oleinikov diff --git a/rx.js/rx.experimental.d.ts b/rx.js/rx.experimental.d.ts index 1b92599446..60d9b9be4e 100644 --- a/rx.js/rx.experimental.d.ts +++ b/rx.js/rx.experimental.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS-Experimental v2.2.20 +// Type definitions for RxJS-Experimental v2.2.24 // Project: https://github.com/Reactive-Extensions/RxJS/ // Definitions by: Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx.joinpatterns.d.ts b/rx.js/rx.joinpatterns.d.ts index bc1ee2e324..82a7891f80 100644 --- a/rx.js/rx.joinpatterns.d.ts +++ b/rx.js/rx.joinpatterns.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS-Join v2.2.20 +// Type definitions for RxJS-Join v2.2.24 // Project: http://rx.codeplex.com/ // Definitions by: Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx.testing.d.ts b/rx.js/rx.testing.d.ts index 082fdba598..725f61feb4 100644 --- a/rx.js/rx.testing.d.ts +++ b/rx.js/rx.testing.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS-Testing v2.2.20 +// Type definitions for RxJS-Testing v2.2.24 // Project: https://github.com/Reactive-Extensions/RxJS/ // Definitions by: Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx.time.d.ts b/rx.js/rx.time.d.ts index 18cccd4d35..048429074b 100644 --- a/rx.js/rx.time.d.ts +++ b/rx.js/rx.time.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS-Time v2.2.20 +// Type definitions for RxJS-Time v2.2.24 // Project: http://rx.codeplex.com/ // Definitions by: Carl de Billy // Definitions by: Igor Oleinikov diff --git a/rx.js/rx.virtualtime.d.ts b/rx.js/rx.virtualtime.d.ts index bba46a761e..328042e360 100644 --- a/rx.js/rx.virtualtime.d.ts +++ b/rx.js/rx.virtualtime.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS-VirtualTime v2.2.20 +// Type definitions for RxJS-VirtualTime v2.2.24 // Project: http://rx.codeplex.com/ // Definitions by: gsino // Definitions by: Igor Oleinikov