property CommandHandlerRegistration.handler

The handler to register for that type, or a factory that builds one from the service registry.

An instance registers on the bus during register(). A factory is called at the onInit phase — after every plugin has registered — and its result is registered under this entry's type, so it can resolve a capability (the event bus, the logger) its contract's message parameter cannot carry.

Type

ICommandHandler | RegistryFactory<ICommandHandler>

Usage

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