Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped
28 lines
588 B
Plaintext
28 lines
588 B
Plaintext
class WithPromise {
|
|
constructor() {
|
|
this.updateFinished();
|
|
}
|
|
get finished() {
|
|
return this._finished;
|
|
}
|
|
updateFinished() {
|
|
this._finished = new Promise((resolve) => {
|
|
this.resolve = resolve;
|
|
});
|
|
}
|
|
notifyFinished() {
|
|
this.resolve();
|
|
}
|
|
/**
|
|
* Allows the animation to be awaited.
|
|
*
|
|
* @deprecated Use `finished` instead.
|
|
*/
|
|
then(onResolve, onReject) {
|
|
return this.finished.then(onResolve, onReject);
|
|
}
|
|
}
|
|
|
|
export { WithPromise };
|
|
//# sourceMappingURL=WithPromise.mjs.map
|