-
Notifications
You must be signed in to change notification settings - Fork 64
add requireSomeWith #303
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
base: master
Are you sure you want to change the base?
add requireSomeWith #303
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functions look good!
Just some nitpicks on keeping names the same.
Also would you mind adding doc comments and doc pages?
Thanks!
Co-authored-by: Jimmy Byrd <jimmybyrd@gmail.com>
Co-authored-by: Jimmy Byrd <jimmybyrd@gmail.com>
|
I can add the docs. Might take me a bit to make sure I'm careful with my copy-pasta'ing. |
|
Unintentionally closed |
| option | ||
| |> Job.map (Result.requireSome error) | ||
|
|
||
| let inline requireSomeWith ifErrorThunk option = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Doc comments
| value | ||
| |> Async.map (Result.requireSome error) | ||
|
|
||
| let inline requireSomeWith |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Doc comments
| option | ||
| |> Task.map (Result.requireSome error) | ||
|
|
||
| let inline requireSomeWith ifErrorThunk option = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Doc comments
Proposed Changes
Closes #301
This adds
requireSomeWithhelpers, analogous to thedefaultWithofOptionfor types that already have arequireSomefunction.Types of changes
What types of changes does your code introduce to FsToolkit.ErrorHandling?
Put an
xin the boxes that apply and remove ones that don't applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
I've not yet added doc comments, as I saw some variability in coverage and not sure which is the up to date pattern to follow and how much should be documented.