Contents

CancellablePromise

A promise that has a function to cancel its operation.

Declaration

interface CancellablePromise

Overview

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.

Topics

Initializers

Instance Properties

Instance Methods

See Also

Promises API