Skip to main content
Module

x/fun/async_either.ts>throwError

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function throwError
import { throwError } from "https://deno.land/x/fun@v.2.0.0-alpha.11/async_either.ts";

Construct an AsyncEither<B, A> from a value B.

Examples

Example 1

import * as AE from "./async_either.ts";

const value = AE.throwError("Error!");

const result = await value(); // Left("Error!");

Type Parameters

optional
A = never
optional
B = never