Skip to content
PACKAGES

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 { filterObserve } from "@graphrefly/ts/graph";
function filterObserve(
stream: ObserveStream,
predicate: ObservePredicate,
): ObserveStream
ParameterTypeDescription
streamObserveStreamstream value used by the helper.
predicateObservePredicatepredicate value used by the helper.

A ObserveStream value.

import { filterObserve } from "@graphrefly/ts/graph";

packages/ts/src/graph/inspect.ts