Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 586 Bytes

documentation.md

File metadata and controls

24 lines (16 loc) · 586 Bytes

FSPromise documentation

FSPromise is based on ES6-Promise polyfill (https://github.com/jakearchibald/es6-promise).

It offers the same methods and usage, but add a method abort() to stop all Promise chain execution.

It's an UMD module, so you can include it in your CommonJS/AMD project.

Exemple of usage:

import FSPromise = require('fspromise');
import Promise = FSPromise.FSPromise; // Create an alias

let promise = new Promise((resolve, reject) => {
	// do something
});

promise.catch((error) => {
	console.log(error); //FSPromiseCancelError
});

promise.abort();