Function: any()
any<
T
>(results
: [...T[]
]):Result
<UnwrapOkArray
<T
>[number
],UnwrapErrArray
<T
>>
Returns the first encountered Ok, or an Err that is the combination of all collected error values.
Type Parameters
Type Parameter |
---|
T extends readonly Result <any , any >[] |
Parameters
Parameter | Type | Description |
---|---|---|
results | [...T[] ] | An array of Results. |
Returns
Result
<UnwrapOkArray
<T
>[number
], UnwrapErrArray
<T
>>
A new Result.