parent
b3b207af5e
commit
0691dd43fe
@ -0,0 +1,21 @@ |
|||||||
|
tts.DeferredPromise = function() { |
||||||
|
var _resolve = null; |
||||||
|
var _reject = null; |
||||||
|
|
||||||
|
this.promise = new Promise(function(resolve, reject) { |
||||||
|
_resolve = resolve; |
||||||
|
_reject = reject; |
||||||
|
}); |
||||||
|
this.then = function() { |
||||||
|
return this.promise.then(...arguments); |
||||||
|
} |
||||||
|
this.catch = function() { |
||||||
|
return this.promise.catch(...arguments); |
||||||
|
} |
||||||
|
this.resolve = function() { |
||||||
|
_resolve(...arguments); |
||||||
|
} |
||||||
|
this.reject = function() { |
||||||
|
_reject(...arguments); |
||||||
|
} |
||||||
|
}; |
||||||
Loading…
Reference in new issue