UNPKG

pragmatic-fp-ts

Version:

Opinionated functional programming library with easy use in mind

7 lines (6 loc) 432 B
import { Mappable } from "./main"; type Catcher<A, B> = ((err: Error, value: A) => B) | ((err: Error) => B); export declare function tryCatch<A, B>(tryer: Mappable<A, B>, catcher: Catcher<A, B>, value: A): B; export declare function tryCatch<A, B>(tryer: Mappable<A, B>, catcher: Catcher<A, B>): (value: A) => B; export declare function tryCatch<A, B>(tryer: Mappable<A, B>): (catcher: Catcher<A, B>) => (value: A) => B; export {};