Function: toPromise()
toPromise<
T,E>(task):Promise<Result<T,E>>
Standalone version of Task.prototype.toPromise.
Type Parameters
T
T
The type of the value when the Task resolves successfully.
E
E
The type of the rejection reason when the Task rejects.
Parameters
task
Task<T, E>
Returns
Promise<Result<T, E>>