Skip to content

Type Alias: CommandUnregister

ts
type CommandUnregister = () => void;

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

Removes one command handler registration.

Returns

void

Remarks

The callback returned by CommandBus.register(...) removes that exact registration. If a command has a shadowed handler underneath it, unregistering the active handler restores the previous one.

Example

typescript
const unregister: CommandUnregister = commandBus.register("MY_COMMAND", handler);

unregister();