Skip to content

Function: combine()

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

Defined in: result.ts:145

Combines an array of Results into a single Result containing an array of values. Returns the first error encountered, or an array of all values if all Results are Ok.

Type Parameters

Type Parameter
T
E

Parameters

ParameterType
resultsResult<T, E>[]

Returns

Result<T[], E>