effect-io-ai

Package: effect
Module: Option

Option.some

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

Signature

declare const some: <A>(value: A) => Option<A>

Source

Since v2.0.0