Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

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

Converts res into a Some if it is an Err.

Examples

Example 1

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

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

Type Parameters

T
E extends Error