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