From 8bd89a27a57ed439569cbd10dc26e4414feb0237 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 14 Mar 2024 17:51:43 +0100 Subject: [PATCH] Fix types --- packages/string-templates/scripts/gen-collection-info.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/string-templates/scripts/gen-collection-info.ts b/packages/string-templates/scripts/gen-collection-info.ts index 3f583d59d2..ae2a726661 100644 --- a/packages/string-templates/scripts/gen-collection-info.ts +++ b/packages/string-templates/scripts/gen-collection-info.ts @@ -126,7 +126,7 @@ const excludeFunctions = { string: ["raw"] } * This script is very specific to purpose, parsing the handlebars-helpers files to attempt to get information about them. */ function run() { - const foundNames = [] + const foundNames: string[] = [] for (let collection of COLLECTIONS) { const collectionFile = fs.readFileSync( `${path.dirname(require.resolve(HELPER_LIBRARY))}/lib/${collection}.js`, @@ -147,7 +147,7 @@ function run() { } foundNames.push(name) // this is ridiculous, but it parse the function header - const fnc = entry[1].toString() + const fnc = entry[1]!.toString() const jsDocInfo = getCommentInfo(collectionFile, fnc) let args = jsDocInfo.tags .filter(tag => tag.title === "param") @@ -176,8 +176,8 @@ function run() { } // convert all markdown to HTML - for (let collection of Object.values(outputJSON)) { - for (let helper of Object.values(collection)) { + for (let collection of Object.values(outputJSON)) { + for (let helper of Object.values(collection)) { helper.description = marked.parse(helper.description) } }