Package: effect
Module: Option
Checks whether an Option contains a value (Some).
When to use
Use when you need to branch on a present Option before accessing .value.
Details
Some<A>Example (Checking for Some)
import { Option } from "effect"
console.log(Option.isSome(Option.some(1)))
// Output: true
console.log(Option.isSome(Option.none()))
// Output: false
See
isNone for the opposite check.Signature
declare const isSome: <A>(self: Option<A>) => self is Some<A>
Since v2.0.0