coalesceObserve()
Suppress adjacent duplicate ObserveEvents while preserving the source stream order.
This is egress-side coalescing only: it does not batch, delay, reorder, alter seq values, or add topology to describe(). Pass a custom equality when the caller wants a narrower or wider definition of “duplicate”.
Import
Section titled “Import”import { coalesceObserve } from "@graphrefly/ts/graph";Signature
Section titled “Signature”function coalesceObserve( stream: ObserveStream, equals: ObserveEventEquals = sameObserveEvent,): ObserveStreamParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
stream | ObserveStream | stream value used by the helper. |
equals | ObserveEventEquals | equals value used by the helper. |
Returns
Section titled “Returns”A ObserveStream value.
Example
Section titled “Example”import { coalesceObserve } from "@graphrefly/ts/graph";Source
Section titled “Source”packages/ts/src/graph/inspect.ts