diff --git a/scripts/create-gear-json.ts b/scripts/create-gear-json.ts index bac47f907..96f7780dd 100644 --- a/scripts/create-gear-json.ts +++ b/scripts/create-gear-json.ts @@ -1,5 +1,3 @@ -// @ts-nocheck - import fs from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; @@ -57,7 +55,13 @@ async function main() { internalName, brand: gear.Brand, translations: langDicts.map(([langCode, translations]) => { - const name = translations[categoryKey]?.[internalName]; + const category = ( + translations as unknown as Record< + string, + Record | undefined + > + )[categoryKey]; + const name = category?.[internalName]; invariant(name, `Missing translation for ${internalName}`); return {