If you've used Rust, you know how nice it is to have Result<T, E> and Option<T> types that make failure and absence explicit instead of something that blows up at runtime. I wanted that in TypeScript, so I built results-ts.

It's not a novel idea. There are a lot of similar libraries out there. But I wanted something that felt close to the real Rust API, worked with async code without being awkward, and didn't cut corners on type safety.

Installation

npm install results-ts

# or