effect-io-ai

Package: effect
Module: Option

Option.isNone

Checks whether an Option is None (absent).

When to use

Use when you need to branch on an absent Option before accessing .value.

Details

Example (Checking for None)

import { Option } from "effect"

console.log(Option.isNone(Option.some(1)))
// Output: false

console.log(Option.isNone(Option.none()))
// Output: true

See

Signature

declare const isNone: <A>(self: Option<A>) => self is None<A>

Source

Since v2.0.0