cqrsCommandHandler()
Convenience helper for declaring typed command handlers in a CQRS bundle.
Import
Section titled “Import”import { cqrsCommandHandler } from "@graphrefly/ts/cqrs";Signature
Section titled “Signature”function cqrsCommandHandler( type: string, handle: CqrsCommandHandler<TCommand, TEvent>,): CqrsCommandHandlerDefinition<TCommand, TEvent>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
type | string | type value used by the helper. |
handle | CqrsCommandHandler<TCommand, TEvent> | handle value used by the helper. |
Returns
Section titled “Returns”A CqrsCommandHandlerDefinition<TCommand, TEvent> value.
Example
Section titled “Example”import { cqrsCommandHandler } from "@graphrefly/ts/cqrs";Source
Section titled “Source”packages/ts/src/cqrs/index.ts