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)}`; }