Interface that should be implemented in order to define a synchronous command

Since 1.5.0

interface Command<Model, Real> {
    check(m: Readonly<Model>): boolean;
    run(m: Model, r: Real): void;
    toString(): string;
}

Type Parameters

  • Model extends object
  • Real

Hierarchy (view full)

Methods

  • 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

    Parameters

    • m: Model

      Model, simplified or schematic representation of real system

    • r: Real

      Sytem under test

    Returns void

    Since 1.5.0