From d853b6419f4e4bbef2182594551dcdeaf1fd1392 Mon Sep 17 00:00:00 2001 From: Michael Naumov Date: Thu, 21 Nov 2024 11:42:11 -0600 Subject: [PATCH] Fix logging --- src/obsidian/Queue.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/obsidian/Queue.ts b/src/obsidian/Queue.ts index 9040784..de49f6d 100644 --- a/src/obsidian/Queue.ts +++ b/src/obsidian/Queue.ts @@ -23,7 +23,8 @@ interface Queue { } interface QueueItem { - fn(): MaybePromise; + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type + fn(this: void): MaybePromise; stackTrace: string; timeoutInMilliseconds: number; } @@ -76,6 +77,6 @@ async function processNextQueueItem(app: App): Promise { return; } - await addErrorHandler(() => runWithTimeout(item.timeoutInMilliseconds, () => invokeAsyncAndLog(processNextQueueItem.name, () => item.fn(), item.stackTrace))); + await addErrorHandler(() => runWithTimeout(item.timeoutInMilliseconds, () => invokeAsyncAndLog(processNextQueueItem.name, item.fn, item.stackTrace))); queue.items.shift(); }