The type of the value contained in the Option
Readonly
_Whether this Option contains no value
The number of elements in this Option (0 or 1)
Readonly
valueThe contained value (undefined for None)
Checks if this Option contains the specified value
The value to check for
true if this Option contains the value, false otherwise
Counts elements that satisfy the predicate. For single-value containers: returns 0 or 1 For collections: returns the count of matching elements
Tests whether any element satisfies the predicate. For single-value containers: tests the single value For collections: returns true if any element matches
Applies an effect function to each element. For single-value containers: applies to the value if present For collections: applies to each element
Returns the contained value or throws a specified error if None
The error to throw if this Option is None
The contained value
Returns the contained value or undefined if None
The contained value or undefined
Returns a string representation of this Option
A string representation
Returns a simple object representation of this Option
An object with _tag and value properties
The Option type represents a value that may or may not exist. It's used to handle potentially null or undefined values in a type-safe way.