neverthrow icon indicating copy to clipboard operation
neverthrow copied to clipboard

Type-Safe Errors for JS & TypeScript

Results 126 neverthrow issues
Sort by recently updated
recently updated
newest added

`Result.fromThrowable` takes a function as an argument, and returns a new function that returns a `Result`. There is no corollary for `ResultAsync`, which really diminishes the utility of the library....

Solution for: https://github.com/supermacro/neverthrow/issues/488

Hi, added `partition` function to handle scenarios when you need to get a tuple of all results and errors. Inspired by [lodash partition](https://lodash.com/docs/4.17.15#partition)

help wanted

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [prettier](https://prettier.io) ([source](https://togithub.com/prettier/prettier)) | [`2.2.1` -> `3.2.5`](https://renovatebot.com/diffs/npm/prettier/2.2.1/3.2.5) |...

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [eslint-plugin-prettier](https://togithub.com/prettier/eslint-plugin-prettier) | [`3.4.0` -> `5.1.3`](https://renovatebot.com/diffs/npm/eslint-plugin-prettier/3.4.0/5.1.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/eslint-plugin-prettier/5.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)...

- resolves #411 - resolves #437 Unfortunately this would be a breaking change, as anyone who explicitly annotated the types like `orElse(foo)` will need to update their code to `orElse(foo)`

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [eslint-config-prettier](https://togithub.com/prettier/eslint-config-prettier) | [`7.1.0` -> `9.1.0`](https://renovatebot.com/diffs/npm/eslint-config-prettier/7.1.0/9.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/eslint-config-prettier/9.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)...

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [rollup-plugin-dts](https://togithub.com/Swatinem/rollup-plugin-dts) | [`3.0.1` -> `6.1.0`](https://renovatebot.com/diffs/npm/rollup-plugin-dts/3.0.1/6.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/rollup-plugin-dts/6.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)...

```ts if (combineWithAllErrors([ result1, result2, result3 ]).isErr()) { console.log("some error") return err(); } // We know for sure know that result1, result2, and result3 are ok: result1.value; // TS2339: property...

Edit: The descriptions for `ok` and `err` in this comment is wrong. Please see the following comments. With `safeTry`, sometimes we need to specify type parameters to pass type-checks. For...