@hegeldev/hegel
    Preparing search index...

    Type Alias Rule<S>

    Rule: (tc: TestCase, state: S) => void | Promise<void>

    A rule of a StateMachine: one action applied to the state. It receives the test case, to draw the data it needs, and the state to act on.

    Rules run by run must be synchronous; rules run by runAsync may return a Promise, which is awaited before the next step.

    Type Parameters

    • S

    Type Declaration

      • (tc: TestCase, state: S): void | Promise<void>
      • Parameters

        Returns void | Promise<void>