From 6bbafe7ff358188a0b58bf63273168e5a838185f Mon Sep 17 00:00:00 2001 From: Jacob Marks <100745682+J8k3@users.noreply.github.com> Date: Sat, 16 May 2026 23:35:31 -0400 Subject: [PATCH] Fix ParseTR34B9Envelope lint: JSDoc on parseAsnLength, hexStr, constructor --- src/core/operations/ParseTR34B9Envelope.mjs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/core/operations/ParseTR34B9Envelope.mjs b/src/core/operations/ParseTR34B9Envelope.mjs index 0a2a4d89..cae41f9a 100644 --- a/src/core/operations/ParseTR34B9Envelope.mjs +++ b/src/core/operations/ParseTR34B9Envelope.mjs @@ -39,6 +39,13 @@ const TR34_ERROR_CODES = { // ── ASN.1 helpers ───────────────────────────────────────────────────────────── +/** + * Parses an ASN.1 length field at the given offset. + * + * @param {Uint8Array} bytes + * @param {number} offset + * @returns {{headerLength: number, valueLength: number}} + */ function parseAsnLength(bytes, offset) { if (offset + 2 > bytes.length) throw new OperationError("Insufficient ASN.1 data."); @@ -76,6 +83,12 @@ function peekAsnSequence(bytes) { } } +/** + * Converts a Uint8Array to an uppercase hex string. + * + * @param {Uint8Array} bytes + * @returns {string} + */ function hexStr(bytes) { return Array.from(bytes, b => b.toString(16).padStart(2, "0").toUpperCase()).join(""); } @@ -87,6 +100,9 @@ function hexStr(bytes) { */ class ParseTR34B9Envelope extends Operation { + /** + * ParseTR34B9Envelope constructor. + */ constructor() { super();