Documentation / @eventkit/base / mergeAll
Function: mergeAll()
function mergeAll<O>(concurrency): OperatorFunction<O, ObservedValueOf<O>>
Converts an observable that yields observables (called a higher-order observable) into a first-order observable which concurrently delivers all values that are yielded on the inner observables. Each time an inner observable gets yielded, it subscribes to it and yields all the values from the inner observable. The output observable only completes when all inner observables have completed. Any error delivered by a inner observable will be immediately thrown on the output observable.
A concurrency limit can be provided to limit the number of inner observables that are subscribed to at any given time. If an inner observable gets yielded when the concurrency limit is reached, it will be added to a queue and subscribed to when a previous inner observable has completed.
Type Parameters
Type Parameter |
---|
O extends AsyncObservableInput <any > |
Parameters
Parameter | Type | Default value |
---|---|---|
concurrency | number | Infinity |
Returns
OperatorFunction
<O
, ObservedValueOf
<O
>>