Show HN: Byethrow – Tree-shakable, function-based Result type for TypeScript
1 karibash 0 6/20/2025, 12:44:07 PM github.com ↗
I built byethrow to offer a lightweight, function-based alternative to neverthrow for handling errors in TypeScript using a Result<T, E> pattern.
While I appreciated neverthrow's explicit error handling model, I ran into a few issues:
- It's not actively maintained (many PRs left open)
- It requires different APIs for sync and async results
- It's class-based, making results harder to serialize
byethrow takes a different approach:
- Plain-object based (no classes)
- Unified API for both sync and async values
- Tree-shakable and minimal
- No third-party dependencies
I'd love feedback—especially from other TS developers who've used neverthrow, fp-ts, or similar libraries!
No comments yet