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>R.isErr

Idiomatic type-safety functions.
Go to Latest
method R.isErr
import { R } from "https://deno.land/x/ahh@v0.10.1/src/result/mod.ts";

Returns whether res is an Err.

Examples

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

console.log(R.isErr(1)); // false
console.log(R.isErr(Error())); // true

Type Parameters

T
E extends Error

Returns

res is Err<E>