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

x/ahh/src/result/mod.ts>R.err

Idiomatic type-safety structures for TypeScript.
Go to Latest
method R.err
import { R } from "https://deno.land/x/ahh@v0.10.0/src/result/mod.ts";

Converts res into a Some if it is an Err.

Examples

import { R } from "./mod.ts";

console.log(R.err(1)); // undefined
console.log(R.err(Error())); // Error()

Type Parameters

T
E extends Error