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