Skip to main content

@oxi/result@0.2.0

A TypeScript implementation of the Rust-inspired Result type, offering a robust and functional approach to error handling and success management in asynchronous and synchronous operations.

Works with
This package works with Bun
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Browsers
JSR Score
100%
Published
a month ago
indexall symbols

Classes

c
Result
from main

Represents a result of an operation that could be successful (Ok) or failed (Err).

Variables

v
Err
from main

A convenience reference to the Result.Err method, allowing for the creation of Err result instances without directly invoking the Result class. This function facilitates the creation of Err results, encapsulating error values in a more succinct and readable manner.

v
Ok
from main

A convenience reference to the Result.Ok method, allowing for the creation of Ok result instances without directly invoking the Result class. This function facilitates the creation of Ok results, encapsulating success values in a more succinct and readable manner.