Open boyeln opened 2 months ago
Latest commit: 67360794043d21244fafe1dea0c088d5fdd0cd2f
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
As discussed in https://github.com/supermacro/neverthrow/pull/567#discussion_r1754313850, the current type signature of
fromThrowable
allows users to pass a specific error value type, without providing an error mapping function that produces the provided error type:This PR tries to solve that by adding some overloads to the function, only allowing users to specify the error type when a matching error mapping function is provided.