The action a command runs. ARGS is the per-invocation input (execute(args)) —
deliberately a separate type from STATE (the current model value the command
reflects, read via getState()). They flow in opposite directions — STATE is output
(command → UI, for display/enablement), args is input (UI → command) — and only
coincidentally share a type (a font picker is STATE = stringandARGS = string). A
toggle is STATE = boolean, ARGS = void (it just toggles). See design/COMMAND-DESIGN.md
"arg vs state".
The action a command runs.
ARGSis the per-invocation input (execute(args)) — deliberately a separate type fromSTATE(the current model value the command reflects, read viagetState()). They flow in opposite directions —STATEis output (command → UI, for display/enablement),argsis input (UI → command) — and only coincidentally share a type (a font picker isSTATE = stringandARGS = string). A toggle isSTATE = boolean, ARGS = void(it just toggles). See design/COMMAND-DESIGN.md "arg vs state".