aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-11-03 19:12:50 +0100
committerVendicated <vendicated@riseup.net>2022-11-03 19:12:50 +0100
commit2c3dee41201d0a6c778c002b19c349cdd62470fb (patch)
tree2f621807f3eda7fd346cd247a5b58f3b864bc153 /src/utils
parentc20dc269d27414c140be305a827c3a20fd94bacc (diff)
downloadVencord-2c3dee41201d0a6c778c002b19c349cdd62470fb.tar.gz
Vencord-2c3dee41201d0a6c778c002b19c349cdd62470fb.tar.bz2
Vencord-2c3dee41201d0a6c778c002b19c349cdd62470fb.zip
qol improvements
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/Queue.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/Queue.ts b/src/utils/Queue.ts
index 269fd36..46959a0 100644
--- a/src/utils/Queue.ts
+++ b/src/utils/Queue.ts
@@ -19,9 +19,9 @@
import { Promisable } from "type-fest";
export class Queue {
- private promise = Promise.resolve();
+ private promise: Promise<any> = Promise.resolve();
- add(func: () => Promisable<void>) {
- this.promise = this.promise.then(func);
+ add<T>(func: (lastValue: unknown) => Promisable<T>): Promise<T> {
+ return (this.promise = this.promise.then(func));
}
}