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

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

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

Returns whether res is an Ok.

Examples

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>