@hegeldev/hegel
    Preparing search index...

    Type Alias RuleFn<S>

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

    The body of 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>