vapor-chamber API reference - v1.16.0
    Preparing search index...

    Type Alias DeadLetterMode

    DeadLetterMode:
        | "error"
        | "throw"
        | "ignore"
        | "buffer"
        | ((cmd: Command) => CommandResult)

    Dead letter mode — what to do when a command has no registered handler.

    • 'error' (default): returns { ok: false, error }
    • 'throw': throws the error
    • 'ignore': returns { ok: true, value: undefined }
    • 'buffer': queue the command (per action, FIFO) and replay it — in order — the moment a handler for that action is register()-ed. Built for lazy/async wiring where a command can be dispatched before its handler exists (e.g. Astro/island hydration, code-split panels): the click isn't lost, it fires when the handler arrives. The synchronous dispatch returns { ok: true, value: undefined } (the real handler runs later). query never buffers (it must return a value) — it falls back to 'error'. Bounded by bufferLimit (drop-oldest + dev warning on overflow).
    • function: called with the command, return value used as result