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
Section titled “Import”import { valve } from "@graphrefly/ts/operators";Signature
Section titled “Signature”function valve(opts?: ValveOpts): Operator<S, S>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
opts | ValveOpts | Options that configure the helper. |
Returns
Section titled “Returns”A Operator<S, S> value.
Example
Section titled “Example”import { valve } from "@graphrefly/ts/operators";Source
Section titled “Source”packages/ts/src/graph/operators.ts