Better-Result Migration
Migrates legacy try/catch and Promise-based error handling to typed Result patterns using the better-result library.
The better-result migration skill streamlines the transition from imperative error handling to railway-oriented programming in TypeScript codebases. It automates the conversion of standard try/catch blocks, null checks, and async rejections into robust Result types, while helping developers define clear TaggedError categories for domain-specific logic. By leveraging generator-based composition and structured migration strategies, this skill ensures more predictable control flow and improved type safety across I/O boundaries and internal business logic.
Características Principales
01Refactors nested error-checking logic into clean generator-based compositions
02Automates return type signature updates to propagate Result types through the call stack
03Converts imperative try/catch blocks into structured Result.try patterns
04Maps arbitrary thrown exceptions to domain-specific TaggedError classes
05824 GitHub stars
06Transforms Promise-based rejections into typed Result.tryPromise results
Casos de Uso
01Modernizing legacy TypeScript modules with functional error handling patterns
02Replacing brittle null-checking logic with expressive Result-based workflows
03Enhancing API and database I/O reliability by wrapping boundaries in typed errors