Skip to main content
Module

x/ahh/src/result/mod.ts

Opinionated idiomatic type-safety functions.
Go to Latest
import * as ahh from "https://deno.land/x/ahh@v0.11.0/src/result/mod.ts";

Functions

Return other if res is Ok, or res.

Returns whether res strictly equals value, or false if it is an Err.

Returns whether res strictly equals value, or false if it is an Ok.

Converts res into a Some if it is an Err.

Calls f and returns the result as an Ok, or returns an Err if it throws.

Calls f with res, and returns the original res.

Calls f with res, and returns the original res.

Returns whether res is an Err.

Returns whether res is an Ok.

Calls f with res, and returns the result.

Calls f with res, and returns the result.

Converts res into a Some if it is an Ok.

Return res if it is an Ok, or other.

Returns res if it is an Ok, or throws.

Returns res if it is an Ok, or returns default_.

Type Aliases

Represents a Result that was erroneous.

Represents a Result that was successful.

Represents a value that is either successful (Ok) or erroneous (Err).