diff --git a/rx.js/rx-lite.d.ts b/rx.js/rx-lite.d.ts index ad30b6e949..c7a1481379 100644 --- a/rx.js/rx-lite.d.ts +++ b/rx.js/rx-lite.d.ts @@ -324,6 +324,16 @@ declare module Rx { * and that at any point in time produces the elements of the most recent inner observable sequence that has been received. */ flatMapLatest(selector: (value: T, index: number, source: Observable) => TResult, thisArg?: any): Observable; // alias for selectSwitch + /** + * Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then + * transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. + * @param selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. + * @param [thisArg] Object to use as this when executing callback. + * @since 2.2.28 + * @returns An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences + * and that at any point in time produces the elements of the most recent inner observable sequence that has been received. + */ + switchMap(selector: (value: T, index: number, source: Observable) => TResult, thisArg?: any): Observable; // alias for selectSwitch skip(count: number): Observable; skipWhile(predicate: (value: T, index: number, source: Observable) => boolean, thisArg?: any): Observable; @@ -352,6 +362,28 @@ 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; }): IPromise; + + // 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>` or `Observable>`. + * @since 2.2.28 + * @returns A exclusive observable with only the results that happen when subscribed. + */ + exclusive(): Observable; + + /** + * Performs a exclusive map 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>` or `Observable>`. + * @since 2.2.28 + * @param selector Selector to invoke for every item in the current subscription. + * @param [thisArg] An optional context to invoke with the selector parameter. + * @returns {An exclusive observable with only the results that happen when subscribed. + */ + exclusiveMap(selector: (value: I, index: number, source: Observable) => R, thisArg?: any): Observable; } interface ObservableStatic { @@ -391,9 +423,33 @@ declare module Rx { fromItreable(iterable: {}, scheduler?: IScheduler): Observable; // todo: can't describe ES6 Iterable via TypeScript type system generate(initialState: TState, condition: (state: TState) => boolean, iterate: (state: TState) => TState, resultSelector: (state: TState) => TResult, scheduler?: IScheduler): Observable; never(): Observable; + + /** + * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. + * + * @example + * var res = Rx.Observable.of(1, 2, 3); + * @since 2.2.28 + * @returns The observable sequence whose elements are pulled from the given arguments. + */ + of(...values: T[]): Observable; + + /** + * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. + * @example + * var res = Rx.Observable.ofWithScheduler(Rx.Scheduler.timeout, 1, 2, 3); + * @since 2.2.28 + * @param [scheduler] A scheduler to use for scheduling the arguments. + * @returns The observable sequence whose elements are pulled from the given arguments. + */ + ofWithScheduler(scheduler?: IScheduler, ...values: T[]): Observable; range(start: number, count: number, scheduler?: IScheduler): Observable; repeat(value: T, repeatCount?: number, scheduler?: IScheduler): Observable; return(value: T, scheduler?: IScheduler): Observable; + /** + * @since 2.2.28 + */ + just(value: T, scheduler?: IScheduler): Observable; // alias for return returnValue(value: T, scheduler?: IScheduler): Observable; // alias for return throw(exception: Error, scheduler?: IScheduler): Observable; throw(exception: any, scheduler?: IScheduler): Observable; diff --git a/rx.js/rx.aggregates.d.ts b/rx.js/rx.aggregates.d.ts index 4ab7355ed1..001d1b9932 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.25 +// Type definitions for RxJS-Aggregates v2.2.28 // Project: http://rx.codeplex.com/ // Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx.all.ts b/rx.js/rx.all.ts index 608605fae5..c546477b80 100644 --- a/rx.js/rx.all.ts +++ b/rx.js/rx.all.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS-All v2.2.25 +// Type definitions for RxJS-All v2.2.28 // Project: http://rx.codeplex.com/ // Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx.async.d.ts b/rx.js/rx.async.d.ts index 14823b948f..9370c828bf 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.25 +// Type definitions for RxJS-Async v2.2.28 // Project: http://rx.codeplex.com/ // Definitions by: zoetrope , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx.backpressure.d.ts b/rx.js/rx.backpressure.d.ts index 5f5013fe13..9c5e8abd50 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.25 +// Type definitions for RxJS-BackPressure v2.2.28 // Project: http://rx.codeplex.com/ // Definitions by: Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx.binding-lite.d.ts b/rx.js/rx.binding-lite.d.ts index e1120e1090..f896e260db 100644 --- a/rx.js/rx.binding-lite.d.ts +++ b/rx.js/rx.binding-lite.d.ts @@ -67,5 +67,6 @@ declare module Rx { shareValue(initialValue: T): Observable; replay(selector?: boolean, bufferSize?: number, window?: number, scheduler?: IScheduler): ConnectableObservable; // hack to catch first omitted parameter replay(selector: (source: ConnectableObservable) => Observable, bufferSize?: number, window?: number, scheduler?: IScheduler): Observable; + shareReplay(bufferSize?: number, window?: number, scheduler?: IScheduler): Observable; } } diff --git a/rx.js/rx.binding.d.ts b/rx.js/rx.binding.d.ts index cf089e43f6..b93411a528 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.25 +// Type definitions for RxJS-Binding v2.2.28 // Project: http://rx.codeplex.com/ // Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -6,12 +6,6 @@ /// /// -declare module Rx { - export interface Observable { - replayWhileObserved(bufferSize?: number, window?: number, scheduler?: IScheduler): Observable; - } -} - declare module "rx.binding" { export = Rx; } \ No newline at end of file diff --git a/rx.js/rx.coincidence.d.ts b/rx.js/rx.coincidence.d.ts index af7acd4de9..87fa6a55b5 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.25 +// Type definitions for RxJS-Coincidence v2.2.28 // Project: http://rx.codeplex.com/ // Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx.d.ts b/rx.js/rx.d.ts index 967b5aefa4..1f26a94a9a 100644 --- a/rx.js/rx.d.ts +++ b/rx.js/rx.d.ts @@ -1,4 +1,4 @@ -// Type definitions for RxJS v2.2.25 +// Type definitions for RxJS v2.2.28 // Project: http://rx.codeplex.com/ // Definitions by: gsino , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx.experimental.d.ts b/rx.js/rx.experimental.d.ts index 885630be25..60aec86e1a 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.25 +// Type definitions for RxJS-Experimental v2.2.28 // 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 9d0d7244fe..929c66a6f1 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.25 +// Type definitions for RxJS-Join v2.2.28 // Project: http://rx.codeplex.com/ // Definitions by: Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx.lite.d.ts b/rx.js/rx.lite.d.ts index ddffc4a164..046ef527d6 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.25 +// Type definitions for RxJS-Lite v2.2.28 // Project: http://rx.codeplex.com/ // Definitions by: gsino , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -43,10 +43,6 @@ declare module Rx { schedulePeriodic(period: number, action: () => void): IDisposable; schedulePeriodicWithState(state: TState, period: number, action: (state: TState) => TState): IDisposable; } - - export interface Observable { - shareReplay(bufferSize?: number, window?: number, scheduler?: IScheduler): Observable; // same as replayWhileObserved in rx.binding.d.ts - } } declare module "rx.lite" { diff --git a/rx.js/rx.testing.d.ts b/rx.js/rx.testing.d.ts index 393061625d..0adc83e506 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.25 +// Type definitions for RxJS-Testing v2.2.28 // 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 ae2408e850..6efd7d9cfc 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.25 +// Type definitions for RxJS-Time v2.2.28 // Project: http://rx.codeplex.com/ // Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/rx.js/rx.virtualtime.d.ts b/rx.js/rx.virtualtime.d.ts index 04de75e944..50a1bb39b7 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.25 +// Type definitions for RxJS-VirtualTime v2.2.28 // Project: http://rx.codeplex.com/ // Definitions by: gsino , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped