---
title: CancellablePromise
framework: CKTool JS
role: symbol
role_heading: Class
platforms: [cktool js 1.2.15+]
path: cktooljs/cancellablepromise
---

# CancellablePromise

A promise that has a function to cancel its operation.

## Declaration

```data
interface CancellablePromise
```

## Overview

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

- [CancellablePromise](cktooljs/cancellablepromise/cancellablepromise.md)

### Instance Properties

- [inner](cktooljs/cancellablepromise/inner.md)

### Instance Methods

- [cancel](cktooljs/cancellablepromise/cancel.md)
- [catch](cktooljs/cancellablepromise/catch.md)
- [finally](cktooljs/cancellablepromise/finally.md)
- [then](cktooljs/cancellablepromise/then.md)

## See Also

### Promises API

- [PromisesApi](cktooljs/promisesapi.md)
- [CKToolDatabaseModule](cktooljs/cktooldatabasemodule.md)
