Home Manual Reference Source Repository

Function

Static Public Summary
public

buffer(closingNotifier: Observable<any>): Observable<T[]>

Buffers the incoming observable values until the passed closingNotifier emits a value, at which point it emits the buffer on the returned observable and starts a new buffer internally, awaiting the next time closingNotifier emits.

public

bufferCount(bufferSize: number, startBufferEvery: number): Observable<T[]>

Buffers a number of values from the source observable by bufferSize then emits the buffer and clears it, and starts a new buffer each startBufferEvery values.

public

bufferTime(bufferTimeSpan: number, bufferCreationInterval: number, scheduler: Scheduler): Observable<T[]>

Buffers values from the source for a specific time period.

public

bufferToggle(openings: Observable<O>, closingSelector: Function): Observable<T[]>

Buffers values from the source by opening the buffer via signals from an Observable provided to openings, and closing and sending the buffers when an Observable returned by the closingSelector emits.

public

bufferWhen(closingSelector: function): Observable<T[]>

Opens a buffer immediately, then closes the buffer when the observable returned by calling closingSelector emits a value.

public

Takes an Observable of Observables, and collects all observables from it.

public

combineLatest(observables: ...Observable, project: function): Observable

Combines the values from this observable with values from observables passed as arguments.

public

concat(observables: ...*): Observable

Joins this observable with multiple other observables by subscribing to them one at a time, starting with the source, and merging their results into the returned observable.

public

Joins every Observable emitted by the source (an Observable of Observables), in a serial fashion.

public

concatMap(project: function, resultSelector: function): Observable

Maps values from the source observable into new Observables, then merges them in a serialized fashion, waiting for each one to complete before merging the next.

public

concatMapTo(observable: Observable, resultSelector: function): Observable

Maps values from the source to a specific observable, and merges them together in a serialized fashion.

public

concatStatic(observables: ...*): Observable

Joins multiple observables together by subscribing to them one at a time and merging their results into the returned observable.

public

count(predicate: function): Observable

Returns an observable of a single number that represents the number of items that either: Match a provided predicate function, or if a predicate is not provided, the number represents the total count of all items in the source observable.

public

debounce(durationSelector: function): Observable

Returns the source Observable delayed by the computed debounce duration, with the duration lengthened if a new source item arrives before the delay duration ends.

public

debounceTime(dueTime: number, scheduler: Scheduler): Observable

Returns the source Observable delayed by the computed debounce duration, with the duration lengthened if a new source item arrives before the delay duration ends.

public

defaultIfEmpty(defaultValue: any): Observable

Returns an Observable that emits the elements of the source or a specified default value if empty.

public

delay(delay: number | Date, scheduler: Scheduler): Observable

Returns an Observable that delays the emission of items from the source Observable by a given timeout or until a given Date.

public

delayWhen(selector: Function, sequence: Observable): Observable

Returns an Observable that delays the emission of items from the source Observable by a subscription delay and a delay selector function for each element.

public

Returns an Observable that transforms Notification objects into the items or notifications they represent.

public

distinct(compare: function, flushes: Observable): Observable

Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items.

public

distinctKey(key: string, compare: function, flushes: Observable): Observable

Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items, using a property accessed by using the key provided to check if the two items are distinct.

public

Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item, using a property accessed by using the key provided to check if the two items are distinct.

public

elementAt(index: number, defaultValue: any): Observable

Returns an Observable that emits the item at the specified index in the source Observable.

public

every(predicate: function, thisArg: any): Observable

Returns an Observable that emits whether or not every item of the source satisfies the condition specified.

public

Returns an Observable that takes a source of observables and propagates the first observable exclusively until it completes before subscribing to the next.

public

exhaustMap(project: function, resultSelector: function): Observable

Returns an Observable that applies the given function to each item of the source Observable to create a new Observable, which are then concatenated together to produce a new Observable.

public

expand(project: function, concurrent: number, scheduler: Scheduler): Observable

Returns an Observable where for each item in the source Observable, the supplied function is applied to each item, resulting in a new value to then be applied again with the function.

public

filter(select: Function, thisArg: any): Observable

Similar to the well-known Array.prototype.filter method, this operator filters values down to a set allowed by a select function

public

find(predicate: function): Observable

Returns an Observable that searches for the first item in the source Observable that matches the specified condition, and returns the first occurrence in the source.

public

Returns an Observable that searches for the first item in the source Observable that matches the specified condition, and returns the the index of the item in the source.

public

first(predicate: function): Observable

Returns an Observable that emits the first item of the source Observable that matches the specified condition.

public

groupBy(keySelector: Function, elementSelector: Function): Observable

Groups the items emitted by an Observable according to a specified criterion, and emits these grouped items as GroupedObservables, one GroupedObservable per group.

public

Ignores all items emitted by the source Observable and only passes calls of complete or error.

public

If the source Observable is empty it returns an Observable that emits true, otherwise it emits false.

public

last(predicate: function): Observable

Returns an Observable that emits only the last item emitted by the source Observable.

public

map(project: Function, thisArg: any): Observable

Similar to the well known Array.prototype.map function, this operator applies a projection to each value and emits that projection in the returned observable

public

mapTo(value: any): Observable

Maps every value to the same value every time.

public

Returns an Observable that represents all of the emissions and notifications from the source Observable into emissions marked with their original types within a Notification objects.

public

max(optional: Function): Observable

The Max operator operates on an Observable that emits numbers (or items that can be evaluated as numbers), and when source Observable completes it emits a single item: the item with the largest number.

public

Creates a result Observable which emits values from every given input Observable.

public

Returns an Observable that emits items based on applying a function that you supply to each item emitted by the source Observable, where that function returns an Observable, and then merging those resulting Observables and emitting the results of this merger.

public

min(optional: Function): Observable<R>

The Min operator operates on an Observable that emits numbers (or items that can be evaluated as numbers), and when source Observable completes it emits a single item: the item with the smallest number.

public

Returns an Observable that emits the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the underlying stream.

public

Returns a new observable that triggers on the second and following inputs.

public

pluck(properties: ...args): Observable

Retrieves the value of a specified nested property from all elements in the Observable sequence.

public

publish(): *

Returns a ConnectableObservable, which is a variety of Observable that waits until its connect method is called before it begins emitting items to those Observers that have subscribed to it.

public

Returns an Observable that mirrors the first source Observable to emit an item from the combination of this Observable and supplied Observables

public

Returns an Observable that mirrors the first source Observable to emit an item.

public

reduce(the: initialValue, an: accumulator): Observable

Returns an Observable that applies a specified accumulator function to the first item emitted by a source Observable, then feeds the result of that function along with the second item emitted by the source Observable into the same function, and so on until all items have been emitted by the source Observable, and emits the final result from the final call to your function as its sole item.

public

repeat(scheduler: Scheduler, count: number): Observable

Returns an Observable that repeats the stream of items emitted by the source Observable at most count times, on a particular Scheduler.

public

retry(number: number): Observable

Returns an Observable that mirrors the source Observable, resubscribing to it if it calls error and the predicate returns true for that specific exception and retry count.

public

retryWhen(receives: notificationHandler, the: scheduler): Observable

Returns an Observable that emits the same values as the source observable with the exception of an error.

public

sample(sampler: Observable): Observable<T>

Returns an Observable that, when the specified sampler Observable emits an item or completes, it then emits the most recently emitted item (if any) emitted by the source Observable since the previous emission from the sampler Observable.

public

scan(accumulator: function, seed: any): Obervable

Returns an Observable that applies a specified accumulator function to each item emitted by the source Observable.

public

Returns a new Observable that multicasts (shares) the original Observable.

public

Returns an Observable that emits the single item emitted by the source Observable that matches a specified predicate, if that Observable emits one such item.

public

Returns an Observable that skips n items emitted by an Observable.

public

Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item.

public

skipWhile(predicate: Function): Observable<T>

Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds true, but emits all further source items as soon as the condition becomes false.

public

startWith(an: Values): Observable

Returns an Observable that emits the items in a specified Iterable before it begins to emit items emitted by the source Observable.

public

subscribeOn(the: Scheduler): Observable<T>

Asynchronously subscribes Observers to this Observable on the specified Scheduler.

public

Returns a new Observable by applying a function that you supply to each item emitted by the source Observable that returns an Observable, and then emitting the items emitted by the most recently emitted of these Observables.

public

withLatestFrom(observables: Observable, project: Function): *

Static Public

public buffer(closingNotifier: Observable<any>): Observable<T[]> source

Buffers the incoming observable values until the passed closingNotifier emits a value, at which point it emits the buffer on the returned observable and starts a new buffer internally, awaiting the next time closingNotifier emits.

Params:

NameTypeAttributeDescription
closingNotifier Observable<any>

an Observable that signals the buffer to be emitted} from the returned observable.

Return:

Observable<T[]>

an Observable of buffers, which are arrays of values.

public bufferCount(bufferSize: number, startBufferEvery: number): Observable<T[]> source

Buffers a number of values from the source observable by bufferSize then emits the buffer and clears it, and starts a new buffer each startBufferEvery values. If startBufferEvery is not provided or is null, then new buffers are started immediately at the start of the source and when each buffer closes and is emitted.

Params:

NameTypeAttributeDescription
bufferSize number

the maximum size of the buffer emitted.

startBufferEvery number
  • optional

optional interval at which to start a new buffer. (e.g. if startBufferEvery is 2, then a new buffer will be started on every other value from the source.) A new buffer is started at the beginning of the source by default.

Return:

Observable<T[]>

an Observable of arrays of buffered values.

public bufferTime(bufferTimeSpan: number, bufferCreationInterval: number, scheduler: Scheduler): Observable<T[]> source

Buffers values from the source for a specific time period. Optionally allows new buffers to be set up at an interval.

Params:

NameTypeAttributeDescription
bufferTimeSpan number

the amount of time to fill each buffer for before emitting them and clearing them.

bufferCreationInterval number
  • optional

the interval at which to start new buffers.

scheduler Scheduler
  • optional

(optional, defaults to asap scheduler) The scheduler on which to schedule the intervals that determine buffer boundaries.

Return:

Observable<T[]>

an observable of arrays of buffered values.

public bufferToggle(openings: Observable<O>, closingSelector: Function): Observable<T[]> source

Buffers values from the source by opening the buffer via signals from an Observable provided to openings, and closing and sending the buffers when an Observable returned by the closingSelector emits.

Params:

NameTypeAttributeDescription
openings Observable<O>

An observable of notifications to start new buffers.

closingSelector Function

a function that takes the value emitted by the openings observable and returns an Observable, which, when it emits, signals that the associated buffer should be emitted and cleared.

Return:

Observable<T[]>

an observable of arrays of buffered values.

public bufferWhen(closingSelector: function): Observable<T[]> source

Opens a buffer immediately, then closes the buffer when the observable returned by calling closingSelector emits a value. It that immediately opens a new buffer and repeats the process.

Params:

NameTypeAttributeDescription
closingSelector function

a function that takes no arguments and returns an Observable that signals buffer closure.

Return:

Observable<T[]>

an observable of arrays of buffered values.

public combineAll(project: function): Observable source

Takes an Observable of Observables, and collects all observables from it. Once the outer observable completes, it subscribes to all collected observables and "combines" their values, such that:

  • every time an observable emits, the returned observable emits
  • when the returned observable emits, it emits all of the most recent values by:
    • if a project function is provided, it is called with each recent value from each observable in whatever order they arrived, and the result of the project function is what is emitted by the returned observable
    • if there is no project function, an array of all of the most recent values is emitted by the returned observable.

Params:

NameTypeAttributeDescription
project function
  • optional

an optional function to map the most recent values from each observable into a new result. Takes each of the most recent values from each collected observable as arguments, in order.

Return:

Observable

an observable of projected results or arrays of recent values.

public combineLatest(observables: ...Observable, project: function): Observable source

import {combineLatest} from '@reactivex/rxjs/es6/operator/combineLatest.js'

Combines the values from this observable with values from observables passed as arguments. This is done by subscribing to each observable, in order, and collecting an array of each of the most recent values any time any of the observables emits, then either taking that array and passing it as arguments to an option project function and emitting the return value of that, or just emitting the array of recent values directly if there is no project function.

Params:

NameTypeAttributeDescription
observables ...Observable

the observables to combine the source with

project function
  • optional

an optional function to project the values from the combined recent values into a new value for emission.

Return:

Observable

an observable of other projected values from the most recent values from each observable, or an array of each of the most recent values from each observable.

public concat(observables: ...*): Observable source

Joins this observable with multiple other observables by subscribing to them one at a time, starting with the source, and merging their results into the returned observable. Will wait for each observable to complete before moving on to the next.

Params:

NameTypeAttributeDescription
observables ...*

Return:

Observable

All values of each passed observable merged into a single observable, in order, in serial fashion.

public concatAll(): Observable source

Joins every Observable emitted by the source (an Observable of Observables), in a serial fashion. Subscribing to each one only when the previous one has completed, and merging all of their values into the returned observable.

Warning: If the source Observable emits Observables quickly and endlessly, and the Observables it emits generally complete slower than the source emits, you can run into memory issues as the incoming observables collect in an unbounded buffer.

Return:

Observable

an observable of values merged from the incoming observables.

public concatMap(project: function, resultSelector: function): Observable source

Maps values from the source observable into new Observables, then merges them in a serialized fashion, waiting for each one to complete before merging the next.

Warning: if incoming values arrive endlessly and faster than the observables they're being mapped to can complete, it will result in memory issues as created observables amass in an unbounded buffer waiting for their turn to be subscribed to.

Params:

NameTypeAttributeDescription
project function

a function to map incoming values into Observables to be concatenated. accepts the value and the index as arguments.

resultSelector function
  • optional

an optional result selector that is applied to values before they're merged into the returned observable. The arguments passed to this function are:

  • outerValue: the value that came from the source
  • innerValue: the value that came from the projected Observable
  • outerIndex: the "index" of the value that came from the source
  • innerIndex: the "index" of the value from the projected Observable

Return:

Observable

an observable of values merged from the projected Observables as they were subscribed to, one at a time. Optionally, these values may have been projected from a passed projectResult argument.

public concatMapTo(observable: Observable, resultSelector: function): Observable source

Maps values from the source to a specific observable, and merges them together in a serialized fashion.

Params:

NameTypeAttributeDescription
observable Observable

the observable to map each source value to

resultSelector function
  • optional

an optional result selector that is applied to values before they're merged into the returned observable. The arguments passed to this function are:

  • outerValue: the value that came from the source
  • innerValue: the value that came from the projected Observable
  • outerIndex: the "index" of the value that came from the source
  • innerIndex: the "index" of the value from the projected Observable

Return:

Observable

an observable of values merged together by joining the passed observable with itself, one after the other, for each value emitted from the source.

public concatStatic(observables: ...*): Observable source

import {concatStatic} from '@reactivex/rxjs/es6/operator/concat.js'

Joins multiple observables together by subscribing to them one at a time and merging their results into the returned observable. Will wait for each observable to complete before moving on to the next.

Params:

NameTypeAttributeDescription
observables ...*

Return:

Observable

All values of each passed observable merged into a single observable, in order, in serial fashion.

public count(predicate: function): Observable source

Returns an observable of a single number that represents the number of items that either: Match a provided predicate function, or if a predicate is not provided, the number represents the total count of all items in the source observable. The count is emitted by the returned observable when the source observable completes.

Params:

NameTypeAttributeDescription
predicate function
  • optional

a boolean function to select what values are to be counted. it is provided with arguments of:

  • value: the value from the source observable
  • index: the "index" of the value from the source observable
  • source: the source observable instance itself.

Return:

Observable

an observable of one number that represents the count as described above

public debounce(durationSelector: function): Observable source

Returns the source Observable delayed by the computed debounce duration, with the duration lengthened if a new source item arrives before the delay duration ends. In practice, for each item emitted on the source, this operator holds the latest item, waits for a silence as long as the durationSelector specifies, and only then emits the latest source item on the result Observable.

Params:

NameTypeAttributeDescription
durationSelector function

function for computing the timeout duration for each item.

Return:

Observable

an Observable the same as source Observable, but drops items.

public debounceTime(dueTime: number, scheduler: Scheduler): Observable source

Returns the source Observable delayed by the computed debounce duration, with the duration lengthened if a new source item arrives before the delay duration ends. In practice, for each item emitted on the source, this operator holds the latest item, waits for a silence for the dueTime length, and only then emits the latest source item on the result Observable. Optionally takes a scheduler for manging timers.

Params:

NameTypeAttributeDescription
dueTime number

the timeout value for the window of time required to not drop the item.

scheduler Scheduler
  • optional

the Scheduler to use for managing the timers that handle the timeout for each item.

Return:

Observable

an Observable the same as source Observable, but drops items.

public defaultIfEmpty(defaultValue: any): Observable source

import {defaultIfEmpty} from '@reactivex/rxjs/es6/operator/defaultIfEmpty.js'

Returns an Observable that emits the elements of the source or a specified default value if empty.

Params:

NameTypeAttributeDescription
defaultValue any

the default value used if source is empty; defaults to null.

Return:

Observable

an Observable of the items emitted by the where empty values are replaced by the specified default value or null.

public delay(delay: number | Date, scheduler: Scheduler): Observable source

Returns an Observable that delays the emission of items from the source Observable by a given timeout or until a given Date.

Params:

NameTypeAttributeDescription
delay number | Date

the timeout value or date until which the emission of the source items is delayed.

scheduler Scheduler
  • optional

the Scheduler to use for managing the timers that handle the timeout for each item.

Return:

Observable

an Observable that delays the emissions of the source Observable by the specified timeout or Date.

public delayWhen(selector: Function, sequence: Observable): Observable source

Returns an Observable that delays the emission of items from the source Observable by a subscription delay and a delay selector function for each element.

Params:

NameTypeAttributeDescription
selector Function

function to retrieve a sequence indicating the delay for each given element.

sequence Observable

indicating the delay for the subscription to the source.

Return:

Observable

an Observable that delays the emissions of the source Observable by the specified timeout or Date.

public dematerialize(): Observable source

import {dematerialize} from '@reactivex/rxjs/es6/operator/dematerialize.js'

Returns an Observable that transforms Notification objects into the items or notifications they represent.

Return:

Observable

an Observable that emits items and notifications embedded in Notification objects emitted by the source Observable.

public distinct(compare: function, flushes: Observable): Observable source

Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items. If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted. If a comparator function is not provided, an equality check is used by default. As the internal HashSet of this operator grows larger and larger, care should be taken in the domain of inputs this operator may see. An optional parameter is also provided such that an Observable can be provided to queue the internal HashSet to flush the values it holds.

Params:

NameTypeAttributeDescription
compare function
  • optional

optional comparison function called to test if an item is distinct from previous items in the source.

flushes Observable
  • optional

optional Observable for flushing the internal HashSet of the operator.

Return:

Observable

an Observable that emits items from the source Observable with distinct values.

public distinctKey(key: string, compare: function, flushes: Observable): Observable source

Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items, using a property accessed by using the key provided to check if the two items are distinct. If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted. If a comparator function is not provided, an equality check is used by default. As the internal HashSet of this operator grows larger and larger, care should be taken in the domain of inputs this operator may see. An optional parameter is also provided such that an Observable can be provided to queue the internal HashSet to flush the values it holds.

Params:

NameTypeAttributeDescription
key string

string key for object property lookup on each item.

compare function
  • optional

optional comparison function called to test if an item is distinct from previous items in the source.

flushes Observable
  • optional

optional Observable for flushing the internal HashSet of the operator.

Return:

Observable

an Observable that emits items from the source Observable with distinct values.

public distinctUntilKeyChanged(key: string, compare: function): Observable source

import {distinctUntilKeyChanged} from '@reactivex/rxjs/es6/operator/distinctUntilKeyChanged.js'

Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item, using a property accessed by using the key provided to check if the two items are distinct. If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted. If a comparator function is not provided, an equality check is used by default.

Params:

NameTypeAttributeDescription
key string

string key for object property lookup on each item.

compare function
  • optional

optional comparison function called to test if an item is distinct from the previous item in the source.

Return:

Observable

an Observable that emits items from the source Observable with distinct values based on the key specified.

public elementAt(index: number, defaultValue: any): Observable source

Returns an Observable that emits the item at the specified index in the source Observable. If default is given, missing indices will output this value on next; otherwise, outputs error.

Params:

NameTypeAttributeDescription
index number

the index of the value to be retrieved.

defaultValue any
  • optional

the default value returned for missing indices.

Return:

Observable

an Observable that emits a single item, if it is found. Otherwise, will emit the default value if given.

public every(predicate: function, thisArg: any): Observable source

Returns an Observable that emits whether or not every item of the source satisfies the condition specified.

Params:

NameTypeAttributeDescription
predicate function

a function for determining if an item meets a specified condition.

thisArg any
  • optional

optional object to use for this in the callback

Return:

Observable

an Observable of booleans that determines if all items of the source Observable meet the condition specified.

public exhaust(): Observable source

Returns an Observable that takes a source of observables and propagates the first observable exclusively until it completes before subscribing to the next. Items that come in before the first has exhausted will be dropped. Similar to concatAll, but will not hold on to items that come in before the first is exhausted.

Return:

Observable

an Observable which contains all of the items of the first Observable and following Observables in the source.

public exhaustMap(project: function, resultSelector: function): Observable source

Returns an Observable that applies the given function to each item of the source Observable to create a new Observable, which are then concatenated together to produce a new Observable.

Params:

NameTypeAttributeDescription
project function

function called for each item of the source to produce a new Observable.

resultSelector function
  • optional

optional function for then selecting on each inner Observable.

Return:

Observable

an Observable containing all the projected Observables of each item of the source concatenated together.

public expand(project: function, concurrent: number, scheduler: Scheduler): Observable source

Returns an Observable where for each item in the source Observable, the supplied function is applied to each item, resulting in a new value to then be applied again with the function.

Params:

NameTypeAttributeDescription
project function

the function for projecting the next emitted item of the Observable.

concurrent number
  • optional

the max number of observables that can be created concurrently. defaults to infinity.

scheduler Scheduler
  • optional

The Scheduler to use for managing the expansions.

Return:

Observable

an Observable containing the expansions of the source Observable.

public filter(select: Function, thisArg: any): Observable source

Similar to the well-known Array.prototype.filter method, this operator filters values down to a set allowed by a select function

Params:

NameTypeAttributeDescription
select Function

a function that is used to select the resulting values if it returns true, the value is emitted, if false the value is not passed to the resulting observable

thisArg any
  • optional

an optional argument to determine the value of this in the select function

Return:

Observable

an observable of values allowed by the select function

public find(predicate: function): Observable source

Returns an Observable that searches for the first item in the source Observable that matches the specified condition, and returns the first occurrence in the source.

Params:

NameTypeAttributeDescription
predicate function

function called with each item to test for condition matching.

Return:

Observable

an Observable of the first item that matches the condition.

public findIndex(predicate: function): Observable source

Returns an Observable that searches for the first item in the source Observable that matches the specified condition, and returns the the index of the item in the source.

Params:

NameTypeAttributeDescription
predicate function

function called with each item to test for condition matching.

Return:

Observable

an Observable of the index of the first item that matches the condition.

public first(predicate: function): Observable source

Returns an Observable that emits the first item of the source Observable that matches the specified condition. Throws an error if matching element is not found.

Params:

NameTypeAttributeDescription
predicate function

function called with each item to test for condition matching.

Return:

Observable

an Observable of the first item that matches the condition.

public groupBy(keySelector: Function, elementSelector: Function): Observable source

Groups the items emitted by an Observable according to a specified criterion, and emits these grouped items as GroupedObservables, one GroupedObservable per group.

Params:

NameTypeAttributeDescription
keySelector Function

a function that extracts the key for each item

elementSelector Function

a function that extracts the return element for each item

Return:

Observable

an Observable that emits GroupedObservables, each of which corresponds to a unique key value and each of which emits those items from the source Observable that share that key value.

public ignoreElements(): Observable source

import {ignoreElements} from '@reactivex/rxjs/es6/operator/ignoreElements.js'

Ignores all items emitted by the source Observable and only passes calls of complete or error.

Return:

Observable

an empty Observable that only calls complete or error, based on which one is called by the source Observable.

public isEmpty(): Observable source

If the source Observable is empty it returns an Observable that emits true, otherwise it emits false.

Return:

Observable

an Observable that emits a Boolean.

public last(predicate: function): Observable source

Returns an Observable that emits only the last item emitted by the source Observable. It optionally takes a predicate function as a parameter, in which case, rather than emitting the last item from the source Observable, the resulting Observable will emit the last item from the source Observable that satisfies the predicate.

Params:

NameTypeAttributeDescription
predicate function

the condition any source emitted item has to satisfy.

Return:

Observable

an Observable that emits only the last item satisfying the given condition from the source, or an NoSuchElementException if no such items are emitted.

Throw:

*

Throws if no items that match the predicate are emitted by the source Observable.

public map(project: Function, thisArg: any): Observable source

Similar to the well known Array.prototype.map function, this operator applies a projection to each value and emits that projection in the returned observable

Params:

NameTypeAttributeDescription
project Function

the function to create projection

thisArg any
  • optional

an optional argument to define what this is in the project function

Return:

Observable

a observable of projected values

public mapTo(value: any): Observable source

Maps every value to the same value every time.

Params:

NameTypeAttributeDescription
value any

the value to map each incoming value to

Return:

Observable

an observable of the passed value that emits every time the source does

public materialize(): Observable source

Returns an Observable that represents all of the emissions and notifications from the source Observable into emissions marked with their original types within a Notification objects.

Return:

Observable

an Observable that emits items that are the result of materializing the items and notifications of the source Observable.

public max(optional: Function): Observable source

The Max operator operates on an Observable that emits numbers (or items that can be evaluated as numbers), and when source Observable completes it emits a single item: the item with the largest number.

Params:

NameTypeAttributeDescription
optional Function

comparer function that it will use instead of its default to compare the value of two items.

Return:

Observable

an Observable that emits item with the largest number.

public merge(input: Observable): Observable source

Creates a result Observable which emits values from every given input Observable.

Params:

NameTypeAttributeDescription
input Observable

Observables

Return:

Observable

an Observable that emits items that are the result of every input Observable.

public mergeMap(a: Function): Observable source

Returns an Observable that emits items based on applying a function that you supply to each item emitted by the source Observable, where that function returns an Observable, and then merging those resulting Observables and emitting the results of this merger.

Params:

NameTypeAttributeDescription
a Function

function that, when applied to an item emitted by the source Observable, returns an Observable.

Return:

Observable

an Observable that emits the result of applying the transformation function to each item emitted by the source Observable and merging the results of the Observables obtained from this transformation

public min(optional: Function): Observable<R> source

The Min operator operates on an Observable that emits numbers (or items that can be evaluated as numbers), and when source Observable completes it emits a single item: the item with the smallest number.

Params:

NameTypeAttributeDescription
optional Function

comparer function that it will use instead of its default to compare the value of two items.

Return:

Observable<R>

an Observable that emits item with the smallest number.

public multicast(selector: Function): Observable source

Returns an Observable that emits the results of invoking a specified selector on items emitted by a ConnectableObservable that shares a single subscription to the underlying stream.

Params:

NameTypeAttributeDescription
selector Function

a function that can use the multicasted source stream as many times as needed, without causing multiple subscriptions to the source stream. Subscribers to the given source will receive all notifications of the source from the time of the subscription forward.

Return:

Observable

an Observable that emits the results of invoking the selector on the items emitted by a ConnectableObservable that shares a single subscription to the underlying stream.

public pairwise(): Observable<R> source

Returns a new observable that triggers on the second and following inputs. An input that triggers an event will return an pair of [(N - 1)th, Nth]. The (N-1)th is stored in the internal state until Nth input occurs.

Return:

Observable<R>

an observable of pairs of values.

public pluck(properties: ...args): Observable source

Retrieves the value of a specified nested property from all elements in the Observable sequence. If a property can't be resolved, it will return undefined for that value.

Params:

NameTypeAttributeDescription
properties ...args

the nested properties to pluck

Return:

Observable

Returns a new Observable sequence of property values

public publish(): * source

Returns a ConnectableObservable, which is a variety of Observable that waits until its connect method is called before it begins emitting items to those Observers that have subscribed to it.

Return:

*

a ConnectableObservable that upon connection causes the source Observable to emit items to its Observers.

public race(): Observable source

Returns an Observable that mirrors the first source Observable to emit an item from the combination of this Observable and supplied Observables

Params:

NameTypeAttributeDescription
...observables ...Observables

sources used to race for which Observable emits first.

Return:

Observable

an Observable that mirrors the output of the first Observable to emit an item.

public raceStatic(): Observable source

import {raceStatic} from '@reactivex/rxjs/es6/operator/race.js'

Returns an Observable that mirrors the first source Observable to emit an item.

Params:

NameTypeAttributeDescription
...observables ...Observables

sources used to race for which Observable emits first.

Return:

Observable

an Observable that mirrors the output of the first Observable to emit an item.

public reduce(the: initialValue, an: accumulator): Observable source

Returns an Observable that applies a specified accumulator function to the first item emitted by a source Observable, then feeds the result of that function along with the second item emitted by the source Observable into the same function, and so on until all items have been emitted by the source Observable, and emits the final result from the final call to your function as its sole item. This technique, which is called "reduce" here, is sometimes called "aggregate," "fold," "accumulate," "compress," or "inject" in other programming contexts.

Params:

NameTypeAttributeDescription
the initialValue

initial (seed) accumulator value

an accumulator

accumulator function to be invoked on each item emitted by the source Observable, the result of which will be used in the next accumulator call.

Return:

Observable

an Observable that emits a single item that is the result of accumulating the output from the items emitted by the source Observable.

public repeat(scheduler: Scheduler, count: number): Observable source

Returns an Observable that repeats the stream of items emitted by the source Observable at most count times, on a particular Scheduler.

Params:

NameTypeAttributeDescription
scheduler Scheduler
  • optional

the Scheduler to emit the items on.

count number
  • optional

the number of times the source Observable items are repeated, a count of 0 will yield an empty Observable.

Return:

Observable

an Observable that repeats the stream of items emitted by the source Observable at most count times.

public retry(number: number): Observable source

Returns an Observable that mirrors the source Observable, resubscribing to it if it calls error and the predicate returns true for that specific exception and retry count. If the source Observable calls error, this method will resubscribe to the source Observable for a maximum of count resubscriptions (given as a number parameter) rather than propagating the error call.

Any and all items emitted by the source Observable will be emitted by the resulting Observable, even those emitted during failed subscriptions. For example, if an Observable fails at first but emits [1, 2] then succeeds the second time and emits: [1, 2, 3, 4, 5] then the complete stream of emissions and notifications would be: [1, 2, 1, 2, 3, 4, 5, complete].

Params:

NameTypeAttributeDescription
number number

of retry attempts before failing.

Return:

Observable

the source Observable modified with the retry logic.

public retryWhen(receives: notificationHandler, the: scheduler): Observable source

Returns an Observable that emits the same values as the source observable with the exception of an error. An error will cause the emission of the Throwable that cause the error to the Observable returned from notificationHandler. If that Observable calls onComplete or error then retry will call complete or error on the child subscription. Otherwise, this Observable will resubscribe to the source observable, on a particular Scheduler.

Params:

NameTypeAttributeDescription
receives notificationHandler

an Observable of notifications with which a user can complete or error, aborting the retry.

the scheduler

Scheduler on which to subscribe to the source Observable.

Return:

Observable

the source Observable modified with retry logic.

public sample(sampler: Observable): Observable<T> source

Returns an Observable that, when the specified sampler Observable emits an item or completes, it then emits the most recently emitted item (if any) emitted by the source Observable since the previous emission from the sampler Observable.

Params:

NameTypeAttributeDescription
sampler Observable

the Observable to use for sampling the source Observable.

Return:

Observable<T>

an Observable that emits the results of sampling the items emitted by this Observable whenever the sampler Observable emits an item or completes.

public scan(accumulator: function, seed: any): Obervable source

Returns an Observable that applies a specified accumulator function to each item emitted by the source Observable. If a seed value is specified, then that value will be used as the initial value for the accumulator. If no seed value is specified, the first item of the source is used as the seed.

Params:

NameTypeAttributeDescription
accumulator function

The accumulator function called on each item.

seed any
  • optional

The initial accumulator value.

Return:

Obervable

An observable of the accumulated values.

public share(): Observable<T> source

Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream hot. This is an alias for .publish().refCount().

Return:

Observable<T>

an Observable that upon connection causes the source Observable to emit items to its Observers

public single(a: Function): Observable<T> source

Returns an Observable that emits the single item emitted by the source Observable that matches a specified predicate, if that Observable emits one such item. If the source Observable emits more than one such item or no such items, notify of an IllegalArgumentException or NoSuchElementException respectively.

Params:

NameTypeAttributeDescription
a Function

predicate function to evaluate items emitted by the source Observable.

Return:

Observable<T>

an Observable that emits the single item emitted by the source Observable that matches the predicate. .

public skip(the: Number): Observable source

Returns an Observable that skips n items emitted by an Observable.

Params:

NameTypeAttributeDescription
the Number

n of times, items emitted by source Observable should be skipped.

Return:

Observable

an Observable that skips values emitted by the source Observable.

public skipUntil(the: Observable): Observable<T> source

Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item.

Params:

NameTypeAttributeDescription
the Observable

second Observable that has to emit an item before the source Observable's elements begin to be mirrored by the resulting Observable.

Return:

Observable<T>

an Observable that skips items from the source Observable until the second Observable emits an item, then emits the remaining items.

public skipWhile(predicate: Function): Observable<T> source

Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds true, but emits all further source items as soon as the condition becomes false.

Params:

NameTypeAttributeDescription
predicate Function

a function to test each item emitted from the source Observable.

Return:

Observable<T>

an Observable that begins emitting items emitted by the source Observable when the specified predicate becomes false.

public startWith(an: Values): Observable source

Returns an Observable that emits the items in a specified Iterable before it begins to emit items emitted by the source Observable.

Params:

NameTypeAttributeDescription
an Values

Iterable that contains the items you want the modified Observable to emit first.

Return:

Observable

an Observable that emits the items in the specified Iterable and then emits the items emitted by the source Observable.

public subscribeOn(the: Scheduler): Observable<T> source

Asynchronously subscribes Observers to this Observable on the specified Scheduler.

Params:

NameTypeAttributeDescription
the Scheduler

Scheduler to perform subscription actions on.

Return:

Observable<T>

the source Observable modified so that its subscriptions happen on the specified Scheduler .

public switchMap(a: Observable): Observable source

Returns a new Observable by applying a function that you supply to each item emitted by the source Observable that returns an Observable, and then emitting the items emitted by the most recently emitted of these Observables.

Params:

NameTypeAttributeDescription
a Observable

function that, when applied to an item emitted by the source Observable, returns an Observable.

Return:

Observable

an Observable that emits the items emitted by the Observable returned from applying func to the most recently emitted item emitted by the source Observable.

public withLatestFrom(observables: Observable, project: Function): * source

import {withLatestFrom} from '@reactivex/rxjs/es6/operator/withLatestFrom.js'

Params:

NameTypeAttributeDescription
observables Observable

the observables to get the latest values from.

project Function
  • optional

optional projection function for merging values together. Receives all values in order of observables passed. (e.g. a.withLatestFrom(b, c, (a1, b1, c1) => a1 + b1 + c1)). If this is not passed, arrays will be returned.

Return:

*