[Bug] EquipmentSlot type missing — breaks EnchantmentPreparer, crafting-actions, data imports #8

Closed
opened 2026-05-13 10:05:06 +02:00 by Anexim · 2 comments
Owner

Bug: EquipmentSlot type is referenced but never exported from @/lib/game/types

Impact

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

src/components/game/crafting/EnchantmentPreparer.tsx(14,96): error TS2305: Module '"@/lib/game/types"' has no exported member 'EquipmentSlot'.
src/lib/game/data/crafting-recipes.ts(4): error TS2724: '"@/lib/game/types"' has no exported member named 'EquipmentSlot'.
src/lib/game/crafting-actions/equipment-actions.ts(3): error TS2724: '"@/lib/game/types"' has no exported member named 'EquipmentSlot'.

Root Cause

The EquipmentSlot type was likely renamed, removed, or never added to the barrel export at src/lib/game/types.ts. Multiple files across the codebase depend on it but cannot find it.

To Fix

Define EquipmentSlot type (likely a union of slot strings like 'mainHand' | 'offHand' | 'head' | 'body' | 'hands' | 'accessory' | 'accessory1' | 'accessory2') and export it from src/lib/game/types/equipment.ts, then re-export from src/lib/game/types.ts.

Verification

After fix, npx tsc --noEmit should show these 3 errors resolved.

## Bug: `EquipmentSlot` type is referenced but never exported from `@/lib/game/types` ### Impact 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 ``` src/components/game/crafting/EnchantmentPreparer.tsx(14,96): error TS2305: Module '"@/lib/game/types"' has no exported member 'EquipmentSlot'. src/lib/game/data/crafting-recipes.ts(4): error TS2724: '"@/lib/game/types"' has no exported member named 'EquipmentSlot'. src/lib/game/crafting-actions/equipment-actions.ts(3): error TS2724: '"@/lib/game/types"' has no exported member named 'EquipmentSlot'. ``` ### Root Cause The `EquipmentSlot` type was likely renamed, removed, or never added to the barrel export at `src/lib/game/types.ts`. Multiple files across the codebase depend on it but cannot find it. ### To Fix Define `EquipmentSlot` type (likely a union of slot strings like `'mainHand' | 'offHand' | 'head' | 'body' | 'hands' | 'accessory' | 'accessory1' | 'accessory2'`) and export it from `src/lib/game/types/equipment.ts`, then re-export from `src/lib/game/types.ts`. ### Verification After fix, `npx tsc --noEmit` should show these 3 errors resolved.
Anexim added the ai:todo label 2026-05-13 10:05:06 +02:00
n8n-gitea was assigned by Anexim 2026-05-13 10:05:06 +02:00
Author
Owner

Progress update: Same fix as #7 - EquipmentSlot type now exported from src/lib/game/types/equipment/types.ts and re-exported through the barrel at src/lib/game/types.ts. Also fixes type imports in EnchantmentPreparer.tsx, crafting-recipes.ts, and equipment-actions.ts.

Progress update: Same fix as #7 - `EquipmentSlot` type now exported from `src/lib/game/types/equipment/types.ts` and re-exported through the barrel at `src/lib/game/types.ts`. Also fixes type imports in `EnchantmentPreparer.tsx`, `crafting-recipes.ts`, and `equipment-actions.ts`.
Anexim added the ai:blocked label 2026-05-16 13:34:01 +02:00
Anexim removed the ai:blocked label 2026-05-17 07:59:12 +02:00
Author
Owner

Issue resolved: Added EquipmentSlot type definition, re‑exported via index, and updated imports. Repository now builds without TS errors.

Issue resolved: Added EquipmentSlot type definition, re‑exported via index, and updated imports. Repository now builds without TS errors.
Anexim removed the ai:todo label 2026-05-18 10:19:21 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#8