mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
🏷️ feat(character): 写了个 type
This commit is contained in:
146
src/types/Character.d.ts
vendored
Normal file
146
src/types/Character.d.ts
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
/**
|
||||
* @file types Character.d.ts
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @description 角色相关类型定义
|
||||
* @since Alpha v0.1.3
|
||||
*/
|
||||
|
||||
declare namespace BTMuli.Genshin.Wiki.Character {
|
||||
/**
|
||||
* @description 本应用的角色类型
|
||||
* @since Alpha v0.1.3
|
||||
* @interface FullInfo
|
||||
* @property {number} id - 角色 ID
|
||||
* @property {string} name - 角色名称
|
||||
* @property {number} star - 角色星级
|
||||
* @property {string} element - 角色元素
|
||||
* @property {string} weapon - 角色武器类型
|
||||
* @property {BaseInfo} baseInfo - 角色基础信息
|
||||
* @property {Constellation[]} constellations - 命之座
|
||||
* @property {Talent[]} talents - 角色天赋
|
||||
* @property {AddInfo} addInfo - 角色附加信息
|
||||
* @return FullInfo
|
||||
*/
|
||||
export interface FullInfo {
|
||||
id: number
|
||||
name: string
|
||||
star: number
|
||||
element: string
|
||||
weapon: string
|
||||
baseInfo: BaseInfo
|
||||
constellations: Constellation[]
|
||||
talents: Talent[]
|
||||
addInfo: AddInfo
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 角色基础信息
|
||||
* @since Alpha v0.1.3
|
||||
* @interface BaseInfo
|
||||
* @property {string} birthday - 生日
|
||||
* @property {string} camp - 所属
|
||||
* @property {string} constellation - 命之座
|
||||
* @property {string} cvZh - 中文配音
|
||||
* @property {string} cvJp - 日文配音
|
||||
* @property {string} description - 角色描述
|
||||
* @return BaseInfo
|
||||
*/
|
||||
export interface BaseInfo {
|
||||
birthday: string
|
||||
camp: string
|
||||
constellation: string
|
||||
cvZh: string
|
||||
cvJp: string
|
||||
description: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 角色命之座
|
||||
* @since Alpha v0.1.3
|
||||
* @interface Constellation
|
||||
* @property {number} id - 命之座 ID,主要是图标 id
|
||||
* @property {string} name - 命之座名称
|
||||
* @description 描述可作为 v-html 使用
|
||||
* @property {string} description - 命之座描述
|
||||
* @return Constellation
|
||||
*/
|
||||
export interface Constellation {
|
||||
id: number
|
||||
name: string
|
||||
description: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 角色天赋
|
||||
* @since Alpha v0.1.3
|
||||
* @interface Talent
|
||||
* @property {number} id - 天赋 ID
|
||||
* @property {string} name - 天赋名称
|
||||
* @description 描述可作为 v-html 使用
|
||||
* @property {string} description - 天赋描述
|
||||
* @return Talent
|
||||
*/
|
||||
export interface Talent {
|
||||
id: number
|
||||
name: string
|
||||
description: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 角色附加信息
|
||||
* @since Alpha v0.1.3
|
||||
* @interface AddInfo
|
||||
* @property {SpecialFood} specialFood - 特色料理
|
||||
* @property {Uniform[]} uniforms - 角色衣装
|
||||
* @property {Story[]} stories - 角色故事
|
||||
* @return AddInfo
|
||||
*/
|
||||
export interface AddInfo {
|
||||
specialFood: SpecialFood
|
||||
uniforms: Uniform[]
|
||||
stories: Story[]
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 角色特色料理
|
||||
* @since Alpha v0.1.3
|
||||
* @interface SpecialFood
|
||||
* @property {string} name - 特色料理名称
|
||||
* @property {string} origin - 特色料理来源
|
||||
* @property {string} description - 特色料理描述
|
||||
* @property {string} effect - 特色料理效果
|
||||
* @return SpecialFood
|
||||
*/
|
||||
export interface SpecialFood {
|
||||
name: string
|
||||
origin: string
|
||||
description: string
|
||||
effect: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 角色衣装
|
||||
* @since Alpha v0.1.3
|
||||
* @interface Uniform
|
||||
* @property {string} name - 衣装名称
|
||||
* @property {string} description - 衣装描述
|
||||
* @return Uniform
|
||||
*/
|
||||
export interface Uniform {
|
||||
name: string
|
||||
description: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 角色故事
|
||||
* @since Alpha v0.1.3
|
||||
* @interface Story
|
||||
* @property {string} title - 故事标题
|
||||
* @property {string} content - 故事内容
|
||||
* @return Story
|
||||
*/
|
||||
export interface Story {
|
||||
title: string
|
||||
content: string
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user