tryCatchK()
tryCatchK<
A,B,E>(f,onThrow): (...a) =>Either<E,B>
Lifts a function to return an Either when called.
Type Parametersβ
A: A extends readonly unknown[]β
The argument types.
B: Bβ
The return type.
E: Eβ
The error type.
Parametersβ
f: (...a) => Bβ
The function to lift.
onThrow: (error) => Eβ
Function to transform thrown errors.
Returnsβ
A lifted function that returns an Either.
Sinceβ
2.0.0