mergeReactiveLogs()
Fan-in N reactive logs into one merged DELTA stream (D60 #5e — a DECLARED-DEP merge, NOT the old
internal-subscribe island). The returned node declares each log’s delta as a dep (partial)
and re-emits every change it sees — describe shows log[i].delta → merged truthfully (D45).
For the merged SNAPSHOT, fold the merged delta with {@link ReactiveLog.scan}-style logic, or
demand each source’s snapshot independently.
Import
Section titled “Import”import { mergeReactiveLogs } from "@graphrefly/ts/data-structures";Signature
Section titled “Signature”function mergeReactiveLogs(logs: readonly ReactiveLog<T>[]): Node<LogChange<T>>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
logs | readonly ReactiveLog<T>[] | logs value used by the helper. |
Returns
Section titled “Returns”A Node<LogChange<T>> value.
Example
Section titled “Example”import { mergeReactiveLogs } from "@graphrefly/ts/data-structures";Source
Section titled “Source”packages/ts/src/graph/data-structures/reactive-log.ts