{"library":"ts-results","type":"library","category":null,"description":"ts-results is a TypeScript library that provides compile-time error checking and optional values, inspired by Rust's `Result` and `Option` enums. It offers a type-safe approach to handling fallible operations and potential absence of values without relying on exceptions or `null`/`undefined`. The current stable version, 3.3.0, was last published in 2021. This package differentiates itself by offering a lightweight, focused implementation of these core algebraic data types, in contrast to more comprehensive functional programming libraries. It enables developers to explicitly model success (`Ok`) or failure (`Err`) states and presence (`Some`) or absence (`None`) of a value, leveraging TypeScript's type system to ensure these states are handled at compile time, thereby reducing runtime errors.","language":"javascript","status":"maintenance","version":"3.3.0","tags":["javascript","Rust","Result","Results","Option","Options","Typescript","TS","Ok","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install ts-results","imports":["import { Result } from 'ts-results'","import { Ok } from 'ts-results'","import { Err } from 'ts-results'","import { Option } from 'ts-results'","import { Some } from 'ts-results'","import { None } from 'ts-results'"]},{"cmd":"yarn add ts-results","imports":[]},{"cmd":"pnpm add ts-results","imports":[]}],"homepage":null,"github":"https://github.com/vultix/ts-results","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/ts-results","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/ts-results/compatibility"}}