Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/eitherway/lib/core/result.ts

Yet Another Option and Result Implementation - providing safe abstractions for fallible flows inspired by F# and Rust
Latest
import * as eitherway from "https://deno.land/x/eitherway@0.10.0/lib/core/result.ts";

Namespaces

Utilities to work with collections of Result<T, E>

Functions

Use this as errMapFn to indicate that a function or Promise to be lifted into a Result or Task context is infallible

Use this to lift the result of an infallible function into a Result context.

Use this to lift the result of a fallible function into a Result context.

Use this to lift a function into a Result context, by composing the wrapped function with a Result constructor.

Use this to lift a fallible function into a Result context, by composing the wrapped function with a Result constructor and an error mapping function.

Interfaces

Base interface implemented by Ok<T> and Err<E>

Type Aliases

Err

Use this to infer the encapsulated Err<E> types from a tuple of Result<T,E>

Use this to infer the encapsulated Err<E> types from a Result<T,E>

Use this to infer a union of all encapsulated Err<E> types from a tuple of Result<T,E>

Use this to infer the encapsulated Ok<T> types from a tuple of Result<T,E>

Use this to infer the encapsulated Ok<T> types from a Result<T,E>

Use this to infer a union of all encapsulated Ok<T> types from a tuple of Result<T,E>

Ok

Result<T, E>