Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Result.wrap and Result.wrapAsync to take function op having as many arguments as needed #71

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jamesrswift
Copy link

The functions Result.wrap and Result.wrapAsync have been rewritten such that argument op can be a function 0 or more arguments (previously only 0 arguments). An additional variadic argument is added to support passing arguments to op, preserving type support.

Additionally, the return type of BaseResult<T, E>.expectErr is now correctly specified as E the type of the error, rather than T (which narrows to never in ErrImpl<E>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant