method CommandBus.prototype.execute
CommandBus.prototype.execute<TResult = unknown>(command: CqrsCommand): Promise<TResult>

Executes a command.

Type Parameters

TResult = unknown

Parameters

command: CqrsCommand

The command to execute

Return Type

Promise<TResult>

The handler's result

Usage

import { CommandBus } from "cqrs-plugin/src/index.ts";