resulto
v3.0.0
Published
A Rust-inspired Result and Option library for writing more correct TypeScript, with an ESLint plugin that helps catch ignored results.
Readme
resulto
A Rust-inspired Result and Option library for writing more correct
TypeScript, with an ESLint plugin that helps catch ignored results.
Both types have first-class async support. Use AsyncResult and AsyncOption
to chain operations without awaiting every step, and methods such as asyncMap,
asyncAndThen, and asyncMatch for asynchronous callbacks.
Installation
npm install resultoWith Deno:
deno add jsr:@resulto/coreAPI documentation
- Result
- AsyncResult
- Option
- AsyncOption
- ok / okAsync
- err / errAsync
- some / someAsync
- none / noneAsync
- fromPromise
- fromSafePromise
- fromThrowable
- combineResults / combineResultsAsync
- combineOptions / combineOptionsAsync
👉 Also check out repository root for more info.
