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

x/ahh/mod.ts>R.isOk

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

Returns whether res is an Ok.

Examples

Example 1

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

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

Type Parameters

T
E extends Error

Returns

res is Ok<T>