Skip to main content
Module

x/eitherway/mod.ts>Err

Yet Another Option and Result Implementation - providing safe abstractions for fallible flows inspired by F# and Rust
Latest
type alias Err
Re-export
import { type Err } from "https://deno.land/x/eitherway@0.10.0/mod.ts";

Err

The failure variant of a Result<T, E>

Examples

Example 1

import { assert } from "./assert.ts";
import { Err, Ok, Result } from "./result.ts";

const err = Err("Problem");
const tag = Object.prototype.toString.call(Err);

assert(err instanceof Err);
assert(err instanceof Result);
assert(tag === "[object eitherway::Result::Err]");
definition: _Err<E>
function Err
Re-export
import { Err } from "https://deno.land/x/eitherway@0.10.0/mod.ts";