Type Alias: CommandType
ts
type CommandType = string | symbol;Defined in: src/wirestate-core/types/commands.ts:23
Represents token used to dispatch and handle commands.
Remarks
Use strings for public commands and symbols for private/scoped commands to avoid name collisions.
Example
typescript
const PUBLIC_COMMAND: CommandType = "USER/LOGIN";
const PRIVATE_COMMAND: CommandType = Symbol("INTERNAL/SYNC");
enum CounterCommand {
INCREMENT = "COUNTER/INCREMENT",
DECREMENT = "COUNTER/DECREMENT",
}