sergeysova/es2-result-option

View on GitHub
docs/result.mdx

Summary

Maintainability
Test Coverage
---
name: Result
route: /result
order: 5
---

# `Result`

Package exports `Result` and `Ok`, `Err`.

`Result` is the type used for returning and propagating errors instead of exceptions.<br/>
`Ok` representing success and containing a value, `Err` representing error and containing an error value.

```js
import { Result, Ok, Err } from '@es2/result-option'
```

`Ok` and `Err` is a shortcuts for `Result.ok` and `Result.err`.