A replacement for Typescript's default awaiter helper that supports Bluebird promise cancellations.
npm install --save cancelable-awaiter
;;;Bluebird.config;tslib as any.__awaiter = awaiter;
Note that in order for the above to work you also need to compile your project with the
--importHelpers flag and install the
Then async/await syntax can be used in conjunction with promise cancellations:
.finallyconsole.log"May have done some things.";Promise.delay1000.thenpromise.cancel;