diff --git a/rx.js/rx-lite.ts b/rx.js/rx-lite.ts index 1e387af48..c0a27c3c4 100644 --- a/rx.js/rx-lite.ts +++ b/rx.js/rx-lite.ts @@ -45,6 +45,19 @@ declare module Rx { export var Promise: { new (resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void): IPromise; }; } + export module helpers { + function noop(): void; + function identity(value: T): T; + function defaultNow(): number; + function defaultComparer(left: any, right: any): boolean; + function defaultSubComparer(left: any, right: any): number; + function defaultKeySerializer(key: any): string; + function defaultError(err: any): void; + function isPromise(p: any): boolean; + function asArray(...args: T[]): T[]; + function not(value: any): boolean; + } + export interface IDisposable { dispose(): void; } @@ -307,6 +320,7 @@ declare module Rx { create(subscribe: (observer: Observer) => IDisposable): Observable; createWithDisposable(subscribe: (observer: Observer) => IDisposable): Observable; defer(observableFactory: () => Observable): Observable; + defer(observableFactory: () => IPromise): Observable; empty(scheduler?: IScheduler): Observable; fromArray(array: T[], scheduler?: IScheduler): Observable; fromArray(array: { length: number;[index: number]: T; }, scheduler?: IScheduler): Observable; @@ -347,9 +361,13 @@ declare module Rx { throwException(exception: any, scheduler?: IScheduler): Observable; // alias for throw catch(sources: Observable[]): Observable; + catch(sources: IPromise[]): Observable; catchException(sources: Observable[]): Observable; // alias for catch + catchException(sources: IPromise[]): Observable; // alias for catch catch(...sources: Observable[]): Observable; + catch(...sources: IPromise[]): Observable; catchException(...sources: Observable[]): Observable; // alias for catch + catchException(...sources: IPromise[]): Observable; // alias for catch concat(...sources: Observable[]): Observable; concat(...sources: IPromise[]): Observable; concat(sources: Observable[]): Observable; diff --git a/rx.js/rx.async.d.ts b/rx.js/rx.async.d.ts index b24191ae4..ff8b61c49 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.17 +// Type definitions for RxJS-Async v2.2.18 // 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 7d7b878fd..4c9a9ae7d 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.15 +// Type definitions for RxJS-BackPressure v2.2.18 // 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 505522e38..526546353 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.17 +// Type definitions for RxJS-Binding v2.2.18 // 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 99bec0f3c..3d9c0e0d5 100644 --- a/rx.js/rx.d.ts +++ b/rx.js/rx.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS v2.2.17 +// Type definitions for RxJS v2.2.18 // Project: http://rx.codeplex.com/ // Definitions by: gsino // Definitions by: Igor Oleinikov diff --git a/rx.js/rx.lite.d.ts b/rx.js/rx.lite.d.ts index c8f99ab5b..a50f8c84d 100644 --- a/rx.js/rx.lite.d.ts +++ b/rx.js/rx.lite.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS-Lite v2.2.17 +// Type definitions for RxJS-Lite v2.2.18 // Project: http://rx.codeplex.com/ // Definitions by: gsino // Definitions by: Igor Oleinikov @@ -47,14 +47,4 @@ declare module Rx { export interface Observable { shareReplay(bufferSize?: number, window?: number, scheduler?: IScheduler): Observable; // same as replayWhileObserved in rx.binding.d.ts } - - export interface ObservableStatic { - generateWithTime( - initialState: TState, - condition: (state: TState) => boolean, - iterate: (state: TState) => TState, - resultSelector: (state: TState) => TResult, - timeSelector: (state: TState) => number, - scheduler?: IScheduler): Observable; - } } diff --git a/rx.js/rx.time-lite.ts b/rx.js/rx.time-lite.ts index 1082f1a7b..b79275fe4 100644 --- a/rx.js/rx.time-lite.ts +++ b/rx.js/rx.time-lite.ts @@ -47,5 +47,12 @@ declare module Rx { interval(dutTime: number, period: number, scheduler?: IScheduler): Observable; timer(dueTime: number, period: number, scheduler: IScheduler): Observable; timer(dueTime: number, scheduler: IScheduler): Observable; + generateWithRelativeTime( + initialState: TState, + condition: (state: TState) => boolean, + iterate: (state: TState) => TState, + resultSelector: (state: TState) => TResult, + timeSelector: (state: TState) => number, + scheduler?: IScheduler): Observable; } } diff --git a/rx.js/rx.time.d.ts b/rx.js/rx.time.d.ts index 994d9bf46..925d16220 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.17 +// Type definitions for RxJS-Time v2.2.18 // Project: http://rx.codeplex.com/ // Definitions by: Carl de Billy // Definitions by: Igor Oleinikov @@ -28,13 +28,5 @@ declare module Rx { resultSelector: (state: TState) => TResult, timeSelector: (state: TState) => Date, scheduler?: IScheduler): Observable; - - generateWithRelativeTime( - initialState: TState, - condition: (state: TState) => boolean, - iterate: (state: TState) => TState, - resultSelector: (state: TState) => TResult, - timeSelector: (state: TState) => number, - scheduler?: IScheduler): Observable; } } diff --git a/rx.js/rx.virtualtime.d.ts b/rx.js/rx.virtualtime.d.ts index afa398264..c57cbd664 100644 --- a/rx.js/rx.virtualtime.d.ts +++ b/rx.js/rx.virtualtime.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS-VirtualTime package 2.2 +// Type definitions for RxJS-VirtualTime package 2.2.18 // Project: http://rx.codeplex.com/ // Definitions by: gsino // Definitions by: Igor Oleinikov