Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "sinks/reduce"

Index

Functions

Functions

reduce

  • Accumulates value, starting with v0 and applying f to each emitted item. If no items are emitted the promise is rejected.

    Type parameters

    • U

      Type of result returned from the accumulator.

    • T

      Type of items emitted by the observable.

    Parameters

    • o: Observable<T>

      Observable to reduce.

    • f: ScanFunc<U, T>

      Reduce function called with the accumulated value so far and the current item. Should return a new accumulated value.

    • v0: U

      Initial accumulator value.

    Returns Promise<U>

    Promise that resolves with the accumulated value.

Generated using TypeDoc