neverthrow
neverthrow copied to clipboard
Type-Safe Errors for JS & TypeScript
Updates `ParseErro` to be `ParseError` in README.md example code for the async `.andThrough()` Let me know if I need to make an issue, but I figured this was small enough.
Hey, since this library implements thenable for ResultAsync rather than using native promises + async await for debuggability it would be useful to support "old school" stack trace stitching like...
https://github.com/supermacro/neverthrow/issues/594 fork() allows you to handle Ok and Err at once. This is similar to Promise:then(a, b), which is not the same as Promise .then(a).catch(b) nor .catch(b).then(a) (see image https://stackoverflow.com/a/24663315)...
Adds the `and` and `or` methods for better ergonomics, reducing boilerplate. In short: 1. `.and(v)` can be used instead of `.map(() => v)` 2. `.or(v)` can be used instead of...
## Issue Description When using the Server Actions feature of React 19, an error occurs when passing the promise object passed from the server directly to `ResultAsync.fromPromise()`: `Error: Cannot read...
It appears the match function was made more flexible by allowing the ok and error callbacks to have different return types. The documentation didn't match up, so here's an update.
Hello, I’ve recently adopted `neverthrow` in my project and I already love it. I'm using `ResultAsync` extensively to make the return types of async methods explicit and robust. However, I've...
Match the signature used in ResultAsync.fromThrowable
Internally at Google, we have some company-wide conformance tests that ensure that all errors that are thrown, are subclasses of `Error`. To ensure this, I adjusted the `createNeverThrowError` func to...
I'm using neverthrow in the context of a full-stack app with typed RPCs. I'd like to be able to handle on the frontend the Result's that the backend returns, except...