-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Coerce to JS.Promise #25
Comments
Agreed. I'll have to think about how to package these, because they need to go in the In the meantime, here is how these can be defined: external fromJSPromise:
Js.Promise.t('a) => Repromise.Rejectable.t('a, Js.Promise.error) =
"%identity";
external toJSPromise:
Repromise.Rejectable.t('a, _) => Js.Promise.t('a) = "%identity"; |
Ok, I added the functions to The commit also includes tests and docs. Thanks for prompting this :) |
Thank you! |
This is now in NPM in |
There are various Bucklescript libraries today that take Js.Promises are arguments (i.e. bs-express). It would be great to use Repromise with these libraries!
Would it be possible to have a coerce function that converts a Repromise promise to a Js.Promise?
Thanks,
Louis
The text was updated successfully, but these errors were encountered: