A failed Result, with its error.
Result
error
import { Err } from "staquia";const result = new Err(new Error("Something failed"));console.log(result.ok, result.error.message); // false "Something failed" Copy
import { Err } from "staquia";const result = new Err(new Error("Something failed"));console.log(result.ok, result.error.message); // false "Something failed"
The type of the error.
Creates an instance of an Err result.
The error payload to wrap.
The error object or payload contained within this result.
Indicates that the result represents a failure.
Returns a string representation of the contained error.
A failed
Result, with itserror.Example