API Reference
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
import { coalesceObserve } from "@graphrefly/ts/graph";
Signature
function coalesceObserve(
stream: ObserveStream,
equals: ObserveEventEquals = sameObserveEvent,
): ObserveStream
Parameters
| Parameter | Type | Description |
|---|---|---|
stream | ObserveStream | stream value used by the helper. |
equals | ObserveEventEquals | equals value used by the helper. |
Returns
A ObserveStream value.
Example
import { coalesceObserve } from "@graphrefly/ts/graph";
Source
packages/ts/src/graph/inspect.ts