[Bug] EquipmentCategory type missing — breaks EnchantmentDesigner #7
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug:
EquipmentCategorytype is referenced but never exportedImpact
TypeScript errors in:
src/components/game/crafting/EnchantmentDesigner/types.ts(lines 1, 30)src/components/game/crafting/EnchantmentDesigner/utils.ts(line 3)Error Messages
Root Cause
The
EquipmentCategorytype is imported intypes.tsandutils.tsfrom@/lib/game/types, but the barrel file (src/lib/game/types.ts) never exports it. The type may have been renamed toElementCategoryor never existed in the types barrel.The
EffectSelectorPropsinterface referencesallowedEquipmentCategories: EquipmentCategory[], andgetIncompatibilityReason()accepts a parameter typed as{ ..., allowedEquipmentCategories: EquipmentCategory[] }, but the type is unavailable.To Fix
Either:
EquipmentCategoryinsrc/lib/game/types/and re-export from the barrel, orElementCategory)Verification
After fix,
npx tsc --noEmitshould show 0 errors related toEquipmentCategory.Progress update: Type exports fixed. All missing type exports have been added to
src/lib/game/types.ts:EquipmentSlotandEquipmentCategoryfrom./types/equipment/types(fixes #7, #8)Memorytype defined intypes/game.tsand re-exported from barrel (fixes #9)Work in progress: Missing evolution paths now have tier definitions created in:
All registered in SKILL_EVOLUTION_PATHS in index.ts. Still need to verify full typecheck pass and test results.
Exported EquipmentCategory from barrel (src/lib/game/types.ts). Type errors resolved for EnchantmentDesigner. All other builds have unrelated errors but EquipmentCategory issue fixed.