Skip to main content
Module

x/fun/async.ts>tryCatch

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function tryCatch
import { tryCatch } from "https://deno.land/x/fun@v2.0.0/async.ts";

Type Parameters

AS extends unknown[]
A

Parameters

fasr: (...as: AS) => A | PromiseLike<A>
onThrow: (e: unknown, as: AS) => A

Returns

(...as: AS) => Async<A>