[Bug] EquipmentCategory type missing — breaks EnchantmentDesigner #7

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

Bug: EquipmentCategory type is referenced but never exported

Impact

TypeScript errors in:

  • src/components/game/crafting/EnchantmentDesigner/types.ts (lines 1, 30)
  • src/components/game/crafting/EnchantmentDesigner/utils.ts (line 3)

Error Messages

src/components/game/crafting/EnchantmentDesigner/types.ts(1,94): error TS2724: '"@/lib/game/types"' has no exported member named 'EquipmentCategory'. Did you mean 'ElementCategory'?
src/components/game/crafting/EnchantmentDesigner/utils.ts(3,48): error TS2724: '"@/lib/game/types"' has no exported member named 'EquipmentCategory'. Did you mean 'ElementCategory'?

Root Cause

The EquipmentCategory type is imported in types.ts and utils.ts from @/lib/game/types, but the barrel file (src/lib/game/types.ts) never exports it. The type may have been renamed to ElementCategory or never existed in the types barrel.

The EffectSelectorProps interface references allowedEquipmentCategories: EquipmentCategory[], and getIncompatibilityReason() accepts a parameter typed as { ..., allowedEquipmentCategories: EquipmentCategory[] }, but the type is unavailable.

To Fix

Either:

  1. Define and export EquipmentCategory in src/lib/game/types/ and re-export from the barrel, or
  2. Replace usages with the correct existing type name (possibly ElementCategory)

Verification

After fix, npx tsc --noEmit should show 0 errors related to EquipmentCategory.

## Bug: `EquipmentCategory` type is referenced but never exported ### Impact TypeScript errors in: - `src/components/game/crafting/EnchantmentDesigner/types.ts` (lines 1, 30) - `src/components/game/crafting/EnchantmentDesigner/utils.ts` (line 3) ### Error Messages ``` src/components/game/crafting/EnchantmentDesigner/types.ts(1,94): error TS2724: '"@/lib/game/types"' has no exported member named 'EquipmentCategory'. Did you mean 'ElementCategory'? src/components/game/crafting/EnchantmentDesigner/utils.ts(3,48): error TS2724: '"@/lib/game/types"' has no exported member named 'EquipmentCategory'. Did you mean 'ElementCategory'? ``` ### Root Cause The `EquipmentCategory` type is imported in `types.ts` and `utils.ts` from `@/lib/game/types`, but the barrel file (`src/lib/game/types.ts`) never exports it. The type may have been renamed to `ElementCategory` or never existed in the types barrel. The `EffectSelectorProps` interface references `allowedEquipmentCategories: EquipmentCategory[]`, and `getIncompatibilityReason()` accepts a parameter typed as `{ ..., allowedEquipmentCategories: EquipmentCategory[] }`, but the type is unavailable. ### To Fix Either: 1. Define and export `EquipmentCategory` in `src/lib/game/types/` and re-export from the barrel, or 2. Replace usages with the correct existing type name (possibly `ElementCategory`) ### Verification After fix, `npx tsc --noEmit` should show 0 errors related to `EquipmentCategory`.
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: Type exports fixed. All missing type exports have been added to src/lib/game/types.ts:

  • EquipmentSlot and EquipmentCategory from ./types/equipment/types (fixes #7, #8)
  • Memory type defined in types/game.ts and re-exported from barrel (fixes #9)

Work in progress: Missing evolution paths now have tier definitions created in:

  • element-caps.ts (11 element cap skills)
  • combat-skills.ts (7 combat skills)
  • meditation-skills.ts (3 meditation skills)
  • crafting-skills.ts (2 crafting skills)
  • essence-refining.ts (1 skill)
  • golem-skills.ts (3 golem skills)
  • invocation-skills.ts (guardianLore added)

All registered in SKILL_EVOLUTION_PATHS in index.ts. Still need to verify full typecheck pass and test results.

Progress update: Type exports fixed. All missing type exports have been added to `src/lib/game/types.ts`: - `EquipmentSlot` and `EquipmentCategory` from `./types/equipment/types` (fixes #7, #8) - `Memory` type defined in `types/game.ts` and re-exported from barrel (fixes #9) Work in progress: Missing evolution paths now have tier definitions created in: - element-caps.ts (11 element cap skills) - combat-skills.ts (7 combat skills) - meditation-skills.ts (3 meditation skills) - crafting-skills.ts (2 crafting skills) - essence-refining.ts (1 skill) - golem-skills.ts (3 golem skills) - invocation-skills.ts (guardianLore added) All registered in SKILL_EVOLUTION_PATHS in index.ts. Still need to verify full typecheck pass and test results.
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:00 +02:00
Author
Owner

Exported EquipmentCategory from barrel (src/lib/game/types.ts). Type errors resolved for EnchantmentDesigner. All other builds have unrelated errors but EquipmentCategory issue fixed.

Exported EquipmentCategory from barrel (src/lib/game/types.ts). Type errors resolved for EnchantmentDesigner. All other builds have unrelated errors but EquipmentCategory issue fixed.
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#7