tryCatch
tryCatch<
E,A>(f,onError):TaskValidation<E,A>
Defined in: Core/TaskValidation.ts:58
Creates a TaskValidation from a Promise-returning function. Catches any errors and transforms them using the onError function.
Type Parameters
Section titled “Type Parameters”E
A
Parameters
Section titled “Parameters”() => Promise<A>
onError
Section titled “onError”(e) => E
Returns
Section titled “Returns”TaskValidation<E, A>