Optional
reason: anyFlag set true when the resolve or reject method are called.
Flag to indicate if the promise has been fulfilled.
Promise has ben fulfilled when value/error is set.
Flag to indicate if the promise was rejected.
Only set when the promise is fulfilled.
Output value of the promise.
Set with the output value if promise was fulfilled and not rejected.
Stores the error value if the promise was rejected.
Catch any error that occurs in the promise.
Method to catch errors.
Promise for chainning.
Finally callback
Method to be called.
Promise for chainning.
Executed after the promise is fulfilled.
Callback to receive the value.
Promise for chainning.
Static
allWait for a set of promises to finish, creates a promise that waits for all running promises.
If any of the promises fail it will reject altough some of them may have been completed with success.
List of promisses to syncronize.
Promise that will resolve when all of the running promises are fullfilled.
Static
rejectCreate a rejected promise.
Reason to reject the promise.
Promise created with rejection reason.
Static
resolveCreate a resolved promise.
Value to pass.
Promise created with resolve value.
Cancelable promises extend base promises and provide a cancel functionality than can be used to cancel the execution or task of the promise.
These type of promises can be used to prevent additional processing when the data is not longer required (e.g. HTTP request for data that is not longer necessary)