Skip to content

Commit 334e52c

Browse files
Copilotlpcox
andcommitted
fix: fix TypeScript type error in json_object_to_markdown.cjs
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent 294a78d commit 334e52c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

actions/setup/js/json_object_to_markdown.cjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function formatValue(value) {
3939
* Convert a plain JavaScript object to Markdown bullet points.
4040
* Nested objects and arrays are rendered as indented sub-lists.
4141
*
42-
* @param {Record<string, unknown>} obj - The object to render
42+
* @param {object} obj - The object to render
4343
* @param {number} [depth=0] - Current indentation depth
4444
* @returns {string} - Markdown bullet list string
4545
*/
@@ -60,15 +60,15 @@ function jsonObjectToMarkdown(obj, depth = 0) {
6060
lines.push(`${indent}- **${label}**:`);
6161
for (const item of value) {
6262
if (typeof item === "object" && item !== null) {
63-
lines.push(jsonObjectToMarkdown(/** @type {Record<string, unknown>} */ item, depth + 1));
63+
lines.push(jsonObjectToMarkdown(item, depth + 1));
6464
} else {
6565
lines.push(`${" ".repeat(depth + 1)}- ${String(item)}`);
6666
}
6767
}
6868
}
6969
} else if (typeof value === "object" && value !== null) {
7070
lines.push(`${indent}- **${label}**:`);
71-
lines.push(jsonObjectToMarkdown(/** @type {Record<string, unknown>} */ value, depth + 1));
71+
lines.push(jsonObjectToMarkdown(value, depth + 1));
7272
} else {
7373
const formatted = formatValue(value);
7474
lines.push(`${indent}- **${label}**: ${formatted}`);

0 commit comments

Comments
 (0)