/** * Interface that should be implemented in order to define a command * @public */ export interface ICommand { /** * Check if the model is in the right state to apply the command * * WARNING: does not change the model * * @param m - Model, simplified or schematic representation of real system */ check(m: Readonly): CheckAsync extends false ? boolean : Promise; /** * 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 * * @param m - Model, simplified or schematic representation of real system * @param r - Sytem under test */ run(m: Model, r: Real): RunResult; /** * Name of the command */ toString(): string; }