LocalPromise
Example:
const obj = {
find: () => Promise.resolve('foo')
};
const promise = new LocalPromise(obj);
// resolve the value
promise.then(value => {
// `value` === `obj`
});
// resolve property of the value
promise.find().then(value => {
// `value` === 'foo'
});
Constructor Summary
Public Constructor | ||
public |
constructor(value: *, rejected: boolean): function Create a local promise from a given value. |