fromThrowable
fromThrowable<
Args,A,E>(f,onError): (…args) =>TaskResult<E,A>
Defined in: Core/TaskResult.ts:53
Wraps a Promise-returning function of any arguments, returning a new function that catches rejections and returns a TaskResult.
Type Parameters
Section titled “Type Parameters”Args extends readonly unknown[]
A
E
Parameters
Section titled “Parameters”(…args) => Promise<A>
onError
Section titled “onError”(e) => E
Returns
Section titled “Returns”(…args) => TaskResult<E, A>