Neverthrow Return Types

Require `neverthrow`-based return types in TypeScript and JavaScript code whenever the surrounding technology allows it. Use when creating, refactoring, reviewing, or extending standalone functions, exported module functions, class methods, object methods, service methods, repository methods, and similar APIs that should expose explicit success and failure result types in their signatures. Prefer `Result<T, E>` for synchronous code and `ResultAsync<T, E>` for asynchronous code. Only skip a `neverthrow` return type when a framework, library, runtime interface, or externally imposed contract is incompatible and requires a different return shape.

code-sherpas Updated 0 repo stars

File contents

code-sherpas/agent-skills commit 5560d500e4

Frequently asked questions

npx get-skill add code-sherpas/neverthrow-return-types