Skip to content

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 ​

Trait[] | ((out) => Trait[])

Returns ​

B

waygraph 0.18.3 (alpha) · Node 24+ · peer @playwright/test ^1.40.0 · syntax may change before 1.0: see what was removed