[Bug] EquipmentSlot type missing — breaks EnchantmentPreparer, crafting-actions, data imports #8
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:
EquipmentSlottype is referenced but never exported from@/lib/game/typesImpact
TypeScript errors in:
src/components/game/crafting/EnchantmentPreparer.tsx(line 14)src/lib/game/data/crafting-recipes.ts(line 4)src/lib/game/crafting-actions/equipment-actions.ts(line 3)Error Messages
Root Cause
The
EquipmentSlottype was likely renamed, removed, or never added to the barrel export atsrc/lib/game/types.ts. Multiple files across the codebase depend on it but cannot find it.To Fix
Define
EquipmentSlottype (likely a union of slot strings like'mainHand' | 'offHand' | 'head' | 'body' | 'hands' | 'accessory' | 'accessory1' | 'accessory2') and export it fromsrc/lib/game/types/equipment.ts, then re-export fromsrc/lib/game/types.ts.Verification
After fix,
npx tsc --noEmitshould show these 3 errors resolved.Progress update: Same fix as #7 -
EquipmentSlottype now exported fromsrc/lib/game/types/equipment/types.tsand re-exported through the barrel atsrc/lib/game/types.ts. Also fixes type imports inEnchantmentPreparer.tsx,crafting-recipes.ts, andequipment-actions.ts.Issue resolved: Added EquipmentSlot type definition, re‑exported via index, and updated imports. Repository now builds without TS errors.