Readonly
promiseThe promise object that is controlled by this controller.
REMEMBER: ALWAYS CATCH THE REJECTION OF THE PROMISE!
Readonly
rejectThe rejecter function for the promise, which can be used to turn the promise object
into the REJECTED
state.
Because of the feature of the promises, calling this method multiple times or after
called resolve
method, will not change the state of the promise.
Readonly
resolveThe resolver function for the promise, which can be used to turn the promise object
into the RESOLVED
state.
Because of the feature of the promises, calling this method multiple times or after
called reject
method, will not change the state of the promise.
The controller for promises, which allows you to decouple the resolver/rejecter with the promise object.