Function combineLatestToArray

  • Monitors sources, storing as they happen to an array. Whenever a new value is emitted, the whole array is sent out, containing current values from each source, or undefined if not yet emitted.

    The tempo of this stream will be set by the fastest source stream. See syncToArray to have pace determined by slowest source, and only send when each source has produce a new value compared to last time.

    Set onSourceDone to choose behaviour if a source stops. The default is 'break', meaning the whole combined stream stops.

    If a source completes and onSourceDone = 'allow', the option 'finalValue' sets the logic for what values get returned for the source. By default the setting is 'undefined', thus undefined results. 'last' will be the last (old) value from that source.

    Parameters

    Returns AsyncGenerator<any[]>