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.