Interface AsyncCommand<Model, Real, CheckAsync>

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

Remarks

Since 1.5.0

Type Parameters

  • Model extends object

  • Real

  • CheckAsync extends boolean = false

Hierarchy

  • ICommand<Model, Real, Promise<void>, CheckAsync>
    • AsyncCommand

Methods

Methods

  • Check if the model is in the right state to apply the command

    WARNING: does not change the model

    Remarks

    Since 1.5.0

    Parameters

    • m: Readonly<Model>

      Model, simplified or schematic representation of real system

    Returns CheckAsync extends false ? boolean : Promise<boolean>

  • 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

    Remarks

    Since 1.5.0

    Parameters

    • m: Model

      Model, simplified or schematic representation of real system

    • r: Real

      Sytem under test

    Returns Promise<void>

Generated using TypeDoc