Package: effect
Module: Option
Creates an Option representing the absence of a value.
When to use
Use to represent a missing or uninitialized value, such as returning “no result” from a function.
Details
Option<never>, which is a subtype of Option<A> for any AExample (Creating an empty Option)
import { Option } from "effect"
// ┌─── Option<never>
// ▼
const noValue = Option.none()
console.log(noValue)
// Output: { _id: 'Option', _tag: 'None' }
See
some for the opposite operation.Signature
declare const none: <A = never>() => Option<A>
Since v2.0.0