PATH:
usr
/
local
/
lib
/
node_modules
/
ghost-cli
/
node_modules
/
rxjs
/
src
/
internal
/
operators
import { CombineLatestOperator } from '../observable/combineLatest'; import { Observable } from '../Observable'; import { OperatorFunction, ObservableInput } from '../types'; export function combineAll<T>(): OperatorFunction<ObservableInput<T>, T[]>; export function combineAll<T>(): OperatorFunction<any, T[]>; export function combineAll<T, R>(project: (...values: T[]) => R): OperatorFunction<ObservableInput<T>, R>; export function combineAll<R>(project: (...values: Array<any>) => R): OperatorFunction<any, R>; /** * Flattens an Observable-of-Observables by applying {@link combineLatest} when the Observable-of-Observables completes. * *  * * `combineAll` 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 using the {@link combineLatest}</a> strategy, such that: * * * Every time an inner Observable emits, the output Observable emits * * When the returned observable emits, it emits all of the latest values by: * * If a `project` function is provided, it is called with each recent value from each inner Observable in whatever order they * arrived, and the result of the `project` function is what is emitted by the output Observable. * * If there is no `project` function, an array of all the most recent values is emitted by the output Observable. * * --- * * ## Examples * * ### Map two click events to a finite interval Observable, then apply `combineAll` * * ```ts * import { fromEvent, interval } from 'rxjs'; * import { map, combineAll, take } from 'rxjs/operators'; * * const clicks = fromEvent(document, 'click'); * const higherOrder = clicks.pipe( * map(ev => * interval(Math.random() * 2000).pipe(take(3)) * ), * take(2) * ); * const result = higherOrder.pipe( * combineAll() * ); * * result.subscribe(x => console.log(x)); * ``` * * @see {@link combineLatest} * @see {@link mergeAll} * * @param {function(...values: Array<any>)} An optional function to map the most recent values from each inner Observable into a new result. * Takes each of the most recent values from each collected inner Observable as arguments, in order. * @return {Observable<T>} * @name combineAll */ export function combineAll<T, R>(project?: (...values: Array<any>) => R): OperatorFunction<T, R> { return (source: Observable<T>) => source.lift(new CombineLatestOperator(project)); }
[-] toArray.ts
[edit]
[-] window.ts
[edit]
[-] retry.ts
[edit]
[-] mergeAll.ts
[edit]
[-] windowWhen.ts
[edit]
[-] every.ts
[edit]
[-] timeout.ts
[edit]
[-] debounceTime.ts
[edit]
[-] index.ts
[edit]
[-] takeWhile.ts
[edit]
[-] audit.ts
[edit]
[-] reduce.ts
[edit]
[-] mapTo.ts
[edit]
[-] count.ts
[edit]
[-] debounce.ts
[edit]
[-] throwIfEmpty.ts
[edit]
[-] auditTime.ts
[edit]
[-] scan.ts
[edit]
[-] switchAll.ts
[edit]
[-] map.ts
[edit]
[-] bufferCount.ts
[edit]
[-] mergeScan.ts
[edit]
[-] publish.ts
[edit]
[-] min.ts
[edit]
[+]
..
[-] publishReplay.ts
[edit]
[-] bufferTime.ts
[edit]
[-] share.ts
[edit]
[-] repeat.ts
[edit]
[-] distinct.ts
[edit]
[-] concatMapTo.ts
[edit]
[-] buffer.ts
[edit]
[-] concatMap.ts
[edit]
[-] max.ts
[edit]
[-] partition.ts
[edit]
[-] observeOn.ts
[edit]
[-] bufferWhen.ts
[edit]
[-] dematerialize.ts
[edit]
[-] throttle.ts
[edit]
[-] groupBy.ts
[edit]
[-] withLatestFrom.ts
[edit]
[-] exhaust.ts
[edit]
[-] exhaustMap.ts
[edit]
[-] retryWhen.ts
[edit]
[-] zipAll.ts
[edit]
[-] find.ts
[edit]
[-] mergeMap.ts
[edit]
[-] single.ts
[edit]
[-] last.ts
[edit]
[-] combineLatest.ts
[edit]
[-] publishLast.ts
[edit]
[-] pluck.ts
[edit]
[-] pairwise.ts
[edit]
[-] distinctUntilChanged.ts
[edit]
[-] timeInterval.ts
[edit]
[-] shareReplay.ts
[edit]
[-] skipUntil.ts
[edit]
[-] findIndex.ts
[edit]
[-] windowToggle.ts
[edit]
[-] startWith.ts
[edit]
[-] timeoutWith.ts
[edit]
[-] concat.ts
[edit]
[-] materialize.ts
[edit]
[-] timestamp.ts
[edit]
[-] onErrorResumeNext.ts
[edit]
[-] subscribeOn.ts
[edit]
[-] takeUntil.ts
[edit]
[-] skipLast.ts
[edit]
[-] throttleTime.ts
[edit]
[-] mergeMapTo.ts
[edit]
[-] multicast.ts
[edit]
[-] merge.ts
[edit]
[-] takeLast.ts
[edit]
[-] delayWhen.ts
[edit]
[-] sampleTime.ts
[edit]
[-] tap.ts
[edit]
[-] take.ts
[edit]
[-] sample.ts
[edit]
[-] filter.ts
[edit]
[-] skip.ts
[edit]
[-] expand.ts
[edit]
[-] publishBehavior.ts
[edit]
[-] sequenceEqual.ts
[edit]
[-] ignoreElements.ts
[edit]
[-] catchError.ts
[edit]
[-] endWith.ts
[edit]
[-] refCount.ts
[edit]
[-] windowCount.ts
[edit]
[-] defaultIfEmpty.ts
[edit]
[-] windowTime.ts
[edit]
[-] switchMapTo.ts
[edit]
[-] switchMap.ts
[edit]
[-] delay.ts
[edit]
[-] bufferToggle.ts
[edit]
[-] repeatWhen.ts
[edit]
[-] concatAll.ts
[edit]
[-] first.ts
[edit]
[-] zip.ts
[edit]
[-] elementAt.ts
[edit]
[-] skipWhile.ts
[edit]
[-] race.ts
[edit]
[-] finalize.ts
[edit]
[-] combineAll.ts
[edit]
[-] distinctUntilKeyChanged.ts
[edit]
[-] isEmpty.ts
[edit]