mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-25 05:29:45 +08:00
🏷️ fix(type): 一些 Type 改动
This commit is contained in:
@@ -1,64 +0,0 @@
|
||||
/**
|
||||
* @file Achievements.ts
|
||||
* @description Achievements interface
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Alpha
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 本应用的成就类型
|
||||
* @since Alpha
|
||||
* @interface Achievement
|
||||
* @property {number} id - 成就 ID
|
||||
* @property {number} series - 成就系列 ID
|
||||
* @property {number} order - 成就排列顺序,用于展示全部成就
|
||||
* @property {string} name - 成就名称
|
||||
* @property {string} description - 成就描述
|
||||
* @property {number} reward - 成就奖励
|
||||
* @property {boolean} completed - 成就是否完成
|
||||
* @property {string} completed_time - 成就完成时间
|
||||
* @property {number} progress - 成就进度
|
||||
* @property {string} version - 成就版本
|
||||
* @returns {Achievement}
|
||||
*/
|
||||
export interface Achievement {
|
||||
id: number
|
||||
series: number
|
||||
order: number
|
||||
name: string
|
||||
description: string
|
||||
reward: number
|
||||
completed: boolean
|
||||
completed_time: string | null
|
||||
progress: number
|
||||
version: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 本应用的成就系列类型
|
||||
* @since Alpha
|
||||
* @interface AchievementSeries
|
||||
* @property {number} id - 成就系列 ID
|
||||
* @property {number} order - 成就系列排列顺序,用于展示全部成就系列
|
||||
* @property {string} name - 成就系列名称
|
||||
* @property {string} version - 成就系列版本
|
||||
* @property {number[]} achievements - 成就系列包含的成就
|
||||
* @property {number} total_count - 成就系列包含的成就数
|
||||
* @property {number} completed_count - 成就系列已完成的成就数
|
||||
* @description 有的成就系列没有名片奖励,这边的 card 可能为 undefined
|
||||
* @property {string} card - 成就系列奖励,这边是名片名称
|
||||
* @description 像是天地万象这种一直更新的成就系列,这边的 version 可能为 undefined
|
||||
* @property {string} icon - 成就系列图标
|
||||
* @returns {AchievementSeries}
|
||||
*/
|
||||
export interface AchievementSeries {
|
||||
id: number
|
||||
order: number
|
||||
name: string
|
||||
version: string
|
||||
achievements: number[]
|
||||
total_count: number
|
||||
completed_count: number
|
||||
card?: string
|
||||
icon: string
|
||||
}
|
||||
@@ -5,30 +5,6 @@
|
||||
* @since Alpha v0.1.2
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 定义一个 Map<T> 接口
|
||||
* @since Alpha v0.1.2
|
||||
* @interface Map
|
||||
* @template T
|
||||
* @returns {Map<T>}
|
||||
*/
|
||||
export type Map<T> = Record<number, T>;
|
||||
|
||||
/**
|
||||
* @description 定义 IndexedDB 数据库配置
|
||||
* @since Alpha v0.1.2
|
||||
* @interface DBConfig
|
||||
* @property {string} storeName 数据库名称
|
||||
* @property {string} keyPath 数据库主键
|
||||
* @property {string[]} indexes 数据库索引
|
||||
* @returns {DBConfig}
|
||||
*/
|
||||
export interface DBConfig {
|
||||
storeName: string
|
||||
keyPath: string
|
||||
indexes: string[]
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 地区的枚举
|
||||
* @enum GameCountry
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
* @since Alpha v0.1.2
|
||||
*/
|
||||
|
||||
import { type Map } from "./Base";
|
||||
|
||||
/**
|
||||
* @description 素材日历接口
|
||||
* @interface CalendarData
|
||||
@@ -17,8 +15,8 @@ import { type Map } from "./Base";
|
||||
* @returns {CalendarData}
|
||||
*/
|
||||
export interface CalendarData {
|
||||
characters: Map<CalendarItem>
|
||||
weapons: Map<CalendarItem>
|
||||
characters: Record<number, CalendarItem>
|
||||
weapons: Record<number, CalendarItem>
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -173,7 +173,7 @@ export interface MonsterCard extends BaseCard {
|
||||
* @property {EnumElement} element 元素
|
||||
* @property {EnumWeapon} weapon 武器
|
||||
* @property {EnumCamp} camp 阵营
|
||||
* @returns {CharacterCardType}
|
||||
* @returns {CharacterCardType}
|
||||
*/
|
||||
export interface CharacterCardType {
|
||||
element: EnumElement
|
||||
@@ -189,7 +189,7 @@ export interface CharacterCardType {
|
||||
* @property {EnumActionType} actionType 类型
|
||||
* @property {EnumActionTag} actionTag 标签
|
||||
* @property {EnumActionCost} actionCost 花费
|
||||
* @returns {ActionCardType}
|
||||
* @returns {ActionCardType}
|
||||
*/
|
||||
export interface ActionCardType {
|
||||
actionType: EnumActionType
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* @file interface NameCard.ts
|
||||
* @description NameCard interface
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Alpha
|
||||
*/
|
||||
|
||||
/**
|
||||
* @description 本应用的名片类型
|
||||
* @since Alpha
|
||||
* @interface NameCard
|
||||
* @property {string} name - 名片名称,同时也是文件名
|
||||
* @property {string} description - 名片描述
|
||||
* @property {string} icon - 名片图标路径
|
||||
* @property {string} bg - 名片背景图路径
|
||||
* @property {string} profile - 名片 Profile 图路径
|
||||
* @property {number} type - 名片类型 (0: 其他,1: 成就,2:角色,3:纪行,4:活动)
|
||||
* @property {string} source - 名片来源
|
||||
* @returns {NameCard}
|
||||
*/
|
||||
export interface NameCard {
|
||||
name: string
|
||||
description: string
|
||||
icon: string
|
||||
bg: string
|
||||
profile: string
|
||||
type: string
|
||||
source: string
|
||||
}
|
||||
Reference in New Issue
Block a user