# ts-results-es

> A TypeScript implementation of Rust's Result and Option objects.

Latest version **7.1.0** (published 2026-07-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install ts-results-es
pnpm add ts-results-es
yarn add ts-results-es
bun add ts-results-es
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 7.1.0 |
| Published | 2026-07-01 |
| First published | 2022-03-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 330.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 135 |
| Author | Vultix |
| Maintainers | rbruggem, festinajashari, jstasiak, troglo9080 |
| Keywords | Rust, Result, Results, Option, Options, Typescript, TS, Ok, Err, Some, None, Typed Errors, Error Handling, Monad, Maybe, Union |

## Links

- npm: https://www.npmjs.com/package/ts-results-es
- Repository: https://github.com/lune-climate/ts-results-es
- Homepage: https://github.com/lune-climate/ts-results-es#readme
- Issues: https://github.com/lune-climate/ts-results-es/issues
- npm.io page: https://npm.io/package/ts-results-es

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 7.1.0 (latest) — 2026-07-01
- 3.3.1-alpha.1 (alpha) — 2022-03-11
- 7.0.0 — 2026-02-16
- 6.0.0 — 2025-07-29
- 5.0.1 — 2025-02-10
- 5.0.0 — 2025-02-07
- 4.2.0 — 2024-05-28
- 4.1.0 — 2024-03-04
- 4.1.0-alpha.1 — 2023-10-13
- 4.0.0 — 2023-08-08
- 3.6.1 — 2023-07-21
- 3.6.0 — 2023-03-14
- 3.5.0 — 2022-05-06
- 3.4.0 — 2022-03-15
- 3.3.1-alpha.0 — 2022-03-11
- … 1 more at https://npm.io/package/ts-results-es/versions

## README

# ts-results-es

A TypeScript implementation of Rust's [Result](https://doc.rust-lang.org/std/result/)
and [Option](https://doc.rust-lang.org/std/option/) objects.

Brings compile-time error checking and optional values to TypeScript.

* [The package on NPM](https://www.npmjs.com/package/ts-results-es)
* [Documentation](https://ts-results-es.readthedocs.io)

## Contents

-   [Installation](#installation)
-   [Example](#example)
    -   [Result Example](#result-example)
    -   [Option Example](#option-example)
-   [Usage](#usage)

## Installation

```bash
$ npm install ts-results-es
```

or

```bash
$ yarn add ts-results-es
```

## Usage

See https://ts-results-es.readthedocs.io/en/latest/reference/index.html to see the API
reference.

---
_Source: https://npm.io/package/ts-results-es · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
