Interface that should be implemented in order to define an asynchronous command


Since 1.5.0

interface AsyncCommand<Model, Real, CheckAsync> {
    check(m): CheckAsync extends false
        ? boolean
        : Promise<boolean>;
    run(m, r): Promise<void>;
    toString(): string;

Type Parameters

  • Model extends object
  • Real
  • CheckAsync extends boolean = false

Hierarchy (view full)


  • Receive the non-updated model and the real or system under test. Perform the checks post-execution - Throw in case of invalid state. Update the model accordingly


    • m: Model

      Model, simplified or schematic representation of real system

    • r: Real

      Sytem under test

    Returns Promise<void>


    Since 1.5.0