forked from vultix/ts-results
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Async/Promise support – gathering information #79
Comments
Some ideas off the top of my head: (In this context an
|
#87 adds some initial async support. Once it's merged we'll use it for a bit in the Lune backend to see if it's satisfactory. |
We've implemented some more stuff since then:
I'll close this ticket, the feature exists, we can iterate on it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Relevant issue in the upstream repository: vultix#33
Basically it's really inconvenient to mix
Option
andResult
with promises right now because aPromise<Option<...>>
orPromise<Result<...>>
needs to be awaited first in order to use any of the composition/combination methods (likemap()
,andThen()
etc.)Some code I wrote today:
What I wish I could write is:
Any ideas about the API or the design of this feature are welcome.
The text was updated successfully, but these errors were encountered: