The type of value contained in the functor
Readonly
_Readonly
_Readonly
apOptional
Readonly
errorReadonly
flatReadonly
flatReadonly
foldPattern matches over the structure, applying specific handlers for each variant
Readonly
isReadonly
isReadonly
isReadonly
isReadonly
mapReadonly
mapReadonly
mapReadonly
matchReadonly
recoverReadonly
recoverReadonly
toReadonly
toReadonly
toReadonly
toOptional
Readonly
valueCounts 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
Extract the value or throw an error
Optional
error: ErrorOptional custom error to throw. If not provided, uses type-appropriate default error
The contained value
Returns this container if it has a value, otherwise returns the alternative
The alternative container
This container or the alternative
Converts this container to a Promise
The behavior depends on the implementing container:
A Promise that resolves or rejects based on the container's state
Base interface for all functype data structures. This provides a standard contract with core functional programming traits.
Example