mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
🏷️ feat(wiki): 加了几个类型
This commit is contained in:
39
src/types/Character.d.ts
vendored
39
src/types/Character.d.ts
vendored
@@ -43,6 +43,7 @@ declare namespace BTMuli.Genshin.Wiki.Character {
|
||||
* @property {string} cvZh - 中文配音
|
||||
* @property {string} cvJp - 日文配音
|
||||
* @property {string} description - 角色描述
|
||||
* @property {string[]} source - 角色获取途径
|
||||
* @return BaseInfo
|
||||
*/
|
||||
export interface BaseInfo {
|
||||
@@ -76,6 +77,8 @@ declare namespace BTMuli.Genshin.Wiki.Character {
|
||||
* @interface Talent
|
||||
* @property {number} id - 天赋 ID
|
||||
* @property {string} name - 天赋名称
|
||||
* @property {string} type - 天赋类型
|
||||
* @property {UpInfo[]} upInfos - 天赋升级信息
|
||||
* @description 描述可作为 v-html 使用
|
||||
* @property {string} description - 天赋描述
|
||||
* @return Talent
|
||||
@@ -83,19 +86,40 @@ declare namespace BTMuli.Genshin.Wiki.Character {
|
||||
export interface Talent {
|
||||
id: number
|
||||
name: string
|
||||
type: string
|
||||
upInfos?: UpInfo[]
|
||||
description: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 天赋升级信息
|
||||
* @since Alpha v0.1.3
|
||||
* @interface UpInfo
|
||||
* @property {number} level - 天赋升级原始等级
|
||||
* @property {BTMuli.Genshin.Wiki.Material[]} materials - 天赋升级所需材料
|
||||
* @property {Record<string, number>} oriAttr - 天赋升级前属性
|
||||
* @property {Record<string, number>} upAttr - 天赋升级后属性
|
||||
* @return UpInfo
|
||||
*/
|
||||
export interface UpInfo {
|
||||
level: number
|
||||
materials: BTMuli.Genshin.Wiki.Material[]
|
||||
oriAttr: Record<string, number>
|
||||
upAttr: Record<string, number>
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 角色附加信息
|
||||
* @since Alpha v0.1.3
|
||||
* @interface AddInfo
|
||||
* @property {BTMuli.Genshin.Wiki.levelUp[]} levelUps - 角色升级信息
|
||||
* @property {SpecialFood} specialFood - 特色料理
|
||||
* @property {Uniform[]} uniforms - 角色衣装
|
||||
* @property {Story[]} stories - 角色故事
|
||||
* @return AddInfo
|
||||
*/
|
||||
export interface AddInfo {
|
||||
levelUps: BTMuli.Genshin.Wiki.levelUp[]
|
||||
specialFood: SpecialFood
|
||||
uniforms: Uniform[]
|
||||
stories: Story[]
|
||||
@@ -105,17 +129,14 @@ declare namespace BTMuli.Genshin.Wiki.Character {
|
||||
* @description 角色特色料理
|
||||
* @since Alpha v0.1.3
|
||||
* @interface SpecialFood
|
||||
* @property {string} name - 特色料理名称
|
||||
* @property {string} origin - 特色料理来源
|
||||
* @property {string} description - 特色料理描述
|
||||
* @property {string} effect - 特色料理效果
|
||||
* @extends {BTMuli.Genshin.Wiki.Food}
|
||||
* @property {number} oriId - 原料理 ID
|
||||
* @property {string} oriName - 原料理名称
|
||||
* @return SpecialFood
|
||||
*/
|
||||
export interface SpecialFood {
|
||||
name: string
|
||||
origin: string
|
||||
description: string
|
||||
effect: string
|
||||
export interface SpecialFood extends BTMuli.Genshin.Wiki.Food {
|
||||
oriId: number
|
||||
oriName: string
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
27
src/types/GCG.d.ts
vendored
Normal file
27
src/types/GCG.d.ts
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @file types GCG.d.ts
|
||||
* @description 本应用的 GCG 通用类型定义
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Alpha v0.1.3
|
||||
*/
|
||||
|
||||
declare namespace BTMuli.Genshin.Wiki.GCG {
|
||||
/**
|
||||
* @description 简略信息
|
||||
* @since Alpha v0.1.3
|
||||
* @interface BriefInfo
|
||||
* @property {number} id - 卡牌 ID
|
||||
* @property {umber} content_id - 观测枢 ID
|
||||
* @property {string} name - 卡牌名称
|
||||
* @property {string} type - 卡牌类型
|
||||
* @property {string} icon - 卡牌图标
|
||||
* @return BriefInfo
|
||||
*/
|
||||
export interface BriefInfo {
|
||||
id: number | null
|
||||
content_id: number
|
||||
name: string
|
||||
type: string
|
||||
icon: string
|
||||
}
|
||||
}
|
||||
120
src/types/WIKI.d.ts
vendored
Normal file
120
src/types/WIKI.d.ts
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
/**
|
||||
* @file types WIki.d.ts
|
||||
* @description 本应用的 Wiki 通用类型定义
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Alpha v0.1.3
|
||||
*/
|
||||
|
||||
declare namespace BTMuli.Genshin.Wiki {
|
||||
|
||||
/**
|
||||
* @description 七元素枚举
|
||||
* @enum EnumElement
|
||||
* @since Alpha v0.1.3
|
||||
* @see CharacterCardType
|
||||
* @property {string} pyro 火元素
|
||||
* @property {string} hydro 水元素
|
||||
* @property {string} cryo 冰元素
|
||||
* @property {string} electro 雷元素
|
||||
* @property {string} anemo 风元素
|
||||
* @property {string} geo 岩元素
|
||||
* @property {string} dendro 草元素
|
||||
* @return EnumElement
|
||||
*/
|
||||
export enum EnumElement {
|
||||
pyro = "火元素",
|
||||
hydro = "水元素",
|
||||
cryo = "冰元素",
|
||||
electro = "雷元素",
|
||||
anemo = "风元素",
|
||||
geo = "岩元素",
|
||||
dendro = "草元素",
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 武器类型枚举
|
||||
* @enum EnumWeapon
|
||||
* @since Alpha v0.1.3
|
||||
* @see CharacterCardType
|
||||
* @property {string} sword 单手剑
|
||||
* @property {string} claymore 双手剑
|
||||
* @property {string} pole 长柄武器
|
||||
* @property {string} bow 弓
|
||||
* @property {string} catalyst 法器
|
||||
* @return EnumWeapon
|
||||
*/
|
||||
export enum EnumWeapon {
|
||||
sword = "单手剑",
|
||||
claymore = "双手剑",
|
||||
pole = "长柄武器",
|
||||
bow = "弓",
|
||||
catalyst = "法器",
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 突破信息,适用于角色和武器等级
|
||||
* @since Alpha v0.1.3
|
||||
* @interface levelUp
|
||||
* @property {number} level - 突破等级,指达到突破要求的等级,0 表示未突破
|
||||
* @property {Material[]} materials - 突破所需材料
|
||||
* @property {Record<string, number>[]} upAttri - 突破后的属性加成
|
||||
* @property {Record<string, number>[]} averAttri - 突破后的平均每级属性加成
|
||||
* @property {string} addInfo - 突破后的附加信息,如天赋解锁
|
||||
* @return levelUp
|
||||
*/
|
||||
export interface levelUp {
|
||||
level: number
|
||||
materials: Material[]
|
||||
upAttri: Array<Record<string, number>>
|
||||
averAttri: Array<Record<string, number>>
|
||||
addInfo?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 材料信息
|
||||
* @since Alpha v0.1.3
|
||||
* @interface Material
|
||||
* @property {number} id - 材料 ID
|
||||
* @property {string} name - 材料名称
|
||||
* @property {number} star - 材料星级
|
||||
* @property {string} type - 材料类型
|
||||
* @property {number} count - 材料数量
|
||||
* @property {string[]} source - 材料获取途径
|
||||
* @property {string} description - 材料描述
|
||||
* @return Material
|
||||
*/
|
||||
export interface Material {
|
||||
id: number
|
||||
name: string
|
||||
star: number
|
||||
type: string
|
||||
count?: number
|
||||
source: string[]
|
||||
description: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 本应用的食物类型
|
||||
* @since Alpha v0.1.3
|
||||
* @interface Food
|
||||
* @property {number} id - 食物 ID
|
||||
* @property {string} name - 食物名称
|
||||
* @property {number} star - 食物星级
|
||||
* @property {string} type - 食物类型
|
||||
* @property {number} count - 食物数量
|
||||
* @property {string} description - 食物描述
|
||||
* @property {string[]} source - 食谱来源
|
||||
* @property {string} effect - 食物效果
|
||||
* @return Food
|
||||
*/
|
||||
export interface Food {
|
||||
id: number
|
||||
name: string
|
||||
star: number
|
||||
type: string
|
||||
count?: number
|
||||
description: string
|
||||
source: string[]
|
||||
effect: string
|
||||
}
|
||||
}
|
||||
129
src/types/Weapon.d.ts
vendored
Normal file
129
src/types/Weapon.d.ts
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
/**
|
||||
* @file types Weapon.d.ts
|
||||
* @description 本应用的武器类型定义
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Alpha v0.1.3
|
||||
*/
|
||||
|
||||
declare namespace BTMuli.Genshin.Wiki.Weapon {
|
||||
/**
|
||||
* @description 本应用的武器类型
|
||||
* @since Alpha v0.1.3
|
||||
* @interface FullInfo
|
||||
* @property {number} id - 武器 ID
|
||||
* @property {string} name - 武器名称
|
||||
* @property {number} star - 武器星级
|
||||
* @property {string} type - 武器类型
|
||||
* @property {BaseInfo} baseInfo - 武器基础信息
|
||||
* @property {Refine[]} refines - 武器精炼信息
|
||||
* @property {AddInfo} addInfo - 武器附加信息
|
||||
* @return FullInfo
|
||||
*/
|
||||
export interface FullInfo {
|
||||
id: number
|
||||
name: string
|
||||
star: number
|
||||
type: string
|
||||
baseInfo: BaseInfo
|
||||
refines: Refine[]
|
||||
addInfo: AddInfo
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 武器基础信息
|
||||
* @since Alpha v0.1.3
|
||||
* @interface BaseInfo
|
||||
* @property {string} refine - 武器精炼标题
|
||||
* @property {string} description - 武器描述
|
||||
* @property {string} source - 武器获取途径
|
||||
* @todo 属性值是按 1 级然后计算还是直接按 90 级计算?
|
||||
* @property {Record<string, number>} main - 武器主属性
|
||||
* @property {Record<string, number>} sub - 武器副属性
|
||||
* @return BaseInfo
|
||||
*/
|
||||
export interface BaseInfo {
|
||||
refine: string
|
||||
source: string
|
||||
description: string
|
||||
main: Record<string, number>
|
||||
sub: Record<string, number>
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 武器精炼信息
|
||||
* @since Alpha v0.1.3
|
||||
* @interface Refine
|
||||
* @property {number} level - 精炼等级
|
||||
* @property {string} description - 精炼描述
|
||||
* @return Refine
|
||||
*/
|
||||
export interface Refine {
|
||||
level: number
|
||||
description: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 武器附加信息
|
||||
* @since Alpha v0.1.3
|
||||
* @interface AddInfo
|
||||
* @property {BTMuli.Genshin.Wiki.levelUp[]} levelUps - 武器升级信息
|
||||
* @property {Story} story - 武器故事
|
||||
* @return AddInfo
|
||||
*/
|
||||
export interface AddInfo {
|
||||
levelUps: BTMuli.Genshin.Wiki.levelUp[]
|
||||
story: Story
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 武器突破信息
|
||||
* @since Alpha v0.1.3
|
||||
* @interface BreakInfo
|
||||
* @property {number} level - 突破等级
|
||||
* @property {Material[]} materials - 突破材料
|
||||
* @property {Record<string, number>} main - 突破后主属性
|
||||
* @property {Record<string, number>[]} up - 平均提升属性
|
||||
* @return BreakInfo
|
||||
*/
|
||||
export interface BreakInfo {
|
||||
level: number
|
||||
materials: Material[]
|
||||
main: Record<string, number>
|
||||
up: Array<Record<string, number>>
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 武器故事
|
||||
* @since Alpha v0.1.3
|
||||
* @interface Story
|
||||
* @property {string} title - 武器故事名称
|
||||
* @property {string} content - 武器故事描述
|
||||
* @return Story
|
||||
*/
|
||||
export interface Story {
|
||||
title: string
|
||||
content: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 武器材料
|
||||
* @since Alpha v0.1.3
|
||||
* @interface Material
|
||||
* @todo 材料 id 与名称的对应关系
|
||||
* @property {number} id - 材料 ID
|
||||
* @property {string} name - 材料名称
|
||||
* @property {number} star - 材料星级
|
||||
* @property {string} type - 材料类型
|
||||
* @property {number} count - 材料数量
|
||||
* @property {string} source - 材料获取途径
|
||||
* @return Material
|
||||
*/
|
||||
export interface Material {
|
||||
id: number
|
||||
name: string
|
||||
star: number
|
||||
type: string
|
||||
count: number
|
||||
source: string
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user