Produce a Task<T, E>
from a Promise<T>
and a function to transform an
unknown error to E
.
To leave any error as unknown
, use the overload which accepts only the
promise.
This will be removed at 9.0. Switch to the module-level function
safelyTryOrElse
, which accepts a callback instead.
Produce a
Task<T, E>
from aPromise<T>
and a function to transform an unknown error toE
.To leave any error as
unknown
, use the overload which accepts only the promise.