Skip to content

Instantly share code, notes, and snippets.

@max-lt
Created May 14, 2017 21:26
Show Gist options
  • Save max-lt/d3fe0f958dcf354470a08fe0a25f048a to your computer and use it in GitHub Desktop.
Save max-lt/d3fe0f958dcf354470a08fe0a25f048a to your computer and use it in GitHub Desktop.
Deferred promise (es6)
function Deferred() {
this.promise = new Promise((resolve, reject) => {
this.resolve = resolve;
this.reject = reject;
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment