const promise = new SoftPromise((resolve, reject) => { setTimeout(() => { resolve("Hello"); }, 1000);});
Returns a boxed promise (exceptions caught in second value of array)
Escape promise
promise.escape("Reason to escape");
Unwrap promise
Promise
Wrap a promise in a SoftPromise
const promise = new Promise((resolve, reject) => { setTimeout(() => { resolve("Hello"); }, 1000);});SoftPromise.wrap(promise);
Wrap promise with timeout
const promise = new Promise((resolve, reject) => { setTimeout(() => { resolve("Hello"); }, 1000);});SoftPromise.wrapWithTimeout(promise, 500);
Generated using TypeDoc