# better-result: 7.1 out of 10

A strong pick. 2nd of 9 in [Typed errors and functional programming](https://elestia.ai/opensource/typed-errors/index.md).

better-result is a small, zero-dependency Result type for TypeScript, started in January 2026. It offers generator-based composition, tagged errors, a separate channel for defects (Panic), retries and Standard Schema codecs. It is a strong, modern pick if you want typed errors without adopting Effect, but it is young, mostly the work of one maintainer, and has had two major versions in ten months.

**Best for:** TypeScript teams that want Rust-style typed errors with generator syntax and tagged errors, without the weight of Effect.

## Scores

- **Overall: 7.1** (likely 5.7 to 8.2)
  - Claude Opus 5.5 (7.0): Among lightweight Result libraries it is the most complete and the most actively maintained, ahead of the stalled neverthrow. Effect remains the stronger pick for teams that want a full system. The project's youth, one main maintainer, frequent major versions and lack of independent validation keep it out of the top band and keep the range wide.
  - GPT-6.2 Sol (7.2): For a new ESM project that wants generator-based typed errors in ordinary Promise code, better-result is a strong pick. Its generator API gives teams a reason to choose it over neverthrow, and Effect is a stronger fit when structured concurrency and scoped resources are central. The August release pause, breaking 3.0 changes, and limited production evidence keep it below the category default.
- **Needed by many: 5.2** (likely 3.8 to 6.6)
  - Claude Opus 5.5 (5.5): Typed error handling helps any TypeScript project, but only some teams choose a Result library over try/catch. It works on any runtime and with any framework. It needs TypeScript and ESM, which narrows it a little.
  - GPT-6.2 Sol (4.8): Typed failures are useful across APIs, parsers, CLIs, and domain workflows, and better-result can run in browsers and on servers. Its ESM and TypeScript requirements narrow the audience. The State of JavaScript survey shows broad TypeScript use among respondents, but gives little basis for estimating how many teams need a dedicated Result library.
- **Helps a lot: 7.8** (likely 6.7 to 8.8)
  - Claude Opus 5.5 (7.5): The API is complete for a lightweight Result type. It covers generator composition, combinators in both data-first and data-last styles, tagged errors with exhaustive matching, Panic for defects, retries with backoff and abort signals, and codecs. It also ships agent skills to help AI tools adopt it. It is still narrower than Effect, which adds a runtime, concurrency and dependency injection.
  - GPT-6.2 Sol (8.0): Version 3.0.1 combines inferred error unions, exhaustive matching, and sync and async composition with clear examples and a migration guide for coding agents. It fixed inference in chaining and recovery, while a user still reports a type inference workaround for tap callbacks. Yeet’s authors found similar generator performance between the two libraries, with both slower than plain JavaScript on small success-path tests. Those tests and the limited evidence on agent-written code leave room for uncertainty.
- **Holds up over time: 6.0** (likely 4.4 to 7.5)
  - Claude Opus 5.5 (6.0): The project is active: 97 commits and 26 releases in its first year, 14 contributors, and the author uses it at work. Most work comes from one maintainer, the last push was three months ago, and the move from v1 to v3 within ten months shows the API is still settling. Neverthrow, its closest peer, has stalled, which pushes users towards it.
  - GPT-6.2 Sol (6.0): The project shipped 26 GitHub releases and merged 47 pull requests in its first year, but the last release and push were in August. The 3.0 upgrade changed tagged error declarations and replaced the serialization API. One listed npm maintainer and a short release history make the two-year outlook uncertain, especially alongside Effect’s continued release activity.
- **Used widely: 5.4** (likely 3.9 to 6.8)
  - Claude Opus 5.5 (6.5): 42.8M downloads in four weeks, starting from zero a year ago, is more than neverthrow or fp-ts. A count that high for a new library is likely inflated by a popular package that installs it. GitHub lists about 8,900 dependent repositories and 251 packages, which points to real and fast-growing direct use, though mostly in small projects.
  - GPT-6.2 Sol (4.3): The 42.8 million four-week downloads exceed neverthrow’s, but npm lists about 193 dependent packages and tools such as result-rpc install it automatically. The 2,018 stars show early interest, while the bundle records little discussion and has no usable repository dependent count. There is no pre-launch download baseline, so growth relative to the 4.1× catalog median cannot be measured.
- **Vouched for: 4.1** (likely 2.5 to 5.6)
  - Claude Opus 5.5 (3.5): The author says he uses it in production at Cloudflare, but I found no independent write-ups, benchmarks or survey data. Its Hacker News story got 2 points and no Bluesky posts were found. Validation rests on the author and on adoption numbers.
  - GPT-6.2 Sol (4.6): result-rpc and better-effect build directly on better-result’s API, which shows it can support other libraries. A comparison from another Result library and published benchmarks provide outside checks. The evidence covers library integration and small benchmarks, with little visibility into sustained production use or developer satisfaction.
- **Safe: 8.1** (likely 6.7 to 9.2)
  - Claude Opus 5.5 (8.0): It has zero runtime dependencies, no advisories and an MIT licence, and releases are published with npm provenance from GitHub Actions. It has no Scorecard and one main publisher, which keeps the score from going higher.
  - GPT-6.2 Sol (8.1): The MIT licence and zero runtime dependencies keep the dependency footprint small, and there are no recorded OSV advisories. GitHub Actions runs tests and publishes with npm provenance, and ReversingLabs reported no malware or known vulnerabilities in 3.0.1. The short security history, single listed npm maintainer, and missing OpenSSF Scorecard limit confidence.

## Good

- Result.gen with yield* composes steps in order and builds the error union for you.
- TaggedError and exhaustive matchError make domain errors typed and checkable.
- Panic keeps bugs out of the error type, a gap that neverthrow and similar libraries leave open.
- Zero runtime dependencies, MIT licence and npm provenance attestations.

## Bad

- Two major versions in ten months; 3.0 broke the TaggedError syntax and removed the serialize/deserialize API.
- Most releases and commits come from one maintainer.
- Almost no independent reviews, benchmarks or survey data yet.
- ESM-only and needs TypeScript 5.4 or newer, which rules out some older codebases.

## The numbers

- Downloads, 4 weeks: 43M
- In a year: new
- GitHub stars: 2k
- Commits, 12 months: 97
- Last npm release: Aug 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/dmmulroy/better-result
- npm: https://www.npmjs.com/package/better-result

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
