# supermacro/neverthrow

Type-Safe Errors for JS & TypeScript

Repository: https://github.com/supermacro/neverthrow
Canonical: https://ross.abutalabs.com/products/neverthrow
Language: TypeScript
License: MIT
License Family: permissive
Topics: functional-programming, typescript
Last push: 2026-02-14T23:23:06+00:00

## Health v2 (maintenance only)
Score: 64/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 67, release rhythm 40, longevity 100
- inputs: {"age_days": 2684, "days_push": 200, "days_rel": 558, "gap_med": 22.5, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7689, forks 152 (observed 2026-08-28T04:10:02.417339+00:00)

## What it is
neverthrow is a TypeScript library providing a type-safe Result type (Ok/Err) for error handling without exceptions, inspired by Rust. It includes ResultAsync, a thenable wrapper for handling asynchronous errors with the same fluent API.

## Use cases
- handle errors without try/catch in typescript
- return errors as values instead of throwing exceptions
- type-safe error handling for async functions
- chain fallible operations with map and andThen
- combine multiple results into one
- wrap promises into result types

## When to choose
- you want explicit, compiler-enforced error handling in TypeScript
- you prefer functional programming style over exceptions
- you need ergonomic async error handling with thenable Results

## When to avoid
- your codebase relies heavily on exception-based error handling
- you want a zero-dependency minimal Result with no extra API surface
- your team is unfamiliar with functional programming patterns

## Facets
- artifact type: library
- maturity: active
- function: error-handling, type-system
- domain: developer-tools, web-development, programming-languages
- platform: browser, bun, cross-platform
- tags: result-type, functional-programming, typescript, rust-inspired, npm-package, nodejs, deno

## Member repositories
- supermacro/neverthrow (main) score 64

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:02.417339+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:36:01.424869+00:00, confidence not recorded.
  - readme: https://github.com/supermacro/neverthrow (fetched 2026-08-28T04:10:02.417339+00:00, sha cb7d934e9041)
  - registry_npm: https://registry.npmjs.org/neverthrow (fetched 2026-08-29T08:31:46.408237+00:00, sha 0b3bc3d4a552)
- Data as of 2026-08-30T08:39:29.467469+00:00.
