Function combine

  • Combine two observables with a map function and an optional pre-treatment.

    Note: you can use the pre-treatment to add a filter, a distinctUntilChanged, any other operator that can be used in a pipe, or even an UntilDestroy operator.

    Returns

    an observable that emits the result of the map function

    See

    • combineLatest
    • mapOperator

    Type Parameters

    Type Parameters

    • T

    • U

    • R

    Parameters

    • source1: Observable<T>

      first source of data

    • source2: Observable<U>

      second source of data

    • map: ((c: readonly [T, U]) => R)

      way to combine data

        • (c: readonly [T, U]): R
        • Parameters

          • c: readonly [T, U]

          Returns R

    • Optional options: combineOptions<T, U>

      options for the combineLatest operator

    Returns Observable<R>

Generated using TypeDoc