Cancel Token
Simple TypeScript/ES2015 class to emulate cancellation tokens. Does not fully comply yet with the proposed specification.
Installation
npm install --save data-cancel-token
Usage
; ; console.log token.cancellationRequested ; token.cancellationPromise.thenconsole.log 'cancelled' ; token.throwIfCancellationRequested; token.cancel;