Dev.to
6/26/2026

I ported Rust's Result and Option types to TypeScript
Short summary
results-ts brings Rust's Result<T, E> and Option<T> error-handling patterns to TypeScript, replacing implicit null/undefined failures with explicit, typed errors. The library supports async code seamlessly via AsyncResult and AsyncOption, offers chainable transformations like .map() and .andThen(), and safely wraps throwing functions. It's available on npm/bun/deno and open to contributions via GitHub.
- •Brings Rust-style explicit error handling to TypeScript with Result and Option types
- •Supports async operations via AsyncResult/AsyncOption with chainable API
- •Free, open-source, available on npm/bun/deno with GitHub contributions welcome
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



