From 801768373c4b1f200c2fe3c0fe8614983a925f88 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 24 Jul 2025 07:00:21 -0700 Subject: [PATCH] On second thought, just specify the type of array instead of messing with its contents. --- test/GLOBALS.mjs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/GLOBALS.mjs b/test/GLOBALS.mjs index af65f7f..dceaab2 100644 --- a/test/GLOBALS.mjs +++ b/test/GLOBALS.mjs @@ -4,11 +4,14 @@ export { env } from '../env.mjs' /** - * Serially executes asynchronous functions. - */ +* Serially executes asynchronous functions. +*/ const queue = { isIdle: true, - tasks: [{}], + /** + * @type {{ task:Function, resolve:Function, reject: Function, args: any[]}[]} + */ + tasks: [], process: function () { const next = queue.tasks.shift() @@ -35,7 +38,6 @@ const queue = { }) } } -queue.process() export const isNode = globalThis !== globalThis.window -- 2.47.3