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

    Type Alias BatchOptions

    Options for batch dispatch

    type BatchOptions = {
        continueOnError?: boolean;
        transactional?: boolean;
        signal?: AbortSignal;
    }
    Index
    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: BusError('VC_CORE_ABORTED'), results: [...partial] } — a BusError rather than the raw DOMException so the code is queryable (see abortedResult; a caller-supplied signal.reason is passed through unchanged). Under transactional, rollback runs first and successCount is reported as 0. Async bus only — sync dispatchBatch accepts the option for type uniformity but ignores it.