11 lines
261 B
JavaScript
11 lines
261 B
JavaScript
export class Deferred {
|
|
constructor() {
|
|
this.resolve = () => null;
|
|
this.reject = () => null;
|
|
this.promise = new Promise((resolve, reject) => {
|
|
this.reject = reject;
|
|
this.resolve = resolve;
|
|
});
|
|
}
|
|
}
|