-
-
Save tomquas/c0558728e7a89d414df500952aacaabc to your computer and use it in GitHub Desktop.
Notes on using JavaScript Promises in ReasonML/BuckleScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Making promises */ | |
| let promise = Js.Promise.make (fun ::resolve ::reject => resolve "OK!" [@bs]); | |
| /* Operating on promises */ | |
| Js.Promise.then_ (fun result => Js.log result); | |
| /*Js.Promise.catch*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment