Skip to content

combine

function combine<T, E>(results): Result<T, E>;

Defined in: packages/engine/src/errors/Result.ts:87

Combine several Results into one, succeeds with a tuple of all values iff every input succeeded; otherwise fails with the FIRST error encountered (left-to-right), matching this codebase’s existing fail-fast convention elsewhere (e.g. BytecodeBuilder’s constant-pool limit checks).

Type Parameter
T extends readonly unknown[]
E
ParameterType
results{ [K in string | number | symbol]: Result<T[K], E> }

Result<T, E>