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

x/ahh/src/option.ts>isSome

Opinionated idiomatic features for TypeScript.
Latest
function isSome
import { isSome } from "https://deno.land/x/ahh@v0.14.0/src/option.ts";

Returns whether option is a Some value.

Examples

Example 1

import { assert } from "../test_deps.ts";
import O from "./option.ts";

assert(O.isSome(0));
assert(O.isSome(2));

Returns

option is Some<T>