Interface ObservableStatic

Index

Methods

Methods

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

public amb(sources: Observable[]): Observable

Parameters

Returns

Observable

public amb(sources: IPromise[]): Observable

Parameters

Returns

Observable

public case(selector: () => string, sources: { [key: string]: Rx.Observable<T>; }, elseSource: Observable): Observable

Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.

example

res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);

Parameters

  • selector: () => string

    The function which extracts the value for to test in a case statement.

  • sources: { [key: string]: Rx.Observable<T>; }

    A object which has keys which correspond to the case statement labels.

  • elseSource: Observable

    The observable sequence or promise that will be run if the sources are not matched.

Returns

Observable

An observable sequence which is determined by a case statement.

public case(selector: () => string, sources: { [key: string]: Rx.IPromise<T>; }, elseSource: Observable): Observable

Parameters

  • selector: () => string
  • sources: { [key: string]: Rx.IPromise<T>; }
  • elseSource: Observable

Returns

Observable

public case(selector: () => string, sources: { [key: string]: Rx.Observable<T>; }, elseSource: IPromise): Observable

Parameters

  • selector: () => string
  • sources: { [key: string]: Rx.Observable<T>; }
  • elseSource: IPromise

Returns

Observable

public case(selector: () => string, sources: { [key: string]: Rx.IPromise<T>; }, elseSource: IPromise): Observable

Parameters

  • selector: () => string
  • sources: { [key: string]: Rx.IPromise<T>; }
  • elseSource: IPromise

Returns

Observable

public case(selector: () => string, sources: { [key: string]: Rx.Observable<T>; }, scheduler?: IScheduler): Observable

Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.

example

res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }); res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);

Parameters

  • selector: () => string

    The function which extracts the value for to test in a case statement.

  • sources: { [key: string]: Rx.Observable<T>; }

    A object which has keys which correspond to the case statement labels.

  • scheduler?: IScheduler optional

    Scheduler used to create Rx.Observabe.Empty.

Returns

Observable

An observable sequence which is determined by a case statement.

public case(selector: () => string, sources: { [key: string]: Rx.IPromise<T>; }, scheduler?: IScheduler): Observable

Parameters

  • selector: () => string
  • sources: { [key: string]: Rx.IPromise<T>; }
  • scheduler?: IScheduler optional

Returns

Observable

public case(selector: () => number, sources: { [key: number]: Rx.Observable<T>; }, elseSource: Observable): Observable

Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.

example

res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);

Parameters

  • selector: () => number

    The function which extracts the value for to test in a case statement.

  • sources: { [key: number]: Rx.Observable<T>; }

    A object which has keys which correspond to the case statement labels.

  • elseSource: Observable

    The observable sequence or promise that will be run if the sources are not matched.

Returns

Observable

An observable sequence which is determined by a case statement.

public case(selector: () => number, sources: { [key: number]: Rx.IPromise<T>; }, elseSource: Observable): Observable

Parameters

  • selector: () => number
  • sources: { [key: number]: Rx.IPromise<T>; }
  • elseSource: Observable

Returns

Observable

public case(selector: () => number, sources: { [key: number]: Rx.Observable<T>; }, elseSource: IPromise): Observable

Parameters

  • selector: () => number
  • sources: { [key: number]: Rx.Observable<T>; }
  • elseSource: IPromise

Returns

Observable

public case(selector: () => number, sources: { [key: number]: Rx.IPromise<T>; }, elseSource: IPromise): Observable

Parameters

  • selector: () => number
  • sources: { [key: number]: Rx.IPromise<T>; }
  • elseSource: IPromise

Returns

Observable

public case(selector: () => number, sources: { [key: number]: Rx.Observable<T>; }, scheduler?: IScheduler): Observable

Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.

example

res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }); res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);

Parameters

  • selector: () => number

    The function which extracts the value for to test in a case statement.

  • sources: { [key: number]: Rx.Observable<T>; }

    A object which has keys which correspond to the case statement labels.

  • scheduler?: IScheduler optional

    Scheduler used to create Rx.Observabe.Empty.

Returns

Observable

An observable sequence which is determined by a case statement.

public case(selector: () => number, sources: { [key: number]: Rx.IPromise<T>; }, scheduler?: IScheduler): Observable

Parameters

  • selector: () => number
  • sources: { [key: number]: Rx.IPromise<T>; }
  • scheduler?: IScheduler optional

Returns

Observable

public catch(sources: Observable[]): Observable

Parameters

Returns

Observable

public catch(sources: IPromise[]): Observable

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

public catchException(sources: Observable[]): Observable

Parameters

Returns

Observable

public catchException(sources: IPromise[]): Observable

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

public combineLatest(first: Observable, 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: (...otherValues: TOther[]) => TResult): Observable

Parameters

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

Returns

Observable

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

Parameters

  • souces: IPromise[]
  • resultSelector: (...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 create(subscribe: (observer: Rx.Observer<T>) => Rx.IDisposable): Observable

Parameters

  • subscribe: (observer: Rx.Observer<T>) => Rx.IDisposable

Returns

Observable

public create(subscribe: (observer: Rx.Observer<T>) => () => void): Observable

Parameters

  • subscribe: (observer: Rx.Observer<T>) => () => void

Returns

Observable

public create(subscribe: (observer: Rx.Observer<T>) => void): Observable

Parameters

  • subscribe: (observer: Rx.Observer<T>) => void

Returns

Observable

public createWithDisposable(subscribe: (observer: Rx.Observer<T>) => Rx.IDisposable): Observable

Parameters

  • subscribe: (observer: Rx.Observer<T>) => Rx.IDisposable

Returns

Observable

public defer(observableFactory: () => Rx.Observable<T>): Observable

Parameters

  • observableFactory: () => Rx.Observable<T>

Returns

Observable

public defer(observableFactory: () => Rx.IPromise<T>): Observable

Parameters

  • observableFactory: () => Rx.IPromise<T>

Returns

Observable

public empty(scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public for(sources: Array<T>, resultSelector: (item: T) => Rx.Observable<TResult>): Observable

Concatenates the observable sequences obtained by running the specified result selector for each element in source. There is an alias for this method called 'forIn' for browsers <IE9

Parameters

  • sources: Array<T>

    An array of values to turn into an observable sequence.

  • resultSelector: (item: T) => Rx.Observable<TResult>

    A function to apply to each item in the sources array to turn it into an observable sequence.

Returns

Observable

An observable sequence from the concatenated observable sequences.

public forIn(sources: Array<T>, resultSelector: (item: T) => Rx.Observable<TResult>): Observable

Concatenates the observable sequences obtained by running the specified result selector for each element in source. There is an alias for this method called 'forIn' for browsers <IE9

Parameters

  • sources: Array<T>

    An array of values to turn into an observable sequence.

  • resultSelector: (item: T) => Rx.Observable<TResult>

    A function to apply to each item in the sources array to turn it into an observable sequence.

Returns

Observable

An observable sequence from the concatenated observable sequences.

public forkJoin(sources: Observable[]): Observable

Runs all observable sequences in parallel and collect their last elements.

example

res = Rx.Observable.forkJoin([obs1, obs2]);

Parameters

  • sources: Observable[]

    Array of source sequences or promises.

Returns

Observable

An observable sequence with an array collecting the last elements of all the input sequences.

public forkJoin(sources: IPromise[]): Observable

Parameters

Returns

Observable

public forkJoin(args?: Observable[]): Observable

Runs all observable sequences in parallel and collect their last elements.

example

res = Rx.Observable.forkJoin(obs1, obs2, ...);

Parameters

  • args?: Observable[] optional

    Source sequences or promises.

Returns

Observable

An observable sequence with an array collecting the last elements of all the input sequences.

public forkJoin(args?: IPromise[]): Observable

Parameters

Returns

Observable

public fromArray(array: Array<T>, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public fromArray(array: { length: number; [index: number]: T; }, scheduler?: IScheduler): Observable

Parameters

  • array: { length: number; [index: number]: T; }
  • scheduler?: IScheduler optional

Returns

Observable

public fromItreable(generator: () => { next(): { done: boolean; value?: T; }; }, scheduler?: IScheduler): Observable

Converts an iterable into an Observable sequence

example

var res = Rx.Observable.fromIterable(new Map()); var res = Rx.Observable.fromIterable(function* () { yield 42; }); var res = Rx.Observable.fromIterable(new Set(), Rx.Scheduler.timeout);

Parameters

  • generator: () => { next(): { done: boolean; value?: T; }; }

    Generator to convert from.

  • scheduler?: IScheduler optional

Returns

Observable

The observable sequence whose elements are pulled from the given generator sequence.

public fromItreable(iterable: {}, scheduler?: IScheduler): Observable

Converts an iterable into an Observable sequence

example

var res = Rx.Observable.fromIterable(new Map()); var res = Rx.Observable.fromIterable(new Set(), Rx.Scheduler.timeout);

Parameters

  • iterable: {}

    Iterable to convert from.

  • scheduler?: IScheduler optional

Returns

Observable

The observable sequence whose elements are pulled from the given generator sequence.

public fromPromise(promise: IPromise): Observable

Converts a Promise to an Observable sequence

Parameters

  • promise: IPromise

    An ES6 Compliant promise.

Returns

Observable

An Observable sequence which wraps the existing promise success and failure.

public generate(initialState: TState, condition: (state: TState) => boolean, iterate: (state: TState) => TState, resultSelector: (state: TState) => TResult, scheduler?: IScheduler): Observable

Parameters

  • initialState: TState
  • condition: (state: TState) => boolean
  • iterate: (state: TState) => TState
  • resultSelector: (state: TState) => TResult
  • scheduler?: IScheduler optional

Returns

Observable

public if(condition: () => boolean, thenSource: Observable, elseSource: Observable): Observable

Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9

example

res = Rx.Observable.if(condition, obs1, obs2);

Parameters

  • condition: () => boolean

    The condition which determines if the thenSource or elseSource will be run.

  • thenSource: Observable

    The observable sequence or promise that will be run if the condition function returns true.

  • elseSource: Observable

    The observable sequence or promise that will be run if the condition function returns false.

Returns

Observable

An observable sequence which is either the thenSource or elseSource.

public if(condition: () => boolean, thenSource: Observable, elseSource: IPromise): Observable

Parameters

Returns

Observable

public if(condition: () => boolean, thenSource: IPromise, elseSource: Observable): Observable

Parameters

Returns

Observable

public if(condition: () => boolean, thenSource: IPromise, elseSource: IPromise): Observable

Parameters

Returns

Observable

public if(condition: () => boolean, thenSource: Observable, scheduler?: IScheduler): Observable

Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9

example

res = Rx.Observable.if(condition, obs1, scheduler);

Parameters

  • condition: () => boolean

    The condition which determines if the thenSource or empty sequence will be run.

  • thenSource: Observable

    The observable sequence or promise that will be run if the condition function returns true.

  • scheduler?: IScheduler optional

    Scheduler used to create Rx.Observabe.Empty.

Returns

Observable

An observable sequence which is either the thenSource or empty sequence.

public if(condition: () => boolean, thenSource: IPromise, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public ifThen(condition: () => boolean, thenSource: Observable, elseSource: Observable): Observable

Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9

example

res = Rx.Observable.if(condition, obs1, obs2);

Parameters

  • condition: () => boolean

    The condition which determines if the thenSource or elseSource will be run.

  • thenSource: Observable

    The observable sequence or promise that will be run if the condition function returns true.

  • elseSource: Observable

    The observable sequence or promise that will be run if the condition function returns false.

Returns

Observable

An observable sequence which is either the thenSource or elseSource.

public ifThen(condition: () => boolean, thenSource: Observable, elseSource: IPromise): Observable

Parameters

Returns

Observable

public ifThen(condition: () => boolean, thenSource: IPromise, elseSource: Observable): Observable

Parameters

Returns

Observable

public ifThen(condition: () => boolean, thenSource: IPromise, elseSource: IPromise): Observable

Parameters

Returns

Observable

public ifThen(condition: () => boolean, thenSource: Observable, scheduler?: IScheduler): Observable

Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9

example

res = Rx.Observable.if(condition, obs1, scheduler);

Parameters

  • condition: () => boolean

    The condition which determines if the thenSource or empty sequence will be run.

  • thenSource: Observable

    The observable sequence or promise that will be run if the condition function returns true.

  • scheduler?: IScheduler optional

    Scheduler used to create Rx.Observabe.Empty.

Returns

Observable

An observable sequence which is either the thenSource or empty sequence.

public ifThen(condition: () => boolean, thenSource: IPromise, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

public merge(sources: Observable[]): Observable

Parameters

Returns

Observable

public merge(sources: IPromise[]): Observable

Parameters

Returns

Observable

public merge(scheduler: IScheduler, sources?: Observable[]): Observable

Parameters

Returns

Observable

public merge(scheduler: IScheduler, sources?: IPromise[]): Observable

Parameters

Returns

Observable

public merge(scheduler: IScheduler, sources: Observable[]): Observable

Parameters

Returns

Observable

public merge(scheduler: IScheduler, sources: IPromise[]): Observable

Parameters

Returns

Observable

public never(): Observable

Returns

Observable

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

Parameters

Returns

Observable

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

Parameters

Returns

Observable

public onErrorResumeNext(sources: Observable[]): Observable

Parameters

Returns

Observable

public onErrorResumeNext(sources: IPromise[]): Observable

Parameters

Returns

Observable

public range(start: number, count: number, scheduler?: IScheduler): Observable

Parameters

  • start: number
  • count: number
  • scheduler?: IScheduler optional

Returns

Observable

public repeat(value: T, repeatCount?: number, scheduler?: IScheduler): Observable

Parameters

  • value: T
  • repeatCount?: number optional
  • scheduler?: IScheduler optional

Returns

Observable

public return(value: T, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public returnValue(value: T, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public switchCase(selector: () => string, sources: { [key: string]: Rx.Observable<T>; }, elseSource: Observable): Observable

Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.

example

res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);

Parameters

  • selector: () => string

    The function which extracts the value for to test in a case statement.

  • sources: { [key: string]: Rx.Observable<T>; }

    A object which has keys which correspond to the case statement labels.

  • elseSource: Observable

    The observable sequence or promise that will be run if the sources are not matched.

Returns

Observable

An observable sequence which is determined by a case statement.

public switchCase(selector: () => string, sources: { [key: string]: Rx.IPromise<T>; }, elseSource: Observable): Observable

Parameters

  • selector: () => string
  • sources: { [key: string]: Rx.IPromise<T>; }
  • elseSource: Observable

Returns

Observable

public switchCase(selector: () => string, sources: { [key: string]: Rx.Observable<T>; }, elseSource: IPromise): Observable

Parameters

  • selector: () => string
  • sources: { [key: string]: Rx.Observable<T>; }
  • elseSource: IPromise

Returns

Observable

public switchCase(selector: () => string, sources: { [key: string]: Rx.IPromise<T>; }, elseSource: IPromise): Observable

Parameters

  • selector: () => string
  • sources: { [key: string]: Rx.IPromise<T>; }
  • elseSource: IPromise

Returns

Observable

public switchCase(selector: () => string, sources: { [key: string]: Rx.Observable<T>; }, scheduler?: IScheduler): Observable

Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.

example

res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }); res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);

Parameters

  • selector: () => string

    The function which extracts the value for to test in a case statement.

  • sources: { [key: string]: Rx.Observable<T>; }

    A object which has keys which correspond to the case statement labels.

  • scheduler?: IScheduler optional

    Scheduler used to create Rx.Observabe.Empty.

Returns

Observable

An observable sequence which is determined by a case statement.

public switchCase(selector: () => string, sources: { [key: string]: Rx.IPromise<T>; }, scheduler?: IScheduler): Observable

Parameters

  • selector: () => string
  • sources: { [key: string]: Rx.IPromise<T>; }
  • scheduler?: IScheduler optional

Returns

Observable

public switchCase(selector: () => number, sources: { [key: number]: Rx.Observable<T>; }, elseSource: Observable): Observable

Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.

example

res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);

Parameters

  • selector: () => number

    The function which extracts the value for to test in a case statement.

  • sources: { [key: number]: Rx.Observable<T>; }

    A object which has keys which correspond to the case statement labels.

  • elseSource: Observable

    The observable sequence or promise that will be run if the sources are not matched.

Returns

Observable

An observable sequence which is determined by a case statement.

public switchCase(selector: () => number, sources: { [key: number]: Rx.IPromise<T>; }, elseSource: Observable): Observable

Parameters

  • selector: () => number
  • sources: { [key: number]: Rx.IPromise<T>; }
  • elseSource: Observable

Returns

Observable

public switchCase(selector: () => number, sources: { [key: number]: Rx.Observable<T>; }, elseSource: IPromise): Observable

Parameters

  • selector: () => number
  • sources: { [key: number]: Rx.Observable<T>; }
  • elseSource: IPromise

Returns

Observable

public switchCase(selector: () => number, sources: { [key: number]: Rx.IPromise<T>; }, elseSource: IPromise): Observable

Parameters

  • selector: () => number
  • sources: { [key: number]: Rx.IPromise<T>; }
  • elseSource: IPromise

Returns

Observable

public switchCase(selector: () => number, sources: { [key: number]: Rx.Observable<T>; }, scheduler?: IScheduler): Observable

Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.

example

res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }); res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);

Parameters

  • selector: () => number

    The function which extracts the value for to test in a case statement.

  • sources: { [key: number]: Rx.Observable<T>; }

    A object which has keys which correspond to the case statement labels.

  • scheduler?: IScheduler optional

    Scheduler used to create Rx.Observabe.Empty.

Returns

Observable

An observable sequence which is determined by a case statement.

public switchCase(selector: () => number, sources: { [key: number]: Rx.IPromise<T>; }, scheduler?: IScheduler): Observable

Parameters

  • selector: () => number
  • sources: { [key: number]: Rx.IPromise<T>; }
  • scheduler?: IScheduler optional

Returns

Observable

public throw(exception: Error, scheduler?: IScheduler): Observable

Parameters

  • exception: Error
  • scheduler?: IScheduler optional

Returns

Observable

public throw(exception: any, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public throwException(exception: Error, scheduler?: IScheduler): Observable

Parameters

  • exception: Error
  • scheduler?: IScheduler optional

Returns

Observable

public throwException(exception: any, scheduler?: IScheduler): Observable

Parameters

Returns

Observable

public using(resourceFactory: () => TResource, observableFactory: (resource: TResource) => Rx.Observable<TSource>): Observable

Parameters

  • resourceFactory: () => TResource
  • observableFactory: (resource: TResource) => Rx.Observable<TSource>

Returns

Observable

public while(condition: () => boolean, source: Observable): Observable

Repeats source as long as condition holds emulating a while loop. There is an alias for this method called 'whileDo' for browsers <IE9

Parameters

  • condition: () => boolean

    The condition which determines if the source will be repeated.

  • source: Observable

    The observable sequence or promise that will be run if the condition function returns true.

Returns

Observable

An observable sequence which is repeated as long as the condition holds.

public while(condition: () => boolean, source: IPromise): Observable

Parameters

  • condition: () => boolean
  • source: IPromise

Returns

Observable

public whileDo(condition: () => boolean, source: Observable): Observable

Repeats source as long as condition holds emulating a while loop. There is an alias for this method called 'whileDo' for browsers <IE9

Parameters

  • condition: () => boolean

    The condition which determines if the source will be repeated.

  • source: Observable

    The observable sequence or promise that will be run if the condition function returns true.

Returns

Observable

An observable sequence which is repeated as long as the condition holds.

public whileDo(condition: () => boolean, source: IPromise): Observable

Parameters

  • condition: () => boolean
  • source: IPromise

Returns

Observable

public zip(first: Observable, sources: Observable[], resultSelector: (item1: T1, ...right: T2[]) => TResult): Observable

Parameters

Returns

Observable

public zip(first: Observable, sources: IPromise[], resultSelector: (item1: T1, ...right: T2[]) => TResult): Observable

Parameters

  • first: Observable
  • sources: IPromise[]
  • resultSelector: (item1: T1, ...right: T2[]) => TResult

Returns

Observable

public zip(source1: Observable, source2: Observable, resultSelector: (item1: T1, item2: T2) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: IPromise, resultSelector: (item1: T1, item2: T2) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: Observable, source3: Observable, resultSelector: (item1: T1, item2: T2, item3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: Observable, source3: IPromise, resultSelector: (item1: T1, item2: T2, item3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: IPromise, source3: Observable, resultSelector: (item1: T1, item2: T2, item3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: IPromise, source3: IPromise, resultSelector: (item1: T1, item2: T2, item3: T3) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: Observable, source3: Observable, source4: Observable, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: Observable, source3: Observable, source4: IPromise, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: Observable, source3: IPromise, source4: Observable, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: Observable, source3: IPromise, source4: IPromise, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: IPromise, source3: Observable, source4: Observable, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: IPromise, source3: Observable, source4: IPromise, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: IPromise, source3: IPromise, source4: Observable, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: IPromise, source3: IPromise, source4: IPromise, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult): Observable

Parameters

Returns

Observable

public zip(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5) => TResult): Observable

Parameters

Returns

Observable

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

Parameters

Returns

Observable

public zipArray(sources: Observable[]): Observable

Parameters

Returns

Observable