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