waygraph / withVerify
Function: withVerify()
withVerify<
B>(block,verify):B
Defined in: src/engine/block/block.ts:381
Returns a new Block that runs exactly like block - same act/observe/resolve, same routing - but with verify replaced. For giving one flow stricter (or looser, or just different) confirmation on a Block it didn't author, without that Block needing to have been written as a parameterized factory in anticipation. Same move as branch(): decorate an existing Block, don't ask every Block to pre-build its own override mechanism.
Wrap the one Block you want to change, in place, where a flow uses it: map().gotoPage(NavLoginBlock).method(withVerify(AddToCartBlock, [...])).
Type Parameters
B
B extends SomeBlock
Parameters
block
B
verify
Returns
B