Skip to content

Type Alias: CommandType

ts
type CommandType = string | symbol | number;

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

Identifies one imperative message handled by a command handler.

Remarks

Commands represent write-oriented work such as save, login, reset, etc. Prefer strings for public command contracts and symbols for private commands that should not collide with other packages.

Example

typescript
const LOGIN: CommandType = "USER/LOGIN";

const LOCAL_RESET: CommandType = Symbol("LOCAL_RESET");