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

Since 1.5.0

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

Type Parameters

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

Hierarchy (View Summary)

Methods