From: Ardis Lu Date: Fri, 17 Jul 2026 06:45:38 +0000 (-0700) Subject: Use more idiomatic types X-Git-Tag: v0.1.4~9 X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=e0b74aca7903e8ace31650ebd374a8d9ca22925a;p=envpass Use more idiomatic types --- 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',