fix: EquipmentCategory used but not imported in enchantments/index.ts #24

Closed
opened 2026-05-18 15:54:41 +02:00 by Anexim · 2 comments
Owner

Severity: Critical

File: src/lib/game/data/enchantments/index.ts (lines 33, 39)

Problem: The functions getEffectsForEquipment(equipmentCategory: EquipmentCategory) and canApplyEffect(effectId: string, equipmentCategory: EquipmentCategory) use EquipmentCategory as a parameter type, but this type is never imported in the file. Only EnchantmentEffectCategory and EnchantmentEffectDef are imported from '../enchantment-types'.

Impact: TypeScript compilation error — EquipmentCategory is undefined in this module.

Fix: Add the import:

import type { EquipmentCategory } from '../equipment';
**Severity:** Critical **File:** `src/lib/game/data/enchantments/index.ts` (lines 33, 39) **Problem:** The functions `getEffectsForEquipment(equipmentCategory: EquipmentCategory)` and `canApplyEffect(effectId: string, equipmentCategory: EquipmentCategory)` use `EquipmentCategory` as a parameter type, but this type is **never imported** in the file. Only `EnchantmentEffectCategory` and `EnchantmentEffectDef` are imported from `'../enchantment-types'`. **Impact:** TypeScript compilation error — `EquipmentCategory` is undefined in this module. **Fix:** Add the import: ```ts import type { EquipmentCategory } from '../equipment'; ```
Anexim added the ai:todo label 2026-05-18 15:54:41 +02:00
n8n-gitea was assigned by Anexim 2026-05-18 15:54:41 +02:00
Author
Owner

Starting work on EquipmentCategory not imported in enchantments/index.ts

Starting work on EquipmentCategory not imported in enchantments/index.ts
Author
Owner

Fixed: Added missing EquipmentCategory import to enchantments/index.ts

Fixed: Added missing EquipmentCategory import to enchantments/index.ts
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#24