From 2c3dee41201d0a6c778c002b19c349cdd62470fb Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 3 Nov 2022 19:12:50 +0100 Subject: qol improvements --- src/utils/Queue.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/utils/Queue.ts') 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 = Promise.resolve(); - add(func: () => Promisable) { - this.promise = this.promise.then(func); + add(func: (lastValue: unknown) => Promisable): Promise { + return (this.promise = this.promise.then(func)); } } -- cgit