GraphReFlyTS

API Reference

valve()

valve: forward the source's DATA only while control (dep 1) is truthy; when closed, stay quiet (undirty RESOLVED). [source, control] declared deps + partial:true (the control wave can fire before the source ever delivers). completeWhenDepsComplete:false — closing the gate (control terminating) does NOT complete the valve; only the SOURCE's terminal (read via terminalAsRealInput) is forwarded. The state-verb control input is a legitimate external boundary (D4 / D54), not a forbidden imperative trigger.

Import

import { valve } from "@graphrefly/ts/operators";

Signature

function valve(opts?: ValveOpts): Operator<S, S>

Parameters

ParameterTypeDescription
optsValveOptsOptions that configure the helper.

Returns

A Operator<S, S> value.

Example

import { valve } from "@graphrefly/ts/operators";

Source

packages/ts/src/graph/operators.ts