Created
June 15, 2019 02:11
-
-
Save kunigami/fde63ca0d038c105809ab8314c1d195f to your computer and use it in GitHub Desktop.
This file contains 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
function fetchSomeStuff() { | |
return new Promise((resolve, reject) => { | |
someAsyncRequest() | |
.onSuccess( | |
payload => resolve(payload.value) | |
) | |
.onFailure( | |
payload => reject(payload.error) | |
) | |
.execute(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment