fix: resolve all TypeScript compilation errors
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m17s

- Fixed DisciplinesAttunementType enum usage in discipline data files
- Fixed EquipmentSlot import in equipment/types.ts
- Fixed enchantment-effects.ts export/import chain
- Fixed safe-persist.ts StateStorage type compatibility
- Fixed store persist partial return types for all stores
- Fixed gameStore.ts ElementState type and error handling
- Fixed useGameDerived.ts missing properties on GameCoordinatorStore
- Added SkillUpgradeChoice type to types.ts
- Fixed ActionButtons.tsx optional currentStudyTarget prop
- Fixed GameToast.tsx Toast type compatibility
- Fixed EnchantmentDesigner sub-component type mismatches
- Fixed SpireCombatPage equippedInstances/equipmentInstances types
- Fixed page.tsx computeClickMana argument
- Added baseCastTime to SpellDef type
- Fixed golem/types.ts and loot-drops.ts import paths
- Fixed craftingStore.ts missing lastError in initial state and actions
- Fixed store-actions-combat-prestige.test.ts Memory type usage
- Fixed floor-utils.upgraded.test.ts array type annotation
- Fixed computed-stats.test.ts state type assertions
- Fixed activity-log.test.ts state type annotation
- Fixed discipline-math.test.ts enum value usage
- Fixed game-loop.test.ts vitest mock import
- Various other test file type fixes
This commit is contained in:
2026-05-24 14:34:49 +02:00
parent 14f25fffda
commit 23a83a04cf
44 changed files with 191 additions and 142 deletions
+3 -2
View File
@@ -1,13 +1,14 @@
// ─── Base Disciplines ─────────────────────────────────────────────────────────
// Disciplines available to all attunements
import { DisciplinesAttunementType } from '../../types/disciplines';
import type { DisciplineDefinition } from '../../types/disciplines';
export const baseDisciplines: DisciplineDefinition[] = [
{
id: 'raw-mastery',
name: 'Raw Mana Mastery',
attunement: 'base',
attunement: DisciplinesAttunementType.BASE,
manaType: 'raw',
baseCost: 5,
description: 'Learn to harness raw mana more efficiently.',
@@ -35,7 +36,7 @@ export const baseDisciplines: DisciplineDefinition[] = [
{
id: 'elemental-attunement',
name: 'Elemental Attunement',
attunement: 'base',
attunement: DisciplinesAttunementType.BASE,
manaType: 'fire',
baseCost: 10,
description: 'Begin focusing raw mana into fire.',
@@ -1,13 +1,14 @@
// ─── Enchanter Special Disciplines ─────────────────────────────────────────────
// Disciplines for unlocking unique and powerful special enchantment effects
import { DisciplinesAttunementType } from '../../types/disciplines';
import type { DisciplineDefinition } from '../../types/disciplines';
export const enchanterSpecialDisciplines: DisciplineDefinition[] = [
{
id: 'study-special-enchantments',
name: 'Study Special Enchantments',
attunement: 'enchanter',
attunement: DisciplinesAttunementType.ENCHANTER,
manaType: 'death',
baseCost: 22,
description: 'Learn to enchant equipment with unique and powerful effects.',
@@ -1,13 +1,14 @@
// ─── Enchanter Spell Disciplines ───────────────────────────────────────────────
// Disciplines for unlocking spell enchantment effects on casters
import { DisciplinesAttunementType } from '../../types/disciplines';
import type { DisciplineDefinition } from '../../types/disciplines';
export const enchanterSpellDisciplines: DisciplineDefinition[] = [
{
id: 'study-basic-spell-enchantments',
name: 'Study Basic Spell Enchantments',
attunement: 'enchanter',
attunement: DisciplinesAttunementType.ENCHANTER,
manaType: 'air',
baseCost: 18,
description: 'Learn to enchant casters with basic spell effects.',
@@ -85,7 +86,7 @@ export const enchanterSpellDisciplines: DisciplineDefinition[] = [
{
id: 'study-intermediate-spell-enchantments',
name: 'Study Intermediate Spell Enchantments',
attunement: 'enchanter',
attunement: DisciplinesAttunementType.ENCHANTER,
manaType: 'earth',
baseCost: 25,
description: 'Learn to enchant casters with intermediate and compound spell effects.',
@@ -148,7 +149,7 @@ export const enchanterSpellDisciplines: DisciplineDefinition[] = [
{
id: 'study-advanced-spell-enchantments',
name: 'Study Advanced Spell Enchantments',
attunement: 'enchanter',
attunement: DisciplinesAttunementType.ENCHANTER,
manaType: 'dark',
baseCost: 35,
description: 'Learn to enchant casters with master and exotic spell effects.',
@@ -1,13 +1,14 @@
// ─── Enchanter Utility & Mana Disciplines ──────────────────────────────────────
// Disciplines for unlocking utility and mana enchantment effects
import { DisciplinesAttunementType } from '../../types/disciplines';
import type { DisciplineDefinition } from '../../types/disciplines';
export const enchanterUtilityDisciplines: DisciplineDefinition[] = [
{
id: 'study-utility-enchantments',
name: 'Study Utility Enchantments',
attunement: 'enchanter',
attunement: DisciplinesAttunementType.ENCHANTER,
manaType: 'light',
baseCost: 8,
description: 'Learn to enchant equipment with utility effects.',
@@ -45,7 +46,7 @@ export const enchanterUtilityDisciplines: DisciplineDefinition[] = [
{
id: 'study-mana-enchantments',
name: 'Study Mana Enchantments',
attunement: 'enchanter',
attunement: DisciplinesAttunementType.ENCHANTER,
manaType: 'water',
baseCost: 15,
description: 'Learn to enchant equipment with mana-boosting effects.',
+5 -4
View File
@@ -1,13 +1,14 @@
// ─── Enchanter Disciplines ────────────────────────────────────────────────────
// Core enchanter disciplines and weapon enchantment studies
import { DisciplinesAttunementType } from '../../types/disciplines';
import type { DisciplineDefinition } from '../../types/disciplines';
export const enchanterDisciplines: DisciplineDefinition[] = [
{
id: 'enchant-crafting',
name: 'Enchantment Crafting',
attunement: 'enchanter',
attunement: DisciplinesAttunementType.ENCHANTER,
manaType: 'transference',
baseCost: 8,
description: 'Improve your ability to apply enchantments to equipment.',
@@ -35,7 +36,7 @@ export const enchanterDisciplines: DisciplineDefinition[] = [
{
id: 'mana-channeling',
name: 'Mana Channeling',
attunement: 'enchanter',
attunement: DisciplinesAttunementType.ENCHANTER,
manaType: 'lightning',
baseCost: 12,
description: 'Use lightning to transfer mana to equipment.',
@@ -56,7 +57,7 @@ export const enchanterDisciplines: DisciplineDefinition[] = [
{
id: 'study-basic-weapon-enchantments',
name: 'Study Basic Weapon Enchantments',
attunement: 'enchanter',
attunement: DisciplinesAttunementType.ENCHANTER,
manaType: 'fire',
baseCost: 10,
description: 'Learn to enchant weapons with basic elemental effects.',
@@ -94,7 +95,7 @@ export const enchanterDisciplines: DisciplineDefinition[] = [
{
id: 'study-advanced-weapon-enchantments',
name: 'Study Advanced Weapon Enchantments',
attunement: 'enchanter',
attunement: DisciplinesAttunementType.ENCHANTER,
manaType: 'dark',
baseCost: 20,
description: 'Learn to enchant weapons with exotic and combat effects.',
+3 -2
View File
@@ -1,13 +1,14 @@
// ─── Fabricator Discipline Files ──────────────────────────────────────────────
// Attunement-focused disciplines for Fabricator role
import { DisciplinesAttunementType } from '../../types/disciplines';
import type { DisciplineDefinition } from '../../types/disciplines';
export const fabricatorDisciplines: DisciplineDefinition[] = [
{
id: 'golem-crafting',
name: 'Golem Crafting',
attunement: 'fabricator',
attunement: DisciplinesAttunementType.FABRICATOR,
manaType: 'earth',
baseCost: 10,
description: 'Improve your ability to craft and maintain golems.',
@@ -35,7 +36,7 @@ export const fabricatorDisciplines: DisciplineDefinition[] = [
{
id: 'crafting-efficiency',
name: 'Crafting Efficiency',
attunement: 'fabricator',
attunement: DisciplinesAttunementType.FABRICATOR,
manaType: 'sand',
baseCost: 12,
description: 'Reduce material costs for crafting.',
+3 -2
View File
@@ -1,13 +1,14 @@
// ─── Invoker Discipline Files ─────────────────────────────────────────────────
// Attunement-focused disciplines for Invoker role
import { DisciplinesAttunementType } from '../../types/disciplines';
import type { DisciplineDefinition } from '../../types/disciplines';
export const invokerDisciplines: DisciplineDefinition[] = [
{
id: 'spell-casting',
name: 'Spell Casting',
attunement: 'invoker',
attunement: DisciplinesAttunementType.INVOKER,
manaType: 'light',
baseCost: 10,
description: 'Improve spell power and effectiveness.',
@@ -35,7 +36,7 @@ export const invokerDisciplines: DisciplineDefinition[] = [
{
id: 'void-manipulation',
name: 'Void Manipulation',
attunement: 'invoker',
attunement: DisciplinesAttunementType.INVOKER,
manaType: 'void',
baseCost: 15,
description: 'Master the exotic void mana for devastating effects.',
+3 -3
View File
@@ -2,10 +2,8 @@
// Re-exports from category-specific files for backward compatibility
// All enchantment effect definitions have been moved to src/lib/game/data/enchantments/
export {
export {
ENCHANTMENT_EFFECTS,
type EnchantmentEffectCategory,
type EnchantmentEffectDef,
getEnchantmentEffect,
getEffectsForEquipment,
canApplyEffect,
@@ -19,3 +17,5 @@ export {
UTILITY_EFFECTS,
SPECIAL_EFFECTS,
} from './enchantments/index'
export type { EnchantmentEffectCategory, EnchantmentEffectDef } from './enchantment-types'
+1
View File
@@ -59,6 +59,7 @@ export function calculateEffectCapacityCost(effectId: string, stacks: number, ef
}
// Re-export category-specific collections for direct access if needed
export type { EnchantmentEffectCategory, EnchantmentEffectDef } from '../enchantment-types';
export {
SPELL_EFFECTS,
MANA_EFFECTS,
+2 -1
View File
@@ -1,6 +1,7 @@
// ─── Equipment Types ─────────────────────────────────────────────────
export type { EquipmentSlot } from '../../types/equipmentSlot';
import type { EquipmentSlot } from '../../types/equipmentSlot';
export type { EquipmentSlot };
export type EquipmentCategory = 'caster' | 'shield' | 'catalyst' | 'sword' | 'head' | 'body' | 'hands' | 'feet' | 'accessory';
// All equipment slots in order
+1 -1
View File
@@ -1,6 +1,6 @@
// ─── Golem Types ─────────────────────────────────────────────────
import type { SpellCost } from '../types';
import type { SpellCost } from '../../types';
// Golem mana cost helper
export function elemCost(element: string, amount: number): SpellCost {
+1 -1
View File
@@ -1,6 +1,6 @@
// ─── Loot Drop Definitions ─────────────────────────────────────────────────────
import type { LootDrop } from '../types';
import type { LootDrop } from '../types/game';
export const LOOT_DROPS: Record<string, LootDrop> = {
// ─── Materials (used for crafting) ───