Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Deferred {
- constructor() {
- const promise = new Promise((resolve, reject) => {
- this.resolve = resolve;
- this.reject = reject;
- });
- this.then = promise.then.bind(promise);
- this.catch = promise.catch.bind(promise);
- }
- }
Add Comment
Please, Sign In to add comment