Sha256: c40edf6a853cc5a994ba26b41846e33130b8d0b6cb56ba0b38c41f40f7efb48e

Contents?: true

Size: 1.33 KB

Versions: 49

Compression:

Stored size: 1.33 KB

Contents

import { Observable } from '../Observable';
/**
 * Applies an accumulator function over the source Observable where the
 * accumulator function itself returns an Observable, then each intermediate
 * Observable returned is merged into the output Observable.
 *
 * <span class="informal">It's like {@link scan}, but the Observables returned
 * by the accumulator are merged into the outer Observable.</span>
 *
 * @example <caption>Count the number of click events</caption>
 * const click$ = Rx.Observable.fromEvent(document, 'click');
 * const one$ = click$.mapTo(1);
 * const seed = 0;
 * const count$ = one$.mergeScan((acc, one) => Rx.Observable.of(acc + one), seed);
 * count$.subscribe(x => console.log(x));
 *
 * // Results:
 * 1
 * 2
 * 3
 * 4
 * // ...and so on for each click
 *
 * @param {function(acc: R, value: T): Observable<R>} accumulator
 * The accumulator function called on each source value.
 * @param seed The initial accumulation value.
 * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of
 * input Observables being subscribed to concurrently.
 * @return {Observable<R>} An observable of the accumulated values.
 * @method mergeScan
 * @owner Observable
 */
export declare function mergeScan<T, R>(this: Observable<T>, accumulator: (acc: R, value: T) => Observable<R>, seed: R, concurrent?: number): Observable<R>;

Version data entries

49 entries across 49 versions & 4 rubygems

Version Path
ilog-0.4.1 node_modules/rxjs/operator/mergeScan.d.ts
ilog-0.4.0 node_modules/rxjs/operator/mergeScan.d.ts
ilog-0.3.3 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-18.0.0 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.21.0 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.20.0 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.19.1 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.19.0 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.18.0 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.17.0 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.16.0 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.15.0 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.14.0 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.13.0 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.12.2 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.12.1 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.12.0 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.11.0 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.10.0 node_modules/rxjs/operator/mergeScan.d.ts
govuk_publishing_components-17.9.0 node_modules/rxjs/operator/mergeScan.d.ts