-
Notifications
You must be signed in to change notification settings - Fork 0
Home
github-actions[bot] edited this page May 13, 2026
·
6 revisions
-
Getting Started: Installation,
Ok/Err,safe,bail, fluent and async builders. -
Functional Operators:
map,mapErr,andThen,orElse,tap,tapErr,note. -
Error Handling Patterns:
all,any,Report,note,ResultBuilder,AsyncResultBuilder,createError,wrapError,matchErr. - API Reference: Auto-generated documentation from JSDoc.
Exceptions are effectively GOTO statements that can jump over many layers of your application. This makes reasoning about state difficult.
By using Result, failures become part of your function signatures:
import { Ok, Err, type Result } from "ripthrow";
function divide(a: number, b: number): Result<number, string> {
if (b === 0) return Err("Division by zero");
return Ok(a / b);
}Now, the caller must handle the error or explicitly propagate it, leading to fewer runtime crashes.