Refactor TypeScript interfaces and types for consistency and readability
Gitea Auto Deploy / Deploy-Container (push) Successful in 49s

- Reformatted multiple TypeScript interfaces across various files to ensure consistent spacing and indentation.
- Updated `changelog.ts`, `enka.ts`, `extraData.ts`, `gloval.d.ts`, `index.ts`, `lightconeDetail.ts`, `metaData.ts`, `mics.ts`, `modelConfig.ts`, `monsterDetail.ts`, `peakDetail.ts`, `pfDetail.ts`, `psConnect.ts`, `relicDetail.ts`, `showcase.ts`, `srtools.ts`, and `zod/index.ts` for improved code clarity.
- Ensured all interfaces are properly formatted with consistent line breaks and spacing.
- Made minor adjustments to the `tsconfig.json` file for formatting consistency.
This commit is contained in:
2026-07-15 11:04:18 +07:00
parent 2b9f4c3a69
commit 7699ac7139
129 changed files with 16426 additions and 16418 deletions
+69 -69
View File
@@ -1,69 +1,69 @@
import { ASGroupDetail, AvatarDetail, BaseTypeData, DamageTypeData, EliteData, HardLevelData, LightConeDetail, MainAffixData, Metadata, MOCGroupDetail, MonsterDetail, PeakGroupDetail, PFGroupDetail, RelicSetDetail, SkillMaxLevelData, StageData, SubAffixData } from '@/types'
import { create } from 'zustand'
interface DetailDataState {
mapMonster: Record<string, MonsterDetail>
mapRelicSet: Record<string, RelicSetDetail>
mapAvatar: Record<string, AvatarDetail>
mapLightCone: Record<string, LightConeDetail>
mapAS: Record<string, ASGroupDetail>
mapMoc: Record<string, MOCGroupDetail>
mapPF: Record<string, PFGroupDetail>
mapPeak: Record<string, PeakGroupDetail>
baseType: Record<string, BaseTypeData>;
damageType: Record<string, DamageTypeData>;
mainAffix: Record<string, Record<string, MainAffixData>>;
subAffix: Record<string, Record<string, SubAffixData>>;
skillConfig: Record<string, SkillMaxLevelData>;
stage: Record<string, StageData>;
hardLevelConfig: Record<string, Record<string, HardLevelData>>;
eliteConfig: Record<string, EliteData>;
setMetaData: (newMetaData: Metadata) => void;
setMapMonster: (newMonster: Record<string, MonsterDetail>) => void
setMapRelicSet: (newRelicSet: Record<string, RelicSetDetail>) => void
setMapAvatar: (newAvatar: Record<string, AvatarDetail>) => void
setMapLightCone: (newLightCone: Record<string, LightConeDetail>) => void
setMapAS: (newAS: Record<string, ASGroupDetail>) => void
setMapMoc: (newMoc: Record<string, MOCGroupDetail>) => void
setMapPF: (newPF: Record<string, PFGroupDetail>) => void
setMapPeak: (newPeak: Record<string, PeakGroupDetail>) => void
}
const useDetailDataStore = create<DetailDataState>((set) => ({
mapMonster: {},
mapRelicSet: {},
mapAvatar: {},
mapLightCone: {},
mapAS: {},
mapMoc: {},
mapPF: {},
mapPeak: {},
baseType: {},
damageType: {},
mainAffix: {},
subAffix: {},
skillConfig: {},
stage: {},
hardLevelConfig: {},
eliteConfig: {},
setMapMonster: (newMonster) => set({ mapMonster: newMonster }),
setMapRelicSet: (newRelicSet) => set({ mapRelicSet: newRelicSet }),
setMapAvatar: (newAvatar) => set({ mapAvatar: newAvatar }),
setMapLightCone: (newLightCone) => set({ mapLightCone: newLightCone }),
setMapAS: (newAS) => set({ mapAS: newAS }),
setMapMoc: (newMoc) => set({ mapMoc: newMoc }),
setMapPF: (newPF) => set({ mapPF: newPF }),
setMapPeak: (newPeak) => set({ mapPeak: newPeak }),
setMetaData: (newMetaData: Metadata) => set({
baseType: newMetaData.BaseType,
damageType: newMetaData.DamageType,
mainAffix: newMetaData.MainAffix,
subAffix: newMetaData.SubAffix,
skillConfig: newMetaData.SkillConfig,
stage: newMetaData.Stage,
hardLevelConfig: newMetaData.HardLevelConfig,
eliteConfig: newMetaData.EliteConfig,
}),
}))
export default useDetailDataStore
import { ASGroupDetail, AvatarDetail, BaseTypeData, DamageTypeData, EliteData, HardLevelData, LightConeDetail, MainAffixData, Metadata, MOCGroupDetail, MonsterDetail, PeakGroupDetail, PFGroupDetail, RelicSetDetail, SkillMaxLevelData, StageData, SubAffixData } from '@/types'
import { create } from 'zustand'
interface DetailDataState {
mapMonster: Record<string, MonsterDetail>
mapRelicSet: Record<string, RelicSetDetail>
mapAvatar: Record<string, AvatarDetail>
mapLightCone: Record<string, LightConeDetail>
mapAS: Record<string, ASGroupDetail>
mapMoc: Record<string, MOCGroupDetail>
mapPF: Record<string, PFGroupDetail>
mapPeak: Record<string, PeakGroupDetail>
baseType: Record<string, BaseTypeData>;
damageType: Record<string, DamageTypeData>;
mainAffix: Record<string, Record<string, MainAffixData>>;
subAffix: Record<string, Record<string, SubAffixData>>;
skillConfig: Record<string, SkillMaxLevelData>;
stage: Record<string, StageData>;
hardLevelConfig: Record<string, Record<string, HardLevelData>>;
eliteConfig: Record<string, EliteData>;
setMetaData: (newMetaData: Metadata) => void;
setMapMonster: (newMonster: Record<string, MonsterDetail>) => void
setMapRelicSet: (newRelicSet: Record<string, RelicSetDetail>) => void
setMapAvatar: (newAvatar: Record<string, AvatarDetail>) => void
setMapLightCone: (newLightCone: Record<string, LightConeDetail>) => void
setMapAS: (newAS: Record<string, ASGroupDetail>) => void
setMapMoc: (newMoc: Record<string, MOCGroupDetail>) => void
setMapPF: (newPF: Record<string, PFGroupDetail>) => void
setMapPeak: (newPeak: Record<string, PeakGroupDetail>) => void
}
const useDetailDataStore = create<DetailDataState>((set) => ({
mapMonster: {},
mapRelicSet: {},
mapAvatar: {},
mapLightCone: {},
mapAS: {},
mapMoc: {},
mapPF: {},
mapPeak: {},
baseType: {},
damageType: {},
mainAffix: {},
subAffix: {},
skillConfig: {},
stage: {},
hardLevelConfig: {},
eliteConfig: {},
setMapMonster: (newMonster) => set({ mapMonster: newMonster }),
setMapRelicSet: (newRelicSet) => set({ mapRelicSet: newRelicSet }),
setMapAvatar: (newAvatar) => set({ mapAvatar: newAvatar }),
setMapLightCone: (newLightCone) => set({ mapLightCone: newLightCone }),
setMapAS: (newAS) => set({ mapAS: newAS }),
setMapMoc: (newMoc) => set({ mapMoc: newMoc }),
setMapPF: (newPF) => set({ mapPF: newPF }),
setMapPeak: (newPeak) => set({ mapPeak: newPeak }),
setMetaData: (newMetaData: Metadata) => set({
baseType: newMetaData.BaseType,
damageType: newMetaData.DamageType,
mainAffix: newMetaData.MainAffix,
subAffix: newMetaData.SubAffix,
skillConfig: newMetaData.SkillConfig,
stage: newMetaData.Stage,
hardLevelConfig: newMetaData.HardLevelConfig,
eliteConfig: newMetaData.EliteConfig,
}),
}))
export default useDetailDataStore