diff --git a/rx.js/rx-lite.d.ts b/rx.js/rx-lite.d.ts index 15767ac61..3bbdc2faa 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 ea5cca99b..b0329b6c3 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 000000000..8dee43a0c --- /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 bf9841b41..d47cc5b75 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 e01b7e34b..cb91342ea 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 736d872e8..36a07a825 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 {