From e0b74aca7903e8ace31650ebd374a8d9ca22925a Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Thu, 16 Jul 2026 23:45:38 -0700 Subject: [PATCH] Use more idiomatic types --- src/utils.js | 4 ++-- test/getPrf.test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.js b/src/utils.js index d9ee0ea..a757e1b 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,5 +1,5 @@ /** - * @typedef {object} Logger Logger interface for diagnostic output. Compatible with `console` and + * @typedef {Object} Logger Logger interface for diagnostic output. Compatible with `console` and * most logging libraries. * @property {(...args: unknown[]) => void} [debug] Logs verbose diagnostic information. * @property {(...args: unknown[]) => void} [info] Logs informational messages. @@ -8,7 +8,7 @@ */ /** - * @typedef {{[key:string]:string|undefined}} Env A simple null prototype object dictionary to map environment + * @typedef {Record} Env A simple null prototype object dictionary to map environment * variable names to values. */ diff --git a/test/getPrf.test.js b/test/getPrf.test.js index ba1ed49..12911ba 100644 --- a/test/getPrf.test.js +++ b/test/getPrf.test.js @@ -89,7 +89,7 @@ suite('getPrf.js (server)', () => { const prf = Uint8Array.fromHex('deadbeef000000000000000000000000000000000000000000000000cafebabe'); const options = { method: 'POST', - headers: /** @type {{[key:string]:string}} */({ + headers: /** @type {Record} */({ 'Content-Type': 'application/octet-stream', 'Origin': origin, 'Sec-Fetch-Site': 'same-origin', -- 2.47.3