@epikodelabs/streamix / src/public-api / combineLatest
Function: combineLatest()
combineLatest<
T>(...sources):Atom<T>
Defined in: projects/libraries/streamix/src/lib/factories/combineLatest.ts:19
Combines multiple sources and emits a tuple containing the latest values from each source whenever any of the source sources 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 atom will not emit a value until all source sources have emitted at least one value. The output atom completes when all source sources have completed.
Type Parameters
T
T extends unknown[] = any[]
A tuple type representing the combined values from the sources.
Parameters
sources
...PipeInput<T[number]>[]
Atoms, streams, or values (including promises) to combine.
Returns
Atom<T>
A new atom that emits a tuple of the latest values from all source sources.