Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/eitherway/lib/async/tasks.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/async/tasks.ts";

Functions

Use this to collect all Ok<T> values from an Array<Task<T,E>> or Iterable<Task<T,E>> into an Task<T[],E>. Upon encountring the first Err<E> value, this value is returned.

Use this to obtain the first found Ok<T> from an Array<Result<T,E>> or Iterable<Result<T,E>>. If no Ok<T> value is found, the Err<E> values are collected into an array and returned.

Type Aliases

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

Use this to infer the encapsulated <E> type from a Task<T,E>

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

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

Use this to infer the encapsulated <T> type from a Task<T,E>

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