Interface ICommand<Model, Real, RunResult, CheckAsync>

Interface that should be implemented in order to define a command

Since 1.5.0

interface ICommand<
    Model extends object,
    Real,
    RunResult,
    CheckAsync extends boolean = false,
> {
    check(
        m: Readonly<Model>,
    ): CheckAsync extends false ? boolean : Promise<boolean>;
    run(m: Model, r: Real): RunResult;
    toString(): string;
}

Type Parameters

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

Hierarchy (View Summary)

Methods