From b96f1427c4629f732f418274b2c2b6f43583438e Mon Sep 17 00:00:00 2001 From: JeelRajodiya Date: Sat, 21 Dec 2024 17:44:25 +0530 Subject: [PATCH] refactor: add type annotations to capitalizeJsxTags function parameters --- scripts/build-pages.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-pages.ts b/scripts/build-pages.ts index 901adc8c4947..3c7dc9e74879 100644 --- a/scripts/build-pages.ts +++ b/scripts/build-pages.ts @@ -12,7 +12,7 @@ if (!fs.existsSync(TARGET_DIR)) { } export function capitalizeJsxTags(content: string) { - return content.replace(/<\/?(\w+)/g, function (match, letter) { + return content.replace(/<\/?(\w+)/g, function (match: string, letter: string): string { if (capitalizeTags.includes(letter.toLowerCase())) { return `<${match[1] === '/' ? '/' : ''}${letter[0].toUpperCase()}${letter.slice(1)}`; }