filterObserve()
Filter a read-only observe egress stream without turning it into a graph node.
The source stream owns ordering and lifecycle; this helper only decides whether to forward each ObserveEvent and returns the source unsubscribe unchanged.
Import
Section titled “Import”import { filterObserve } from "@graphrefly/ts/graph";Signature
Section titled “Signature”function filterObserve( stream: ObserveStream, predicate: ObservePredicate,): ObserveStreamParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
stream | ObserveStream | stream value used by the helper. |
predicate | ObservePredicate | predicate value used by the helper. |
Returns
Section titled “Returns”A ObserveStream value.
Example
Section titled “Example”import { filterObserve } from "@graphrefly/ts/graph";Source
Section titled “Source”packages/ts/src/graph/inspect.ts