CancellablePromise
A promise that has a function to cancel its operation.
Declaration
interface CancellablePromiseOverview
This class wraps an ordinary promise, but also provides a method that can be used to cancel the promise. The cancel function throws CancelledError if called.
API object methods return a promise of this type. For example, PromisesApi has a createRecord method that returns a CancellablePromise.