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

    Type Alias BatchOptions

    Options for batch dispatch

    type BatchOptions = {
        continueOnError?: boolean;
        transactional?: boolean;
        signal?: AbortSignal;
    }
    Index

    Properties

    continueOnError?: boolean
    transactional?: boolean

    All-or-nothing semantics: if any command fails, automatically run the registered undo handler for every command that already succeeded (in reverse order). Requires undo handlers to be registered via register(action, handler, { undo }). Commands without an undo handler are skipped during rollback. Mutually exclusive with continueOnError.

    signal?: AbortSignal

    AbortSignal applied to the whole batch. Aborting before the batch starts skips it entirely; aborting mid-flight stops further commands from dispatching (the in-flight one runs to completion since per-command abort already happened or is the handler's responsibility) and the batch result is { ok: false, error: AbortError, results: [...partial] }. Async bus only — sync dispatchBatch accepts the option for type uniformity but ignores it.