Module Rx

Index

Variables

Modules

Interfaces

Classes

Variables

AsyncSubject: AsyncSubject

public asObservable(): Observable

Returns

Observable

public asObserver(): Observer

Returns

Observer

public catch(handler: (exception: any) => Rx.Observable<T>): Observable

Parameters

  • handler: (exception: any) => Rx.Observable<T>

Returns

Observable

public catch(handler: (exception: any) => Rx.IPromise<T>): Observable

Parameters

  • handler: (exception: any) => Rx.IPromise<T>

Returns

Observable

public catch(second: Observable): Observable

Parameters

Returns

Observable

public catchException(handler: (exception: any) => Rx.Observable<T>): Observable

Parameters

  • handler: (exception: any) => Rx.Observable<T>

Returns

Observable

public catchException(handler: (exception: any) => Rx.IPromise<T>): Observable

Parameters

  • handler: (exception: any) => Rx.IPromise<T>

Returns

Observable

public catchException(second: Observable): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: Observable
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public combineLatest(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: IPromise
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public combineLatest(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

  • second: IPromise
  • third: IPromise
  • resultSelector: (v1: T, v2: T2, v3: T3) => TResult

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(souces: Observable[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable

Parameters

  • souces: Observable[]
  • resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult

Returns

Observable

public combineLatest(souces: IPromise[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable

Parameters

  • souces: IPromise[]
  • resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult

Returns

Observable

public concat(sources?: Observable[]): Observable

Parameters

Returns

Observable

public concat(sources?: IPromise[]): Observable

Parameters

Returns

Observable

public concat(sources: Observable[]): Observable

Parameters

Returns

Observable

public concat(sources: IPromise[]): Observable

Parameters

Returns

Observable

public concatAll(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public concatMap(selector: (value: T, index: number) => Rx.Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.Observable<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<R>

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.IPromise<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<R>

Returns

Observable

public concatMap(sequence: Observable): Observable

Parameters

Returns

Observable

public concatObservable(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public controlled(enableQueue?: boolean): ControlledObservable

Attaches a controller to the observable sequence with the ability to queue.

example

var source = Rx.Observable.interval(100).controlled(); source.request(3); // Reads 3 values

Parameters

  • enableQueue?: boolean optional

Returns

ControlledObservable

public delay(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public delaySubscription(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public delayWithSelector(delayDurationSelector: (item: T) => number): Observable

Parameters

  • delayDurationSelector: (item: T) => number

Returns

Observable

public delayWithSelector(subscriptionDelay: number, delayDurationSelector: (item: T) => number): Observable

Parameters

  • subscriptionDelay: number
  • delayDurationSelector: (item: T) => number

Returns

Observable

public dematerialize(): Observable

Returns

Observable

public dispose()

public distinctUntilChanged(skipParameter: boolean, comparer: (x: T, y: T) => boolean): Observable

Parameters

  • skipParameter: boolean
  • comparer: (x: T, y: T) => boolean

Returns

Observable

public distinctUntilChanged(keySelector?: (value: T) => TValue, comparer?: (x: TValue, y: TValue) => boolean): Observable

Parameters

  • keySelector?: (value: T) => TValue optional
  • comparer?: (x: TValue, y: TValue) => boolean optional

Returns

Observable

public do(observer: Observer): Observable

Parameters

Returns

Observable

public do(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

Observable

public doAction(observer: Observer): Observable

Parameters

Returns

Observable

public doAction(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

Observable

public filter(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public finally(action: () => void): Observable

Parameters

  • action: () => void

Returns

Observable

public finallyAction(action: () => void): Observable

Parameters

  • action: () => void

Returns

Observable

public flatMap(selector: (value: T) => Rx.Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public flatMap(selector: (value: T) => Rx.IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public flatMap(selector: (value: T) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TResult>

Returns

Observable

public flatMap(selector: (value: T) => Rx.IPromise<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TResult>

Returns

Observable

public flatMap(other: Observable): Observable

Parameters

Returns

Observable

public flatMap(other: IPromise): Observable

Parameters

Returns

Observable

public flatMapLatest(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

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.

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult

    A transform function to apply to each source element; the second parameter of the function represents the index of the source element.

  • thisArg?: any optional

Returns

Observable

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.

public forEach(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public hasObservers(): boolean

Returns

boolean

public ignoreElements(): Observable

Returns

Observable

public map(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult
  • thisArg?: any optional

Returns

Observable

public materialize(): Observable

Returns

Observable

public merge(maxConcurrent: number): T in Rx.Observable<T>

Parameters

  • maxConcurrent: number

Returns

T in Rx.Observable<T>

public merge(other: Observable): Observable

Parameters

Returns

Observable

public merge(other: IPromise): Observable

Parameters

Returns

Observable

public mergeAll(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public mergeObservable(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public multicast(subject: Observable): ConnectableObservable

Parameters

Returns

ConnectableObservable

public multicast(subjectSelector: () => Rx.ISubject<T>, selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>): Observable

Parameters

  • subjectSelector: () => Rx.ISubject<T>
  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>

Returns

Observable

public onCompleted()

public onError(exception: any)

Parameters

  • exception: any

public onNext(value: T in Rx.IObserver<T>)

Parameters

  • value: T in Rx.IObserver<T>

public pairwise(): 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

Observable

An observable that triggers on successive pairs of observations from the input observable as an array.

public partition(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg: any): 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.

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean

    The function to determine which output Observable will trigger a particular observation.

  • thisArg: any

Returns

Observable[]

An array of observables. The first triggers when the predicate returns true, and the second triggers when the predicate returns false.

public pausable(pauser: Observable): Observable

Pauses the underlying observable sequence based upon the observable sequence which yields true/false.

example

var pauser = new Rx.Subject(); var source = Rx.Observable.interval(100).pausable(pauser);

Parameters

  • pauser: Observable

    The observable sequence used to pause the underlying sequence.

Returns

Observable

The observable sequence which is paused based upon the pauser.

public pausable(pauser?: ISubject): PausableObservable

Parameters

Returns

PausableObservable

public pausableBuffered(pauser?: ISubject): PausableObservable

Pauses the underlying observable sequence based upon the observable sequence which yields true/false, and yields the values that were buffered while paused.

example

var pauser = new Rx.Subject(); var source = Rx.Observable.interval(100).pausableBuffered(pauser);

Parameters

  • pauser?: ISubject optional

    The observable sequence used to pause the underlying sequence.

Returns

PausableObservable

The observable sequence which is paused based upon the pauser.

public publish(): ConnectableObservable

Returns

ConnectableObservable

public publish(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>

Returns

Observable

public publishLast(): ConnectableObservable

Returns

ConnectableObservable

public publishLast(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>

Returns

Observable

public publishValue(initialValue: T in Rx.Observable<T>): ConnectableObservable

Parameters

  • initialValue: T in Rx.Observable<T>

Returns

ConnectableObservable

public publishValue(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>, initialValue: T in Rx.Observable<T>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>
  • initialValue: T in Rx.Observable<T>

Returns

Observable

public repeat(repeatCount?: number): Observable

Parameters

  • repeatCount?: number optional

Returns

Observable

public replay(selector?: boolean, bufferSize?: number, window?: number, scheduler?: IScheduler): ConnectableObservable

Parameters

  • selector?: boolean optional
  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

ConnectableObservable

public replay(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>, bufferSize?: number, window?: number, scheduler?: IScheduler): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>
  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

Observable

public retry(retryCount?: number): Observable

Parameters

  • retryCount?: number optional

Returns

Observable

public sample(interval: number, scheduler?: IScheduler): Observable

Parameters

  • interval: number
  • scheduler?: IScheduler optional

Returns

Observable

public sample(sampler: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public scan(seed: TAcc, accumulator: (acc: TAcc, value: T) => TAcc): Observable

Parameters

  • seed: TAcc
  • accumulator: (acc: TAcc, value: T) => TAcc

Returns

Observable

public scan(accumulator: (acc: T, value: T) => T): Observable

Parameters

  • accumulator: (acc: T, value: T) => T

Returns

Observable

public select(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult
  • thisArg?: any optional

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.Observable<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<R>

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.IPromise<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<R>

Returns

Observable

public selectConcat(sequence: Observable): Observable

Parameters

Returns

Observable

public selectMany(selector: (value: T) => Rx.Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public selectMany(selector: (value: T) => Rx.IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public selectMany(selector: (value: T) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TResult>

Returns

Observable

public selectMany(selector: (value: T) => Rx.IPromise<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TResult>

Returns

Observable

public selectMany(other: Observable): Observable

Parameters

Returns

Observable

public selectMany(other: IPromise): Observable

Parameters

Returns

Observable

public selectSwitch(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

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.

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult

    A transform function to apply to each source element; the second parameter of the function represents the index of the source element.

  • thisArg?: any optional

Returns

Observable

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.

public share(): Observable

Returns an observable sequence that shares a single subscription to the underlying sequence. This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.

example

var res = source.share();

Returns

Observable

An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.

public shareReplay(bufferSize?: number, window?: number, scheduler?: IScheduler): Observable

Parameters

  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

Observable

public shareValue(initialValue: T in Rx.Observable<T>): Observable

Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue. This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.

example

var res = source.shareValue(42);

Parameters

  • initialValue: T in Rx.Observable<T>

    Initial value received by observers upon subscription.

Returns

Observable

An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.

public skip(count: number): Observable

Parameters

  • count: number

Returns

Observable

public skipLast(count: number): Observable

Parameters

  • count: number

Returns

Observable

public skipLastWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public skipUntil(other: Observable): Observable

Parameters

Returns

Observable

public skipUntil(other: IPromise): Observable

Parameters

Returns

Observable

public skipUntilWithTime(startTime: Date, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public skipUntilWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public skipWhile(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public skipWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public startWith(values?: Array<T>): Observable

Parameters

  • values?: Array<T> optional

Returns

Observable

public startWith(scheduler: IScheduler, values?: Array<T>): Observable

Parameters

  • scheduler: IScheduler
  • values?: Array<T> optional

Returns

Observable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public switch(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public switchLatest(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public take(count: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeLast(count: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeLastBuffer(count: number): Observable

Parameters

  • count: number

Returns

Observable

public takeLastBufferWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public takeLastWithTime(duration: number, timerScheduler?: IScheduler, loopScheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeUntil(other: Observable): Observable

Parameters

Returns

Observable

public takeUntil(other: IPromise): Observable

Parameters

Returns

Observable

public takeUntilWithTime(endTime: Date, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeUntilWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public takeWhile(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public takeWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public throttle(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public throttleWithSelector(throttleDurationSelector: (item: T) => Rx.Observable<TTimeout>): Observable

Parameters

  • throttleDurationSelector: (item: T) => Rx.Observable<TTimeout>

Returns

Observable

public timeInterval(scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeout(dueTime: Date, other?: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeout(dueTime: number, other?: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeoutWithSelector(firstTimeout: Observable, timeoutdurationSelector?: (item: T) => Rx.Observable<TTimeout>, other?: Observable): Observable

Parameters

  • firstTimeout: Observable
  • timeoutdurationSelector?: (item: T) => Rx.Observable<TTimeout> optional
  • other?: Observable optional

Returns

Observable

public timestamp(scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public toArray(): Observable

Returns

Observable

public toNotifier(): (notification: Rx.Notification<T>) => void

Returns

(notification: Rx.Notification<T>) => void

public toPromise(promiseCtor: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => TPromise): TPromise

Converts an existing observable sequence to an ES6 Compatible Promise

example

var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);

Parameters

  • promiseCtor: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => TPromise

    The constructor of the promise.

Returns

TPromise

An ES6 compatible promise with the last value from the observable sequence.

public toPromise(promiseCtor?: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => Rx.IPromise<T>): IPromise

Converts an existing observable sequence to an ES6 Compatible Promise

example

var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);

// With config Rx.config.Promise = RSVP.Promise; var promise = Rx.Observable.return(42).toPromise();

Parameters

  • promiseCtor?: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => Rx.IPromise<T> optional

Returns

IPromise

An ES6 compatible promise with the last value from the observable sequence.

public where(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public zip(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: Observable
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public zip(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: IPromise
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public zip(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

  • second: IPromise
  • third: IPromise
  • resultSelector: (v1: T, v2: T2, v3: T3) => TResult

Returns

Observable

public zip(second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable[], resultSelector: (left: T, ...right: TOther[]) => TResult): Observable

Parameters

  • second: Observable[]
  • resultSelector: (left: T, ...right: TOther[]) => TResult

Returns

Observable

public zip(second: IPromise[], resultSelector: (left: T, ...right: TOther[]) => TResult): Observable

Parameters

  • second: IPromise[]
  • resultSelector: (left: T, ...right: TOther[]) => TResult

Returns

Observable

BehaviorSubject: BehaviorSubject

public asObservable(): Observable

Returns

Observable

public asObserver(): Observer

Returns

Observer

public catch(handler: (exception: any) => Rx.Observable<T>): Observable

Parameters

  • handler: (exception: any) => Rx.Observable<T>

Returns

Observable

public catch(handler: (exception: any) => Rx.IPromise<T>): Observable

Parameters

  • handler: (exception: any) => Rx.IPromise<T>

Returns

Observable

public catch(second: Observable): Observable

Parameters

Returns

Observable

public catchException(handler: (exception: any) => Rx.Observable<T>): Observable

Parameters

  • handler: (exception: any) => Rx.Observable<T>

Returns

Observable

public catchException(handler: (exception: any) => Rx.IPromise<T>): Observable

Parameters

  • handler: (exception: any) => Rx.IPromise<T>

Returns

Observable

public catchException(second: Observable): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: Observable
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public combineLatest(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: IPromise
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public combineLatest(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

  • second: IPromise
  • third: IPromise
  • resultSelector: (v1: T, v2: T2, v3: T3) => TResult

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(souces: Observable[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable

Parameters

  • souces: Observable[]
  • resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult

Returns

Observable

public combineLatest(souces: IPromise[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable

Parameters

  • souces: IPromise[]
  • resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult

Returns

Observable

public concat(sources?: Observable[]): Observable

Parameters

Returns

Observable

public concat(sources?: IPromise[]): Observable

Parameters

Returns

Observable

public concat(sources: Observable[]): Observable

Parameters

Returns

Observable

public concat(sources: IPromise[]): Observable

Parameters

Returns

Observable

public concatAll(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public concatMap(selector: (value: T, index: number) => Rx.Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.Observable<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<R>

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.IPromise<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<R>

Returns

Observable

public concatMap(sequence: Observable): Observable

Parameters

Returns

Observable

public concatObservable(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public controlled(enableQueue?: boolean): ControlledObservable

Attaches a controller to the observable sequence with the ability to queue.

example

var source = Rx.Observable.interval(100).controlled(); source.request(3); // Reads 3 values

Parameters

  • enableQueue?: boolean optional

Returns

ControlledObservable

public delay(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public delaySubscription(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public delayWithSelector(delayDurationSelector: (item: T) => number): Observable

Parameters

  • delayDurationSelector: (item: T) => number

Returns

Observable

public delayWithSelector(subscriptionDelay: number, delayDurationSelector: (item: T) => number): Observable

Parameters

  • subscriptionDelay: number
  • delayDurationSelector: (item: T) => number

Returns

Observable

public dematerialize(): Observable

Returns

Observable

public dispose()

public distinctUntilChanged(skipParameter: boolean, comparer: (x: T, y: T) => boolean): Observable

Parameters

  • skipParameter: boolean
  • comparer: (x: T, y: T) => boolean

Returns

Observable

public distinctUntilChanged(keySelector?: (value: T) => TValue, comparer?: (x: TValue, y: TValue) => boolean): Observable

Parameters

  • keySelector?: (value: T) => TValue optional
  • comparer?: (x: TValue, y: TValue) => boolean optional

Returns

Observable

public do(observer: Observer): Observable

Parameters

Returns

Observable

public do(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

Observable

public doAction(observer: Observer): Observable

Parameters

Returns

Observable

public doAction(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

Observable

public filter(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public finally(action: () => void): Observable

Parameters

  • action: () => void

Returns

Observable

public finallyAction(action: () => void): Observable

Parameters

  • action: () => void

Returns

Observable

public flatMap(selector: (value: T) => Rx.Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public flatMap(selector: (value: T) => Rx.IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public flatMap(selector: (value: T) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TResult>

Returns

Observable

public flatMap(selector: (value: T) => Rx.IPromise<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TResult>

Returns

Observable

public flatMap(other: Observable): Observable

Parameters

Returns

Observable

public flatMap(other: IPromise): Observable

Parameters

Returns

Observable

public flatMapLatest(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

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.

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult

    A transform function to apply to each source element; the second parameter of the function represents the index of the source element.

  • thisArg?: any optional

Returns

Observable

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.

public forEach(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public hasObservers(): boolean

Returns

boolean

public ignoreElements(): Observable

Returns

Observable

public map(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult
  • thisArg?: any optional

Returns

Observable

public materialize(): Observable

Returns

Observable

public merge(maxConcurrent: number): T in Rx.Observable<T>

Parameters

  • maxConcurrent: number

Returns

T in Rx.Observable<T>

public merge(other: Observable): Observable

Parameters

Returns

Observable

public merge(other: IPromise): Observable

Parameters

Returns

Observable

public mergeAll(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public mergeObservable(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public multicast(subject: Observable): ConnectableObservable

Parameters

Returns

ConnectableObservable

public multicast(subjectSelector: () => Rx.ISubject<T>, selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>): Observable

Parameters

  • subjectSelector: () => Rx.ISubject<T>
  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>

Returns

Observable

public onCompleted()

public onError(exception: any)

Parameters

  • exception: any

public onNext(value: T in Rx.IObserver<T>)

Parameters

  • value: T in Rx.IObserver<T>

public pairwise(): 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

Observable

An observable that triggers on successive pairs of observations from the input observable as an array.

public partition(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg: any): 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.

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean

    The function to determine which output Observable will trigger a particular observation.

  • thisArg: any

Returns

Observable[]

An array of observables. The first triggers when the predicate returns true, and the second triggers when the predicate returns false.

public pausable(pauser: Observable): Observable

Pauses the underlying observable sequence based upon the observable sequence which yields true/false.

example

var pauser = new Rx.Subject(); var source = Rx.Observable.interval(100).pausable(pauser);

Parameters

  • pauser: Observable

    The observable sequence used to pause the underlying sequence.

Returns

Observable

The observable sequence which is paused based upon the pauser.

public pausable(pauser?: ISubject): PausableObservable

Parameters

Returns

PausableObservable

public pausableBuffered(pauser?: ISubject): PausableObservable

Pauses the underlying observable sequence based upon the observable sequence which yields true/false, and yields the values that were buffered while paused.

example

var pauser = new Rx.Subject(); var source = Rx.Observable.interval(100).pausableBuffered(pauser);

Parameters

  • pauser?: ISubject optional

    The observable sequence used to pause the underlying sequence.

Returns

PausableObservable

The observable sequence which is paused based upon the pauser.

public publish(): ConnectableObservable

Returns

ConnectableObservable

public publish(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>

Returns

Observable

public publishLast(): ConnectableObservable

Returns

ConnectableObservable

public publishLast(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>

Returns

Observable

public publishValue(initialValue: T in Rx.Observable<T>): ConnectableObservable

Parameters

  • initialValue: T in Rx.Observable<T>

Returns

ConnectableObservable

public publishValue(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>, initialValue: T in Rx.Observable<T>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>
  • initialValue: T in Rx.Observable<T>

Returns

Observable

public repeat(repeatCount?: number): Observable

Parameters

  • repeatCount?: number optional

Returns

Observable

public replay(selector?: boolean, bufferSize?: number, window?: number, scheduler?: IScheduler): ConnectableObservable

Parameters

  • selector?: boolean optional
  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

ConnectableObservable

public replay(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>, bufferSize?: number, window?: number, scheduler?: IScheduler): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>
  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

Observable

public retry(retryCount?: number): Observable

Parameters

  • retryCount?: number optional

Returns

Observable

public sample(interval: number, scheduler?: IScheduler): Observable

Parameters

  • interval: number
  • scheduler?: IScheduler optional

Returns

Observable

public sample(sampler: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public scan(seed: TAcc, accumulator: (acc: TAcc, value: T) => TAcc): Observable

Parameters

  • seed: TAcc
  • accumulator: (acc: TAcc, value: T) => TAcc

Returns

Observable

public scan(accumulator: (acc: T, value: T) => T): Observable

Parameters

  • accumulator: (acc: T, value: T) => T

Returns

Observable

public select(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult
  • thisArg?: any optional

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.Observable<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<R>

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.IPromise<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<R>

Returns

Observable

public selectConcat(sequence: Observable): Observable

Parameters

Returns

Observable

public selectMany(selector: (value: T) => Rx.Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public selectMany(selector: (value: T) => Rx.IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public selectMany(selector: (value: T) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TResult>

Returns

Observable

public selectMany(selector: (value: T) => Rx.IPromise<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TResult>

Returns

Observable

public selectMany(other: Observable): Observable

Parameters

Returns

Observable

public selectMany(other: IPromise): Observable

Parameters

Returns

Observable

public selectSwitch(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

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.

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult

    A transform function to apply to each source element; the second parameter of the function represents the index of the source element.

  • thisArg?: any optional

Returns

Observable

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.

public share(): Observable

Returns an observable sequence that shares a single subscription to the underlying sequence. This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.

example

var res = source.share();

Returns

Observable

An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.

public shareReplay(bufferSize?: number, window?: number, scheduler?: IScheduler): Observable

Parameters

  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

Observable

public shareValue(initialValue: T in Rx.Observable<T>): Observable

Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue. This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.

example

var res = source.shareValue(42);

Parameters

  • initialValue: T in Rx.Observable<T>

    Initial value received by observers upon subscription.

Returns

Observable

An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.

public skip(count: number): Observable

Parameters

  • count: number

Returns

Observable

public skipLast(count: number): Observable

Parameters

  • count: number

Returns

Observable

public skipLastWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public skipUntil(other: Observable): Observable

Parameters

Returns

Observable

public skipUntil(other: IPromise): Observable

Parameters

Returns

Observable

public skipUntilWithTime(startTime: Date, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public skipUntilWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public skipWhile(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public skipWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public startWith(values?: Array<T>): Observable

Parameters

  • values?: Array<T> optional

Returns

Observable

public startWith(scheduler: IScheduler, values?: Array<T>): Observable

Parameters

  • scheduler: IScheduler
  • values?: Array<T> optional

Returns

Observable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public switch(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public switchLatest(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public take(count: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeLast(count: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeLastBuffer(count: number): Observable

Parameters

  • count: number

Returns

Observable

public takeLastBufferWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public takeLastWithTime(duration: number, timerScheduler?: IScheduler, loopScheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeUntil(other: Observable): Observable

Parameters

Returns

Observable

public takeUntil(other: IPromise): Observable

Parameters

Returns

Observable

public takeUntilWithTime(endTime: Date, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeUntilWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public takeWhile(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public takeWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public throttle(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public throttleWithSelector(throttleDurationSelector: (item: T) => Rx.Observable<TTimeout>): Observable

Parameters

  • throttleDurationSelector: (item: T) => Rx.Observable<TTimeout>

Returns

Observable

public timeInterval(scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeout(dueTime: Date, other?: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeout(dueTime: number, other?: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeoutWithSelector(firstTimeout: Observable, timeoutdurationSelector?: (item: T) => Rx.Observable<TTimeout>, other?: Observable): Observable

Parameters

  • firstTimeout: Observable
  • timeoutdurationSelector?: (item: T) => Rx.Observable<TTimeout> optional
  • other?: Observable optional

Returns

Observable

public timestamp(scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public toArray(): Observable

Returns

Observable

public toNotifier(): (notification: Rx.Notification<T>) => void

Returns

(notification: Rx.Notification<T>) => void

public toPromise(promiseCtor: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => TPromise): TPromise

Converts an existing observable sequence to an ES6 Compatible Promise

example

var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);

Parameters

  • promiseCtor: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => TPromise

    The constructor of the promise.

Returns

TPromise

An ES6 compatible promise with the last value from the observable sequence.

public toPromise(promiseCtor?: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => Rx.IPromise<T>): IPromise

Converts an existing observable sequence to an ES6 Compatible Promise

example

var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);

// With config Rx.config.Promise = RSVP.Promise; var promise = Rx.Observable.return(42).toPromise();

Parameters

  • promiseCtor?: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => Rx.IPromise<T> optional

Returns

IPromise

An ES6 compatible promise with the last value from the observable sequence.

public where(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public zip(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: Observable
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public zip(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: IPromise
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public zip(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

  • second: IPromise
  • third: IPromise
  • resultSelector: (v1: T, v2: T2, v3: T3) => TResult

Returns

Observable

public zip(second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable[], resultSelector: (left: T, ...right: TOther[]) => TResult): Observable

Parameters

  • second: Observable[]
  • resultSelector: (left: T, ...right: TOther[]) => TResult

Returns

Observable

public zip(second: IPromise[], resultSelector: (left: T, ...right: TOther[]) => TResult): Observable

Parameters

  • second: IPromise[]
  • resultSelector: (left: T, ...right: TOther[]) => TResult

Returns

Observable

ConnectableObservable: ConnectableObservable

public asObservable(): Observable

Returns

Observable

public catch(handler: (exception: any) => Rx.Observable<T>): Observable

Parameters

  • handler: (exception: any) => Rx.Observable<T>

Returns

Observable

public catch(handler: (exception: any) => Rx.IPromise<T>): Observable

Parameters

  • handler: (exception: any) => Rx.IPromise<T>

Returns

Observable

public catch(second: Observable): Observable

Parameters

Returns

Observable

public catchException(handler: (exception: any) => Rx.Observable<T>): Observable

Parameters

  • handler: (exception: any) => Rx.Observable<T>

Returns

Observable

public catchException(handler: (exception: any) => Rx.IPromise<T>): Observable

Parameters

  • handler: (exception: any) => Rx.IPromise<T>

Returns

Observable

public catchException(second: Observable): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: Observable
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public combineLatest(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: IPromise
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public combineLatest(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

  • second: IPromise
  • third: IPromise
  • resultSelector: (v1: T, v2: T2, v3: T3) => TResult

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(souces: Observable[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable

Parameters

  • souces: Observable[]
  • resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult

Returns

Observable

public combineLatest(souces: IPromise[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable

Parameters

  • souces: IPromise[]
  • resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult

Returns

Observable

public concat(sources?: Observable[]): Observable

Parameters

Returns

Observable

public concat(sources?: IPromise[]): Observable

Parameters

Returns

Observable

public concat(sources: Observable[]): Observable

Parameters

Returns

Observable

public concat(sources: IPromise[]): Observable

Parameters

Returns

Observable

public concatAll(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public concatMap(selector: (value: T, index: number) => Rx.Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.Observable<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<R>

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.IPromise<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<R>

Returns

Observable

public concatMap(sequence: Observable): Observable

Parameters

Returns

Observable

public concatObservable(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public connect(): IDisposable

Returns

IDisposable

public controlled(enableQueue?: boolean): ControlledObservable

Attaches a controller to the observable sequence with the ability to queue.

example

var source = Rx.Observable.interval(100).controlled(); source.request(3); // Reads 3 values

Parameters

  • enableQueue?: boolean optional

Returns

ControlledObservable

public delay(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public delaySubscription(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public delayWithSelector(delayDurationSelector: (item: T) => number): Observable

Parameters

  • delayDurationSelector: (item: T) => number

Returns

Observable

public delayWithSelector(subscriptionDelay: number, delayDurationSelector: (item: T) => number): Observable

Parameters

  • subscriptionDelay: number
  • delayDurationSelector: (item: T) => number

Returns

Observable

public dematerialize(): Observable

Returns

Observable

public distinctUntilChanged(skipParameter: boolean, comparer: (x: T, y: T) => boolean): Observable

Parameters

  • skipParameter: boolean
  • comparer: (x: T, y: T) => boolean

Returns

Observable

public distinctUntilChanged(keySelector?: (value: T) => TValue, comparer?: (x: TValue, y: TValue) => boolean): Observable

Parameters

  • keySelector?: (value: T) => TValue optional
  • comparer?: (x: TValue, y: TValue) => boolean optional

Returns

Observable

public do(observer: Observer): Observable

Parameters

Returns

Observable

public do(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

Observable

public doAction(observer: Observer): Observable

Parameters

Returns

Observable

public doAction(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

Observable

public filter(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public finally(action: () => void): Observable

Parameters

  • action: () => void

Returns

Observable

public finallyAction(action: () => void): Observable

Parameters

  • action: () => void

Returns

Observable

public flatMap(selector: (value: T) => Rx.Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public flatMap(selector: (value: T) => Rx.IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public flatMap(selector: (value: T) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TResult>

Returns

Observable

public flatMap(selector: (value: T) => Rx.IPromise<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TResult>

Returns

Observable

public flatMap(other: Observable): Observable

Parameters

Returns

Observable

public flatMap(other: IPromise): Observable

Parameters

Returns

Observable

public flatMapLatest(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

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.

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult

    A transform function to apply to each source element; the second parameter of the function represents the index of the source element.

  • thisArg?: any optional

Returns

Observable

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.

public forEach(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public ignoreElements(): Observable

Returns

Observable

public map(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult
  • thisArg?: any optional

Returns

Observable

public materialize(): Observable

Returns

Observable

public merge(maxConcurrent: number): T in Rx.Observable<T>

Parameters

  • maxConcurrent: number

Returns

T in Rx.Observable<T>

public merge(other: Observable): Observable

Parameters

Returns

Observable

public merge(other: IPromise): Observable

Parameters

Returns

Observable

public mergeAll(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public mergeObservable(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public multicast(subject: Observable): ConnectableObservable

Parameters

Returns

ConnectableObservable

public multicast(subjectSelector: () => Rx.ISubject<T>, selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>): Observable

Parameters

  • subjectSelector: () => Rx.ISubject<T>
  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>

Returns

Observable

public pairwise(): 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

Observable

An observable that triggers on successive pairs of observations from the input observable as an array.

public partition(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg: any): 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.

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean

    The function to determine which output Observable will trigger a particular observation.

  • thisArg: any

Returns

Observable[]

An array of observables. The first triggers when the predicate returns true, and the second triggers when the predicate returns false.

public pausable(pauser: Observable): Observable

Pauses the underlying observable sequence based upon the observable sequence which yields true/false.

example

var pauser = new Rx.Subject(); var source = Rx.Observable.interval(100).pausable(pauser);

Parameters

  • pauser: Observable

    The observable sequence used to pause the underlying sequence.

Returns

Observable

The observable sequence which is paused based upon the pauser.

public pausable(pauser?: ISubject): PausableObservable

Parameters

Returns

PausableObservable

public pausableBuffered(pauser?: ISubject): PausableObservable

Pauses the underlying observable sequence based upon the observable sequence which yields true/false, and yields the values that were buffered while paused.

example

var pauser = new Rx.Subject(); var source = Rx.Observable.interval(100).pausableBuffered(pauser);

Parameters

  • pauser?: ISubject optional

    The observable sequence used to pause the underlying sequence.

Returns

PausableObservable

The observable sequence which is paused based upon the pauser.

public publish(): ConnectableObservable

Returns

ConnectableObservable

public publish(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>

Returns

Observable

public publishLast(): ConnectableObservable

Returns

ConnectableObservable

public publishLast(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>

Returns

Observable

public publishValue(initialValue: T in Rx.Observable<T>): ConnectableObservable

Parameters

  • initialValue: T in Rx.Observable<T>

Returns

ConnectableObservable

public publishValue(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>, initialValue: T in Rx.Observable<T>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>
  • initialValue: T in Rx.Observable<T>

Returns

Observable

public refCount(): Observable

Returns

Observable

public repeat(repeatCount?: number): Observable

Parameters

  • repeatCount?: number optional

Returns

Observable

public replay(selector?: boolean, bufferSize?: number, window?: number, scheduler?: IScheduler): ConnectableObservable

Parameters

  • selector?: boolean optional
  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

ConnectableObservable

public replay(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>, bufferSize?: number, window?: number, scheduler?: IScheduler): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>
  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

Observable

public retry(retryCount?: number): Observable

Parameters

  • retryCount?: number optional

Returns

Observable

public sample(interval: number, scheduler?: IScheduler): Observable

Parameters

  • interval: number
  • scheduler?: IScheduler optional

Returns

Observable

public sample(sampler: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public scan(seed: TAcc, accumulator: (acc: TAcc, value: T) => TAcc): Observable

Parameters

  • seed: TAcc
  • accumulator: (acc: TAcc, value: T) => TAcc

Returns

Observable

public scan(accumulator: (acc: T, value: T) => T): Observable

Parameters

  • accumulator: (acc: T, value: T) => T

Returns

Observable

public select(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult
  • thisArg?: any optional

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.Observable<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<R>

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.IPromise<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<R>

Returns

Observable

public selectConcat(sequence: Observable): Observable

Parameters

Returns

Observable

public selectMany(selector: (value: T) => Rx.Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public selectMany(selector: (value: T) => Rx.IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public selectMany(selector: (value: T) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TResult>

Returns

Observable

public selectMany(selector: (value: T) => Rx.IPromise<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TResult>

Returns

Observable

public selectMany(other: Observable): Observable

Parameters

Returns

Observable

public selectMany(other: IPromise): Observable

Parameters

Returns

Observable

public selectSwitch(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

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.

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult

    A transform function to apply to each source element; the second parameter of the function represents the index of the source element.

  • thisArg?: any optional

Returns

Observable

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.

public share(): Observable

Returns an observable sequence that shares a single subscription to the underlying sequence. This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.

example

var res = source.share();

Returns

Observable

An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.

public shareReplay(bufferSize?: number, window?: number, scheduler?: IScheduler): Observable

Parameters

  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

Observable

public shareValue(initialValue: T in Rx.Observable<T>): Observable

Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue. This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.

example

var res = source.shareValue(42);

Parameters

  • initialValue: T in Rx.Observable<T>

    Initial value received by observers upon subscription.

Returns

Observable

An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.

public skip(count: number): Observable

Parameters

  • count: number

Returns

Observable

public skipLast(count: number): Observable

Parameters

  • count: number

Returns

Observable

public skipLastWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public skipUntil(other: Observable): Observable

Parameters

Returns

Observable

public skipUntil(other: IPromise): Observable

Parameters

Returns

Observable

public skipUntilWithTime(startTime: Date, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public skipUntilWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public skipWhile(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public skipWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public startWith(values?: Array<T>): Observable

Parameters

  • values?: Array<T> optional

Returns

Observable

public startWith(scheduler: IScheduler, values?: Array<T>): Observable

Parameters

  • scheduler: IScheduler
  • values?: Array<T> optional

Returns

Observable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public switch(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public switchLatest(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public take(count: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeLast(count: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeLastBuffer(count: number): Observable

Parameters

  • count: number

Returns

Observable

public takeLastBufferWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public takeLastWithTime(duration: number, timerScheduler?: IScheduler, loopScheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeUntil(other: Observable): Observable

Parameters

Returns

Observable

public takeUntil(other: IPromise): Observable

Parameters

Returns

Observable

public takeUntilWithTime(endTime: Date, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeUntilWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public takeWhile(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public takeWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public throttle(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public throttleWithSelector(throttleDurationSelector: (item: T) => Rx.Observable<TTimeout>): Observable

Parameters

  • throttleDurationSelector: (item: T) => Rx.Observable<TTimeout>

Returns

Observable

public timeInterval(scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeout(dueTime: Date, other?: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeout(dueTime: number, other?: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeoutWithSelector(firstTimeout: Observable, timeoutdurationSelector?: (item: T) => Rx.Observable<TTimeout>, other?: Observable): Observable

Parameters

  • firstTimeout: Observable
  • timeoutdurationSelector?: (item: T) => Rx.Observable<TTimeout> optional
  • other?: Observable optional

Returns

Observable

public timestamp(scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public toArray(): Observable

Returns

Observable

public toPromise(promiseCtor: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => TPromise): TPromise

Converts an existing observable sequence to an ES6 Compatible Promise

example

var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);

Parameters

  • promiseCtor: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => TPromise

    The constructor of the promise.

Returns

TPromise

An ES6 compatible promise with the last value from the observable sequence.

public toPromise(promiseCtor?: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => Rx.IPromise<T>): IPromise

Converts an existing observable sequence to an ES6 Compatible Promise

example

var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);

// With config Rx.config.Promise = RSVP.Promise; var promise = Rx.Observable.return(42).toPromise();

Parameters

  • promiseCtor?: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => Rx.IPromise<T> optional

Returns

IPromise

An ES6 compatible promise with the last value from the observable sequence.

public where(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public zip(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: Observable
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public zip(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: IPromise
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public zip(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

  • second: IPromise
  • third: IPromise
  • resultSelector: (v1: T, v2: T2, v3: T3) => TResult

Returns

Observable

public zip(second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable[], resultSelector: (left: T, ...right: TOther[]) => TResult): Observable

Parameters

  • second: Observable[]
  • resultSelector: (left: T, ...right: TOther[]) => TResult

Returns

Observable

public zip(second: IPromise[], resultSelector: (left: T, ...right: TOther[]) => TResult): Observable

Parameters

  • second: IPromise[]
  • resultSelector: (left: T, ...right: TOther[]) => TResult

Returns

Observable

Observer: Observer

public asObserver(): Observer

Returns

Observer

public onCompleted()

public onError(exception: any)

Parameters

  • exception: any

public onNext(value: T in Rx.IObserver<T>)

Parameters

  • value: T in Rx.IObserver<T>

public toNotifier(): (notification: Rx.Notification<T>) => void

Returns

(notification: Rx.Notification<T>) => void

ReplaySubject: ReplaySubject

public asObservable(): Observable

Returns

Observable

public asObserver(): Observer

Returns

Observer

public catch(handler: (exception: any) => Rx.Observable<T>): Observable

Parameters

  • handler: (exception: any) => Rx.Observable<T>

Returns

Observable

public catch(handler: (exception: any) => Rx.IPromise<T>): Observable

Parameters

  • handler: (exception: any) => Rx.IPromise<T>

Returns

Observable

public catch(second: Observable): Observable

Parameters

Returns

Observable

public catchException(handler: (exception: any) => Rx.Observable<T>): Observable

Parameters

  • handler: (exception: any) => Rx.Observable<T>

Returns

Observable

public catchException(handler: (exception: any) => Rx.IPromise<T>): Observable

Parameters

  • handler: (exception: any) => Rx.IPromise<T>

Returns

Observable

public catchException(second: Observable): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: Observable
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public combineLatest(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: IPromise
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public combineLatest(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

  • second: IPromise
  • third: IPromise
  • resultSelector: (v1: T, v2: T2, v3: T3) => TResult

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(souces: Observable[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable

Parameters

  • souces: Observable[]
  • resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult

Returns

Observable

public combineLatest(souces: IPromise[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable

Parameters

  • souces: IPromise[]
  • resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult

Returns

Observable

public concat(sources?: Observable[]): Observable

Parameters

Returns

Observable

public concat(sources?: IPromise[]): Observable

Parameters

Returns

Observable

public concat(sources: Observable[]): Observable

Parameters

Returns

Observable

public concat(sources: IPromise[]): Observable

Parameters

Returns

Observable

public concatAll(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public concatMap(selector: (value: T, index: number) => Rx.Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.Observable<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<R>

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.IPromise<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<R>

Returns

Observable

public concatMap(sequence: Observable): Observable

Parameters

Returns

Observable

public concatObservable(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public controlled(enableQueue?: boolean): ControlledObservable

Attaches a controller to the observable sequence with the ability to queue.

example

var source = Rx.Observable.interval(100).controlled(); source.request(3); // Reads 3 values

Parameters

  • enableQueue?: boolean optional

Returns

ControlledObservable

public delay(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public delaySubscription(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public delayWithSelector(delayDurationSelector: (item: T) => number): Observable

Parameters

  • delayDurationSelector: (item: T) => number

Returns

Observable

public delayWithSelector(subscriptionDelay: number, delayDurationSelector: (item: T) => number): Observable

Parameters

  • subscriptionDelay: number
  • delayDurationSelector: (item: T) => number

Returns

Observable

public dematerialize(): Observable

Returns

Observable

public dispose()

public distinctUntilChanged(skipParameter: boolean, comparer: (x: T, y: T) => boolean): Observable

Parameters

  • skipParameter: boolean
  • comparer: (x: T, y: T) => boolean

Returns

Observable

public distinctUntilChanged(keySelector?: (value: T) => TValue, comparer?: (x: TValue, y: TValue) => boolean): Observable

Parameters

  • keySelector?: (value: T) => TValue optional
  • comparer?: (x: TValue, y: TValue) => boolean optional

Returns

Observable

public do(observer: Observer): Observable

Parameters

Returns

Observable

public do(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

Observable

public doAction(observer: Observer): Observable

Parameters

Returns

Observable

public doAction(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

Observable

public filter(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public finally(action: () => void): Observable

Parameters

  • action: () => void

Returns

Observable

public finallyAction(action: () => void): Observable

Parameters

  • action: () => void

Returns

Observable

public flatMap(selector: (value: T) => Rx.Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public flatMap(selector: (value: T) => Rx.IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public flatMap(selector: (value: T) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TResult>

Returns

Observable

public flatMap(selector: (value: T) => Rx.IPromise<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TResult>

Returns

Observable

public flatMap(other: Observable): Observable

Parameters

Returns

Observable

public flatMap(other: IPromise): Observable

Parameters

Returns

Observable

public flatMapLatest(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

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.

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult

    A transform function to apply to each source element; the second parameter of the function represents the index of the source element.

  • thisArg?: any optional

Returns

Observable

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.

public forEach(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public hasObservers(): boolean

Returns

boolean

public ignoreElements(): Observable

Returns

Observable

public map(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult
  • thisArg?: any optional

Returns

Observable

public materialize(): Observable

Returns

Observable

public merge(maxConcurrent: number): T in Rx.Observable<T>

Parameters

  • maxConcurrent: number

Returns

T in Rx.Observable<T>

public merge(other: Observable): Observable

Parameters

Returns

Observable

public merge(other: IPromise): Observable

Parameters

Returns

Observable

public mergeAll(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public mergeObservable(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public multicast(subject: Observable): ConnectableObservable

Parameters

Returns

ConnectableObservable

public multicast(subjectSelector: () => Rx.ISubject<T>, selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>): Observable

Parameters

  • subjectSelector: () => Rx.ISubject<T>
  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>

Returns

Observable

public onCompleted()

public onError(exception: any)

Parameters

  • exception: any

public onNext(value: T in Rx.IObserver<T>)

Parameters

  • value: T in Rx.IObserver<T>

public pairwise(): 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

Observable

An observable that triggers on successive pairs of observations from the input observable as an array.

public partition(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg: any): 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.

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean

    The function to determine which output Observable will trigger a particular observation.

  • thisArg: any

Returns

Observable[]

An array of observables. The first triggers when the predicate returns true, and the second triggers when the predicate returns false.

public pausable(pauser: Observable): Observable

Pauses the underlying observable sequence based upon the observable sequence which yields true/false.

example

var pauser = new Rx.Subject(); var source = Rx.Observable.interval(100).pausable(pauser);

Parameters

  • pauser: Observable

    The observable sequence used to pause the underlying sequence.

Returns

Observable

The observable sequence which is paused based upon the pauser.

public pausable(pauser?: ISubject): PausableObservable

Parameters

Returns

PausableObservable

public pausableBuffered(pauser?: ISubject): PausableObservable

Pauses the underlying observable sequence based upon the observable sequence which yields true/false, and yields the values that were buffered while paused.

example

var pauser = new Rx.Subject(); var source = Rx.Observable.interval(100).pausableBuffered(pauser);

Parameters

  • pauser?: ISubject optional

    The observable sequence used to pause the underlying sequence.

Returns

PausableObservable

The observable sequence which is paused based upon the pauser.

public publish(): ConnectableObservable

Returns

ConnectableObservable

public publish(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>

Returns

Observable

public publishLast(): ConnectableObservable

Returns

ConnectableObservable

public publishLast(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>

Returns

Observable

public publishValue(initialValue: T in Rx.Observable<T>): ConnectableObservable

Parameters

  • initialValue: T in Rx.Observable<T>

Returns

ConnectableObservable

public publishValue(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>, initialValue: T in Rx.Observable<T>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>
  • initialValue: T in Rx.Observable<T>

Returns

Observable

public repeat(repeatCount?: number): Observable

Parameters

  • repeatCount?: number optional

Returns

Observable

public replay(selector?: boolean, bufferSize?: number, window?: number, scheduler?: IScheduler): ConnectableObservable

Parameters

  • selector?: boolean optional
  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

ConnectableObservable

public replay(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>, bufferSize?: number, window?: number, scheduler?: IScheduler): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>
  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

Observable

public retry(retryCount?: number): Observable

Parameters

  • retryCount?: number optional

Returns

Observable

public sample(interval: number, scheduler?: IScheduler): Observable

Parameters

  • interval: number
  • scheduler?: IScheduler optional

Returns

Observable

public sample(sampler: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public scan(seed: TAcc, accumulator: (acc: TAcc, value: T) => TAcc): Observable

Parameters

  • seed: TAcc
  • accumulator: (acc: TAcc, value: T) => TAcc

Returns

Observable

public scan(accumulator: (acc: T, value: T) => T): Observable

Parameters

  • accumulator: (acc: T, value: T) => T

Returns

Observable

public select(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult
  • thisArg?: any optional

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.Observable<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<R>

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.IPromise<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<R>

Returns

Observable

public selectConcat(sequence: Observable): Observable

Parameters

Returns

Observable

public selectMany(selector: (value: T) => Rx.Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public selectMany(selector: (value: T) => Rx.IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public selectMany(selector: (value: T) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TResult>

Returns

Observable

public selectMany(selector: (value: T) => Rx.IPromise<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TResult>

Returns

Observable

public selectMany(other: Observable): Observable

Parameters

Returns

Observable

public selectMany(other: IPromise): Observable

Parameters

Returns

Observable

public selectSwitch(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

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.

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult

    A transform function to apply to each source element; the second parameter of the function represents the index of the source element.

  • thisArg?: any optional

Returns

Observable

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.

public share(): Observable

Returns an observable sequence that shares a single subscription to the underlying sequence. This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.

example

var res = source.share();

Returns

Observable

An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.

public shareReplay(bufferSize?: number, window?: number, scheduler?: IScheduler): Observable

Parameters

  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

Observable

public shareValue(initialValue: T in Rx.Observable<T>): Observable

Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue. This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.

example

var res = source.shareValue(42);

Parameters

  • initialValue: T in Rx.Observable<T>

    Initial value received by observers upon subscription.

Returns

Observable

An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.

public skip(count: number): Observable

Parameters

  • count: number

Returns

Observable

public skipLast(count: number): Observable

Parameters

  • count: number

Returns

Observable

public skipLastWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public skipUntil(other: Observable): Observable

Parameters

Returns

Observable

public skipUntil(other: IPromise): Observable

Parameters

Returns

Observable

public skipUntilWithTime(startTime: Date, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public skipUntilWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public skipWhile(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public skipWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public startWith(values?: Array<T>): Observable

Parameters

  • values?: Array<T> optional

Returns

Observable

public startWith(scheduler: IScheduler, values?: Array<T>): Observable

Parameters

  • scheduler: IScheduler
  • values?: Array<T> optional

Returns

Observable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public switch(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public switchLatest(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public take(count: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeLast(count: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeLastBuffer(count: number): Observable

Parameters

  • count: number

Returns

Observable

public takeLastBufferWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public takeLastWithTime(duration: number, timerScheduler?: IScheduler, loopScheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeUntil(other: Observable): Observable

Parameters

Returns

Observable

public takeUntil(other: IPromise): Observable

Parameters

Returns

Observable

public takeUntilWithTime(endTime: Date, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeUntilWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public takeWhile(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public takeWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public throttle(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public throttleWithSelector(throttleDurationSelector: (item: T) => Rx.Observable<TTimeout>): Observable

Parameters

  • throttleDurationSelector: (item: T) => Rx.Observable<TTimeout>

Returns

Observable

public timeInterval(scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeout(dueTime: Date, other?: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeout(dueTime: number, other?: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeoutWithSelector(firstTimeout: Observable, timeoutdurationSelector?: (item: T) => Rx.Observable<TTimeout>, other?: Observable): Observable

Parameters

  • firstTimeout: Observable
  • timeoutdurationSelector?: (item: T) => Rx.Observable<TTimeout> optional
  • other?: Observable optional

Returns

Observable

public timestamp(scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public toArray(): Observable

Returns

Observable

public toNotifier(): (notification: Rx.Notification<T>) => void

Returns

(notification: Rx.Notification<T>) => void

public toPromise(promiseCtor: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => TPromise): TPromise

Converts an existing observable sequence to an ES6 Compatible Promise

example

var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);

Parameters

  • promiseCtor: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => TPromise

    The constructor of the promise.

Returns

TPromise

An ES6 compatible promise with the last value from the observable sequence.

public toPromise(promiseCtor?: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => Rx.IPromise<T>): IPromise

Converts an existing observable sequence to an ES6 Compatible Promise

example

var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);

// With config Rx.config.Promise = RSVP.Promise; var promise = Rx.Observable.return(42).toPromise();

Parameters

  • promiseCtor?: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => Rx.IPromise<T> optional

Returns

IPromise

An ES6 compatible promise with the last value from the observable sequence.

public where(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public zip(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: Observable
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public zip(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: IPromise
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public zip(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

  • second: IPromise
  • third: IPromise
  • resultSelector: (v1: T, v2: T2, v3: T3) => TResult

Returns

Observable

public zip(second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable[], resultSelector: (left: T, ...right: TOther[]) => TResult): Observable

Parameters

  • second: Observable[]
  • resultSelector: (left: T, ...right: TOther[]) => TResult

Returns

Observable

public zip(second: IPromise[], resultSelector: (left: T, ...right: TOther[]) => TResult): Observable

Parameters

  • second: IPromise[]
  • resultSelector: (left: T, ...right: TOther[]) => TResult

Returns

Observable

Subject: Subject

public asObservable(): Observable

Returns

Observable

public asObserver(): Observer

Returns

Observer

public catch(handler: (exception: any) => Rx.Observable<T>): Observable

Parameters

  • handler: (exception: any) => Rx.Observable<T>

Returns

Observable

public catch(handler: (exception: any) => Rx.IPromise<T>): Observable

Parameters

  • handler: (exception: any) => Rx.IPromise<T>

Returns

Observable

public catch(second: Observable): Observable

Parameters

Returns

Observable

public catchException(handler: (exception: any) => Rx.Observable<T>): Observable

Parameters

  • handler: (exception: any) => Rx.Observable<T>

Returns

Observable

public catchException(handler: (exception: any) => Rx.IPromise<T>): Observable

Parameters

  • handler: (exception: any) => Rx.IPromise<T>

Returns

Observable

public catchException(second: Observable): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: Observable
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public combineLatest(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: IPromise
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public combineLatest(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

  • second: IPromise
  • third: IPromise
  • resultSelector: (v1: T, v2: T2, v3: T3) => TResult

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable

Parameters

Returns

Observable

public combineLatest(souces: Observable[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable

Parameters

  • souces: Observable[]
  • resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult

Returns

Observable

public combineLatest(souces: IPromise[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult): Observable

Parameters

  • souces: IPromise[]
  • resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult

Returns

Observable

public concat(sources?: Observable[]): Observable

Parameters

Returns

Observable

public concat(sources?: IPromise[]): Observable

Parameters

Returns

Observable

public concat(sources: Observable[]): Observable

Parameters

Returns

Observable

public concat(sources: IPromise[]): Observable

Parameters

Returns

Observable

public concatAll(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public concatMap(selector: (value: T, index: number) => Rx.Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.Observable<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<R>

Returns

Observable

public concatMap(selector: (value: T, index: number) => Rx.IPromise<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<R>

Returns

Observable

public concatMap(sequence: Observable): Observable

Parameters

Returns

Observable

public concatObservable(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public controlled(enableQueue?: boolean): ControlledObservable

Attaches a controller to the observable sequence with the ability to queue.

example

var source = Rx.Observable.interval(100).controlled(); source.request(3); // Reads 3 values

Parameters

  • enableQueue?: boolean optional

Returns

ControlledObservable

public delay(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public delaySubscription(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public delayWithSelector(delayDurationSelector: (item: T) => number): Observable

Parameters

  • delayDurationSelector: (item: T) => number

Returns

Observable

public delayWithSelector(subscriptionDelay: number, delayDurationSelector: (item: T) => number): Observable

Parameters

  • subscriptionDelay: number
  • delayDurationSelector: (item: T) => number

Returns

Observable

public dematerialize(): Observable

Returns

Observable

public dispose()

public distinctUntilChanged(skipParameter: boolean, comparer: (x: T, y: T) => boolean): Observable

Parameters

  • skipParameter: boolean
  • comparer: (x: T, y: T) => boolean

Returns

Observable

public distinctUntilChanged(keySelector?: (value: T) => TValue, comparer?: (x: TValue, y: TValue) => boolean): Observable

Parameters

  • keySelector?: (value: T) => TValue optional
  • comparer?: (x: TValue, y: TValue) => boolean optional

Returns

Observable

public do(observer: Observer): Observable

Parameters

Returns

Observable

public do(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

Observable

public doAction(observer: Observer): Observable

Parameters

Returns

Observable

public doAction(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): Observable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

Observable

public filter(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public finally(action: () => void): Observable

Parameters

  • action: () => void

Returns

Observable

public finallyAction(action: () => void): Observable

Parameters

  • action: () => void

Returns

Observable

public flatMap(selector: (value: T) => Rx.Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public flatMap(selector: (value: T) => Rx.IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public flatMap(selector: (value: T) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TResult>

Returns

Observable

public flatMap(selector: (value: T) => Rx.IPromise<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TResult>

Returns

Observable

public flatMap(other: Observable): Observable

Parameters

Returns

Observable

public flatMap(other: IPromise): Observable

Parameters

Returns

Observable

public flatMapLatest(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

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.

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult

    A transform function to apply to each source element; the second parameter of the function represents the index of the source element.

  • thisArg?: any optional

Returns

Observable

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.

public forEach(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public hasObservers(): boolean

Returns

boolean

public ignoreElements(): Observable

Returns

Observable

public map(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult
  • thisArg?: any optional

Returns

Observable

public materialize(): Observable

Returns

Observable

public merge(maxConcurrent: number): T in Rx.Observable<T>

Parameters

  • maxConcurrent: number

Returns

T in Rx.Observable<T>

public merge(other: Observable): Observable

Parameters

Returns

Observable

public merge(other: IPromise): Observable

Parameters

Returns

Observable

public mergeAll(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public mergeObservable(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public multicast(subject: Observable): ConnectableObservable

Parameters

Returns

ConnectableObservable

public multicast(subjectSelector: () => Rx.ISubject<T>, selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>): Observable

Parameters

  • subjectSelector: () => Rx.ISubject<T>
  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>

Returns

Observable

public onCompleted()

public onError(exception: any)

Parameters

  • exception: any

public onNext(value: T in Rx.IObserver<T>)

Parameters

  • value: T in Rx.IObserver<T>

public pairwise(): 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

Observable

An observable that triggers on successive pairs of observations from the input observable as an array.

public partition(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg: any): 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.

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean

    The function to determine which output Observable will trigger a particular observation.

  • thisArg: any

Returns

Observable[]

An array of observables. The first triggers when the predicate returns true, and the second triggers when the predicate returns false.

public pausable(pauser: Observable): Observable

Pauses the underlying observable sequence based upon the observable sequence which yields true/false.

example

var pauser = new Rx.Subject(); var source = Rx.Observable.interval(100).pausable(pauser);

Parameters

  • pauser: Observable

    The observable sequence used to pause the underlying sequence.

Returns

Observable

The observable sequence which is paused based upon the pauser.

public pausable(pauser?: ISubject): PausableObservable

Parameters

Returns

PausableObservable

public pausableBuffered(pauser?: ISubject): PausableObservable

Pauses the underlying observable sequence based upon the observable sequence which yields true/false, and yields the values that were buffered while paused.

example

var pauser = new Rx.Subject(); var source = Rx.Observable.interval(100).pausableBuffered(pauser);

Parameters

  • pauser?: ISubject optional

    The observable sequence used to pause the underlying sequence.

Returns

PausableObservable

The observable sequence which is paused based upon the pauser.

public publish(): ConnectableObservable

Returns

ConnectableObservable

public publish(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>

Returns

Observable

public publishLast(): ConnectableObservable

Returns

ConnectableObservable

public publishLast(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>

Returns

Observable

public publishValue(initialValue: T in Rx.Observable<T>): ConnectableObservable

Parameters

  • initialValue: T in Rx.Observable<T>

Returns

ConnectableObservable

public publishValue(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>, initialValue: T in Rx.Observable<T>): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<TResult>
  • initialValue: T in Rx.Observable<T>

Returns

Observable

public repeat(repeatCount?: number): Observable

Parameters

  • repeatCount?: number optional

Returns

Observable

public replay(selector?: boolean, bufferSize?: number, window?: number, scheduler?: IScheduler): ConnectableObservable

Parameters

  • selector?: boolean optional
  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

ConnectableObservable

public replay(selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>, bufferSize?: number, window?: number, scheduler?: IScheduler): Observable

Parameters

  • selector: (source: Rx.ConnectableObservable<T>) => Rx.Observable<T>
  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

Observable

public retry(retryCount?: number): Observable

Parameters

  • retryCount?: number optional

Returns

Observable

public sample(interval: number, scheduler?: IScheduler): Observable

Parameters

  • interval: number
  • scheduler?: IScheduler optional

Returns

Observable

public sample(sampler: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public scan(seed: TAcc, accumulator: (acc: TAcc, value: T) => TAcc): Observable

Parameters

  • seed: TAcc
  • accumulator: (acc: TAcc, value: T) => TAcc

Returns

Observable

public scan(accumulator: (acc: T, value: T) => T): Observable

Parameters

  • accumulator: (acc: T, value: T) => T

Returns

Observable

public select(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult
  • thisArg?: any optional

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<T2>
  • resultSelector: (value1: T, value2: T2, index: number) => R

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.Observable<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.Observable<R>

Returns

Observable

public selectConcat(selector: (value: T, index: number) => Rx.IPromise<R>): Observable

Parameters

  • selector: (value: T, index: number) => Rx.IPromise<R>

Returns

Observable

public selectConcat(sequence: Observable): Observable

Parameters

Returns

Observable

public selectMany(selector: (value: T) => Rx.Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public selectMany(selector: (value: T) => Rx.IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TOther>
  • resultSelector: (item: T, other: TOther) => TResult

Returns

Observable

public selectMany(selector: (value: T) => Rx.Observable<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.Observable<TResult>

Returns

Observable

public selectMany(selector: (value: T) => Rx.IPromise<TResult>): Observable

Parameters

  • selector: (value: T) => Rx.IPromise<TResult>

Returns

Observable

public selectMany(other: Observable): Observable

Parameters

Returns

Observable

public selectMany(other: IPromise): Observable

Parameters

Returns

Observable

public selectSwitch(selector: (value: T, index: number, source: Rx.Observable<T>) => TResult, thisArg?: any): Observable

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.

Parameters

  • selector: (value: T, index: number, source: Rx.Observable<T>) => TResult

    A transform function to apply to each source element; the second parameter of the function represents the index of the source element.

  • thisArg?: any optional

Returns

Observable

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.

public share(): Observable

Returns an observable sequence that shares a single subscription to the underlying sequence. This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.

example

var res = source.share();

Returns

Observable

An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.

public shareReplay(bufferSize?: number, window?: number, scheduler?: IScheduler): Observable

Parameters

  • bufferSize?: number optional
  • window?: number optional
  • scheduler?: IScheduler optional

Returns

Observable

public shareValue(initialValue: T in Rx.Observable<T>): Observable

Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue. This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.

example

var res = source.shareValue(42);

Parameters

  • initialValue: T in Rx.Observable<T>

    Initial value received by observers upon subscription.

Returns

Observable

An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.

public skip(count: number): Observable

Parameters

  • count: number

Returns

Observable

public skipLast(count: number): Observable

Parameters

  • count: number

Returns

Observable

public skipLastWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public skipUntil(other: Observable): Observable

Parameters

Returns

Observable

public skipUntil(other: IPromise): Observable

Parameters

Returns

Observable

public skipUntilWithTime(startTime: Date, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public skipUntilWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public skipWhile(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public skipWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public startWith(values?: Array<T>): Observable

Parameters

  • values?: Array<T> optional

Returns

Observable

public startWith(scheduler: IScheduler, values?: Array<T>): Observable

Parameters

  • scheduler: IScheduler
  • values?: Array<T> optional

Returns

Observable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public subscribe(observer: Observer): IDisposable

Parameters

Returns

IDisposable

public subscribe(onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void): IDisposable

Parameters

  • onNext?: (value: T) => void optional
  • onError?: (exception: any) => void optional
  • onCompleted?: () => void optional

Returns

IDisposable

public switch(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public switchLatest(): T in Rx.Observable<T>

Returns

T in Rx.Observable<T>

public take(count: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeLast(count: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeLastBuffer(count: number): Observable

Parameters

  • count: number

Returns

Observable

public takeLastBufferWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public takeLastWithTime(duration: number, timerScheduler?: IScheduler, loopScheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeUntil(other: Observable): Observable

Parameters

Returns

Observable

public takeUntil(other: IPromise): Observable

Parameters

Returns

Observable

public takeUntilWithTime(endTime: Date, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public takeUntilWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public takeWhile(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public takeWithTime(duration: number, scheduler?: IScheduler): Observable

Parameters

  • duration: number
  • scheduler?: IScheduler optional

Returns

Observable

public throttle(dueTime: number, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public throttleWithSelector(throttleDurationSelector: (item: T) => Rx.Observable<TTimeout>): Observable

Parameters

  • throttleDurationSelector: (item: T) => Rx.Observable<TTimeout>

Returns

Observable

public timeInterval(scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeout(dueTime: Date, other?: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeout(dueTime: number, other?: Observable, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public timeoutWithSelector(firstTimeout: Observable, timeoutdurationSelector?: (item: T) => Rx.Observable<TTimeout>, other?: Observable): Observable

Parameters

  • firstTimeout: Observable
  • timeoutdurationSelector?: (item: T) => Rx.Observable<TTimeout> optional
  • other?: Observable optional

Returns

Observable

public timestamp(scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public toArray(): Observable

Returns

Observable

public toNotifier(): (notification: Rx.Notification<T>) => void

Returns

(notification: Rx.Notification<T>) => void

public toPromise(promiseCtor: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => TPromise): TPromise

Converts an existing observable sequence to an ES6 Compatible Promise

example

var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);

Parameters

  • promiseCtor: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => TPromise

    The constructor of the promise.

Returns

TPromise

An ES6 compatible promise with the last value from the observable sequence.

public toPromise(promiseCtor?: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => Rx.IPromise<T>): IPromise

Converts an existing observable sequence to an ES6 Compatible Promise

example

var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);

// With config Rx.config.Promise = RSVP.Promise; var promise = Rx.Observable.return(42).toPromise();

Parameters

  • promiseCtor?: new(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void) => Rx.IPromise<T> optional

Returns

IPromise

An ES6 compatible promise with the last value from the observable sequence.

public where(predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean, thisArg?: any): Observable

Parameters

  • predicate: (value: T, index: number, source: Rx.Observable<T>) => boolean
  • thisArg?: any optional

Returns

Observable

public zip(second: Observable, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: Observable
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public zip(second: IPromise, resultSelector: (v1: T, v2: T2) => TResult): Observable

Parameters

  • second: IPromise
  • resultSelector: (v1: T, v2: T2) => TResult

Returns

Observable

public zip(second: Observable, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, resultSelector: (v1: T, v2: T2, v3: T3) => TResult): Observable

Parameters

  • second: IPromise
  • third: IPromise
  • resultSelector: (v1: T, v2: T2, v3: T3) => TResult

Returns

Observable

public zip(second: Observable, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: Observable, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, fourth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: IPromise, third: IPromise, fourth: IPromise, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable, third: Observable, fourth: Observable, fifth: Observable, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult): Observable

Parameters

Returns

Observable

public zip(second: Observable[], resultSelector: (left: T, ...right: TOther[]) => TResult): Observable

Parameters

  • second: Observable[]
  • resultSelector: (left: T, ...right: TOther[]) => TResult

Returns

Observable

public zip(second: IPromise[], resultSelector: (left: T, ...right: TOther[]) => TResult): Observable

Parameters

  • second: IPromise[]
  • resultSelector: (left: T, ...right: TOther[]) => TResult

Returns

Observable