Skip to content

Interface: CommandDispatchOptions

Defined in: src/wirestate-core/plugin/commands/commands.ts:75

Per-dispatch options for CommandBus.execute and CommandBus.executeAsync.

Example

typescript
const receipt = commandBus.execute<Receipt>("UPLOAD", draft, { optional: true });

Properties

optional?

ts
readonly optional optional?: boolean;

Defined in: src/wirestate-core/plugin/commands/commands.ts:79

Allows a missing handler and returns undefined instead of throwing.