Released attempt, a TypeScript library for explicit error handling

🎉 Just released a tiny one I've been using internally @mateosuarezdev/attempt - an utility for explicit error handling in TypeScript. Tired of nested try-catch blocks? This library treats errors as values, not exceptions, making your code cleaner and safer: ✨ No try-catch boilerplate ✨ Explicit error handling with TypeScript type inference ✨ Array destructuring for flexible variable naming ✨ Works with custom error types across your app ✨ Supports both sync and async operations Perfect for DB Queries, API calls, JSON parsing, or any operation where you want predictable error handling. Built as a standalone package after extracting the pattern from my apps. Get started: npm install @mateosuarezdev/attempt yarn/pnpm/bun add @mateosuarezdev/attempt Repo: https://lnkd.in/dsVrK7Yb Check it out and let me know what you think! #typescript #javascript #trycatch #errors #bun #node #react

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories