0.2.0 • Published 7 years ago
typescript-promise v0.2.0
typescript-promise
A simple, small promise library written in Typescript with some extra tricks up it's sleeve.
- Based on Zousan
- Under 800 bytes gzipped
- Supports unlimited arguments passing through the promises.
- Full typings
- Mostly A+ Compliant
Usage
This lib exposes the TSPromise
variable, use it just as you would Promise
import { TSPromise } from "typescript-promise";
new TSPromise((res, rej) => {
res(1, 2, 3);
}).then((arg1, arg2, arg) => {
console.log(arg1, arg2, arg3) // <= 1,2,3
});
If you need help on how to use Promises then consult the MDN Docs