v3.0.0 released
Type-Safe Error Handling
for TypeScript
Result, Maybe, Try, and AsyncResult — composable types that make errors a first-class citizen.
Type-Safe
Errors are encoded in the type system — the compiler forces you to handle them
Composable
Chain, map, and combine operations without nested if/else spaghetti
Ergonomic
No more undefined/null checks everywhere — methods like .map(), .flatMap(), .unwrap()
2KB
Lightweight
Zero dependencies, tree-shakeable, ~2KB gzipped
Quick Start
Get up and running in under 2 minutes.
Installation
$ pnpm add @deessejs/fpBasic Usage
Core Types
The four building blocks of type-safe error handling.
Code Examples
Real-world usage patterns for common scenarios.
Features
Everything you need for production-ready error handling.
Fully tree-shakeable
Zero runtime dependencies
TypeScript-first (strict mode compatible)
ESM + CJS exports
Works with Zod, effect-ts, and other FP libraries
Comprehensive test coverage
Install
Add @deessejs/fp to your project using your preferred package manager.
pnpm
$ pnpm add @deessejs/fpnpm
$ npm install @deessejs/fpyarn
$ yarn add @deessejs/fpbun
$ bun add @deessejs/fpImport
import { Result, ok, err }from '@deessejs/fp'