{"library":"typescript-result","type":"library","category":null,"description":"The `typescript-result` package provides a robust, type-safe `Result` type, inspired by Rust's `Result` enum, for managing operations that can succeed or fail without relying on traditional `try-catch` blocks or throwing exceptions. It aims to transform chaotic error handling into elegant, functional code by enforcing explicit error handling at compile time. The current stable version is 3.5.2, with active development indicated by recent beta releases (e.g., v3.6.0-beta.3) that frequently introduce new features and fixes. Key differentiators include explicit `Ok` and `Err` variants, methods like `isOk()`, `isError()`, `map()`, `mapErr()`, and the recently added `match()` for basic pattern matching on error types. It targets modern Node.js environments (`>=18`) and is designed for seamless integration into TypeScript projects, improving code predictability and maintainability compared to implicit exception propagation.","language":"javascript","status":"active","version":"3.5.2","tags":["javascript","result","type","TypeScript","ts","error","error handling","exception","ok","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install typescript-result","imports":["import { Result, Ok, Err } from 'typescript-result'","import { Ok } from 'typescript-result'","import { Result } from 'typescript-result'; const asyncOp = Result.fromAsyncCatching(async () => {...});"]},{"cmd":"yarn add typescript-result","imports":[]},{"cmd":"pnpm add typescript-result","imports":[]}],"homepage":null,"github":"https://github.com/everweij/typescript-result","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/typescript-result","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/typescript-result/compatibility"}}