cancel-token
- Version 0.1.1
- Published
- 1 dependency
- BSD-3-Clause license
Install
npm i cancel-token
yarn add cancel-token
pnpm add cancel-token
Overview
Implementation of https://github.com/littledan/proposal-cancelable-promises
Index
Functions
function isCancel
isCancel: (value: any) => value is Cancel;
function isCancelToken
isCancelToken: (value: any) => value is CancelToken;
Classes
class Cancel
class Cancel {}
constructor
constructor(reason?: any);
property message
message: string;
method toString
toString: () => string;
class CancelToken
class CancelToken {}
A polyfill for the November 23rd, 2016 draft of https://tc39.github.io/proposal-cancelable-promises/
constructor
constructor(executor: (cancel: CancelFunction) => void);
property [Symbol.toStringTag]
readonly [Symbol.toStringTag]: string;
property promise
promise: Promise<Cancel>;
property reason
reason: Cancel;
method race
static race: (tokens: Iterable<CancelToken>) => CancelToken;
method source
static source: () => { token: CancelToken; cancel: CancelFunction };
method throwIfRequested
throwIfRequested: () => void;
Type Aliases
type CancelFunction
type CancelFunction = (reason?: any) => void;
Copyright (c) 2016 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
Package Files (1)
Dependencies (1)
Dev Dependencies (7)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/cancel-token
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/cancel-token)
- HTML<a href="https://www.jsdocs.io/package/cancel-token"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3554 ms. - Missing or incorrect documentation? Open an issue for this package.