aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
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));
}
}