waygraph / connect
Function: connect()
connect<
A,B,C>(a,b):Block<A,C>
Defined in: src/engine/run/connect.ts:30
Composes two Blocks into one, typechecked so this only compiles when A's output tag equals B's input tag. The composed Block's act runs A's full instruction (act -> observe? -> resolve) then hands the resulting Checkpoint into B's act; its own observe/resolve are simply B's, since B is what decides the final Out.
A's verify and expectations run here, on the intermediate Checkpoint, right before B's act: a map()-built Flow is its steps reduced into one composed Block, so runGraph's loop only sees the last step's. B's expectations ride on the composed Block, for that loop.
Type Parameters
A
A extends Checkpoint<string>
B
B extends Checkpoint<string>
C
C extends Checkpoint<string>
Parameters
a
Block<A, B>
b
Block<B, C>
Returns
Block<A, C>