We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Usage: createGate<V>(open?: boolean)
createGate<V>(open?: boolean)
Module: flowcode-flow
Type: Gate<V>
Gate<V>
Input ports:
all
{d_val: V, st_open: boolean}
d_val
V
st_open
boolean
Output ports:
b_all
b_d_val
Forwards input value when gate is open. Operates in either independent or joined input mode. Bounces input when gate is closed.
import {connect} from "flowcode"; import {createGate} from "flowcode-flow"; const gate = createGate(false); connect(gate.o.d_val, console.log); gate.i.d_val("a"); // doesn't log gate.i.st_open(true); gate.i.d_val("b"); // logs: "b"