]> git.codecow.com Git - libnemo.git/commitdiff
On second thought, just specify the type of array instead of messing with its contents.
authorChris Duncan <chris@zoso.dev>
Thu, 24 Jul 2025 14:00:21 +0000 (07:00 -0700)
committerChris Duncan <chris@zoso.dev>
Thu, 24 Jul 2025 14:00:21 +0000 (07:00 -0700)
test/GLOBALS.mjs

index af65f7f3be2af97886d8cfab40ca8b148d19bfe7..dceaab2dbeecd4b23ecabee696933cb7392eea92 100644 (file)
@@ -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