An externally resolvable/rejectable "promise". Use it to resolve/reject promise at any time.
const future = new Defer();future.promise.then(value => console.log(value));future.resolve(123); Copy
const future = new Defer();future.promise.then(value => console.log(value));future.resolve(123);
Readonly
An externally resolvable/rejectable "promise". Use it to resolve/reject promise at any time.