fix: Missing PrestigeDef and LootDrop type definitions #23

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

Severity: Critical

Files:

  • src/lib/game/constants/prestige.ts (line 2) — imports PrestigeDef from '../types' but it's not defined
  • src/lib/game/data/loot-drops.ts (line 3) — imports LootDrop from '../types' but it's not defined

Problem: Both PrestigeDef and LootDrop are imported from ../types (the types barrel), but neither type is defined in any file under src/lib/game/types/. This will cause TypeScript compilation errors.

Impact: PRESTIGE_DEF and LOOT_DROPS records are untyped. Any property access on prestige upgrades or loot drops has no type checking.

Fix: Add both types to src/lib/game/types/game.ts (or a new dedicated file) and re-export from types/index.ts:

export interface PrestigeDef {
  name: string;
  desc: string;
  max: number;
  cost: number;
}

export interface LootDrop {
  id: string;
  name: string;
  rarity: string;
  type: string;
  minFloor: number;
  dropChance: number;
  guardianOnly?: boolean;
  amount?: { min: number; max: number };
}
**Severity:** Critical **Files:** - `src/lib/game/constants/prestige.ts` (line 2) — imports `PrestigeDef` from `'../types'` but it's not defined - `src/lib/game/data/loot-drops.ts` (line 3) — imports `LootDrop` from `'../types'` but it's not defined **Problem:** Both `PrestigeDef` and `LootDrop` are imported from `../types` (the types barrel), but neither type is defined in any file under `src/lib/game/types/`. This will cause TypeScript compilation errors. **Impact:** `PRESTIGE_DEF` and `LOOT_DROPS` records are untyped. Any property access on prestige upgrades or loot drops has no type checking. **Fix:** Add both types to `src/lib/game/types/game.ts` (or a new dedicated file) and re-export from `types/index.ts`: ```ts export interface PrestigeDef { name: string; desc: string; max: number; cost: number; } export interface LootDrop { id: string; name: string; rarity: string; type: string; minFloor: number; dropChance: number; guardianOnly?: boolean; amount?: { min: number; max: number }; } ```
Anexim added the ai:todo label 2026-05-18 15:54:40 +02:00
n8n-gitea was assigned by Anexim 2026-05-18 15:54:40 +02:00
Author
Owner

Starting work on Missing PrestigeDef and LootDrop type definitions

Starting work on Missing PrestigeDef and LootDrop type definitions
Author
Owner

Fixed: Added PrestigeDef and LootDrop interfaces to game.ts and re-exported from types/index.ts

Fixed: Added PrestigeDef and LootDrop interfaces to game.ts and re-exported from types/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#23