Guest User

Untitled

a guest
Nov 22nd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. class Deferred {
  2. constructor() {
  3. const promise = new Promise((resolve, reject) => {
  4. this.resolve = resolve;
  5. this.reject = reject;
  6. });
  7.  
  8. this.then = promise.then.bind(promise);
  9. this.catch = promise.catch.bind(promise);
  10. }
  11. }
Add Comment
Please, Sign In to add comment