Package: effect
Module: Option
Wraps the given value into an Option to represent its presence.
Example (Creating an Option with a Value)
import { Option } from "effect"
// An Option holding the number 1
//
// ┌─── Option<number>
// ▼
const value = Option.some(1)
console.log(value)
// Output: { _id: 'Option', _tag: 'Some', value: 1 }
See
none for the opposite operation.Signature
declare const some: <A>(value: A) => Option<A>
Since v2.0.0