@epikodelabs/streamix / combineLatest
Function: combineLatest()
combineLatest<
T>(...sources):Stream<T>
Defined in: projects/libraries/streamix/src/lib/streams/combineLatest.ts:17
Combines multiple streams and emits a tuple containing the latest values from each stream whenever any of the source streams emits a new value.
This operator is useful for scenarios where you need to react to changes in multiple independent data sources simultaneously. The output stream will not emit a value until all source streams have emitted at least one value. The output stream completes when all source streams have completed.
Type Parameters
T
T extends unknown[] = any[]
A tuple type representing the combined values from the sources.
Parameters
sources
...(Stream<T[number]> | MaybePromise<T[number]>)[]
Streams or values (including promises) to combine.
Returns
Stream<T>
A new stream that emits a tuple of the latest values from all source streams.