Skip to content

waygraph / defineBlock

Function: defineBlock() ​

defineBlock<In, Out>(base): DefinedBlock<In, Out>

Defined in: src/engine/block/block.ts:325

Type Parameters ​

In ​

In extends Checkpoint<string>

Out ​

Out extends Checkpoint<string>

Parameters ​

base ​

description? ​

string

instanceOptions? ​

(page) => Promise<readonly WaygraphInstanceOption<unknown>[]>

instruction ​

Omit<Instruction<In, Out, unknown>, "act"> & object

name ​

string

next? ​

(checkpoint) => SomeBlock | null | undefined

requires? ​

readonly MemKey<unknown>[]

routes? ​

Readonly<Record<string, string | null>>

screenshot? ​

StepScreenshot

A screenshot once the step is done: see StepScreenshot.

Returns ​

DefinedBlock<In, Out>

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