Methods
extract
- extract<T>(): {
error: E;
value?: T;
} Returns {
error: E;
value?: T;
}
- An object with the value or error property set.
error: E
Optional
value?: T
flatMap
- flatMap<F>(mapper): Result<never, F>
Parameters
mapper: ((error) => Result<never, F>)
Returns Result<never, F>
- A new Result with the transformed error value.
map
- map<F>(mapper): Result<never, F>
Returns Result<never, F>
- A new Result with the transformed error value.
toOptional
- toOptional(): Optional<E>
- An Optional containing the error value.
Represents the failure outcome of an operation with an error.