fix: resolve all TypeScript compilation errors
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m17s
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:
@@ -3,6 +3,7 @@ import { create } from 'zustand';
|
||||
import { persist } from 'zustand/middleware';
|
||||
import { createSafeStorage } from '../utils/safe-persist';
|
||||
import type { DisciplineState } from '../types/disciplines';
|
||||
import type { ElementState } from '../types';
|
||||
import {
|
||||
calculateManaDrain,
|
||||
calculateStatBonus,
|
||||
@@ -40,9 +41,9 @@ export interface DisciplineStoreState {
|
||||
export interface DisciplineStoreActions {
|
||||
activate: (id: string, gameState?: { elements?: Record<string, { unlocked?: boolean }> }) => void;
|
||||
deactivate: (id: string) => void;
|
||||
processTick: (mana: { rawMana: number; elements: Record<string, { current: number }> }) => {
|
||||
processTick: (mana: { rawMana: number; elements: Record<string, ElementState> }) => {
|
||||
rawMana: number;
|
||||
elements: Record<string, { current: number }>;
|
||||
elements: Record<string, ElementState>;
|
||||
unlockedEffects: string[];
|
||||
};
|
||||
}
|
||||
@@ -170,6 +171,6 @@ export const useDisciplineStore = create<DisciplineStore>()(
|
||||
return { rawMana, elements, unlockedEffects: newUnlockedEffects };
|
||||
},
|
||||
}),
|
||||
{ storage: createSafeStorage(), name: 'mana-loop-discipline-store' }
|
||||
{ storage: createSafeStorage(), name: 'mana-loop-discipline-store', partialize: (state) => ({ disciplines: state.disciplines, activeIds: state.activeIds, concurrentLimit: state.concurrentLimit, totalXP: state.totalXP, processedPerks: state.processedPerks }) }
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user