Create a failed result with some errors.
import { err, isOk, isErr } from "typerun/result";const result = err(["error 1", "error 2"]);console.log(isOk(result)); // falseconsole.log(isErr(result)); // trueconsole.log(result.errors); // ["error 1", "error 2"] Copy
import { err, isOk, isErr } from "typerun/result";const result = err(["error 1", "error 2"]);console.log(isOk(result)); // falseconsole.log(isErr(result)); // trueconsole.log(result.errors); // ["error 1", "error 2"]
The errors to wrap in a failed result.
Create a failed result with some errors.
Example