You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
515 B
21 lines
515 B
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);
|
|
}
|
|
};
|
|
|