Skip to content

Commit

Permalink
✏️ 修正类型
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Nov 11, 2024
1 parent 272f3bc commit d35b94f
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion src/components/home/t-calendar-birth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ onBeforeMount(async () => {
next.value = TSAvatarBirth.getNextAvatarBirth();
});
function toBirth(type: TGApp.Archive.Birth.RoleItem) {
function toBirth(type: TGApp.Archive.Birth.RoleItem | true): void {
let dateStr;
if (type === true) {
const date = new Date();
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/Hutao/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @file plugins/Hutao/index.ts
* @description Hutao 插件入口
* @since Beta v0.6.2
* @since Beta v0.6.3
*/

import {
Expand Down
14 changes: 7 additions & 7 deletions src/plugins/Hutao/request/abyssReq.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/**
* @file plugins/Hutao/request/abyssReq.ts
* @description 深渊相关请求
* @since Beta v0.6.2
* @since Beta v0.6.3
*/
import TGHttp from "../../../utils/TGHttp.js";

const AbyssUrl = `https://homa.snapgenshin.com/Statistics/`;

/**
* @description 获取深渊概览数据
* @since Beta v0.6.2
* @since Beta v0.6.3
* @param {boolean} isLast 是否获取上期数据
* @return {Promise<TGApp.Plugins.Hutao.Abyss.OverviewData>}
*/
Expand All @@ -26,7 +26,7 @@ export async function getAbyssOverview(

/**
* @description 获取角色搭配数据
* @since Beta v0.6.2
* @since Beta v0.6.3
* @param {boolean} isLast 是否获取上期数据
* @return {Promise<TGApp.Plugins.Hutao.Abyss.AvatarCollocation[]>}
*/
Expand All @@ -43,7 +43,7 @@ export async function getAvatarCollect(

/**
* @description 获取角色持有率数据
* @since Beta v0.6.2
* @since Beta v0.6.3
* @param {boolean} isLast 是否获取上期数据
* @returns {Promise<TGApp.Plugins.Hutao.Abyss.AvatarHold[]>}
*/
Expand All @@ -60,7 +60,7 @@ export async function getAvatarHoldRate(

/**
* @description 获取角色上场率数据
* @since Beta v0.6.2
* @since Beta v0.6.3
* @param {boolean} isLast 是否获取上期数据
* @return {Promise<TGApp.Plugins.Hutao.Abyss.AvatarUp[]>}
*/
Expand All @@ -77,7 +77,7 @@ export async function getAvatarUpRate(

/**
* @description 获取角色使用率
* @since Beta v0.6.2
* @since Beta v0.6.3
* @param {boolean} isLast 是否获取上期数据
* @return {Promise<TGApp.Plugins.Hutao.Abyss.AvatarUse[]>}
*/
Expand All @@ -94,7 +94,7 @@ export async function getAvatarUseRate(

/**
* @description 获取队伍搭配数据
* @since Beta v0.6.2
* @since Beta v0.6.3
* @param {boolean} isLast 是否获取上期数据
* @return {Promise<TGApp.Plugins.Hutao.Abyss.TeamCombination[]>}
*/
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/Hutao/request/combatReq.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/**
* @file plugins/Hutao/request/combatReq.ts
* @description 幻想真境剧诗相关请求
* @since Beta v0.6.2
* @since Beta v0.6.3
*/
import TGHttp from "../../../utils/TGHttp.js";

const CombatUrl = "https://homa.snapgenshin.com/RoleCombat/";

/**
* @description 获取数据
* @since Beta v0.6.2
* @since Beta v0.6.3
* @param {boolean} isLast
* @return {Promise<TGApp.Plugins.Hutao.Combat.Data>}
*/
Expand All @@ -26,7 +26,7 @@ export async function getCombatStatistic(

/**
* @description 上传数据
* @since Beta v0.6.2
* @since Beta v0.6.3
* @param {TGApp.Plugins.Hutao.Combat.UploadData} data
* @returns {Promise<TGApp.Plugins.Hutao.Combat.UploadResponse>}
*/
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/Hutao/types/Combat.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* @file plugins/Hutao/types/Combat.d.ts
* @description 幻想真境剧诗
* @since Beta v0.6.2
* @since Beta v0.6.3
*/

declare namespace TGApp.Plugins.Hutao.Combat {
/**
* @description 上传返回
* @since Beta v0.6.2
* @since Beta v0.6.3
* @interface UploadResponse
* @extends TGApp.Plugins.Hutao.Base.Response
* @return UploadResponse
Expand All @@ -16,7 +16,7 @@ declare namespace TGApp.Plugins.Hutao.Combat {

/**
* @description 上传数据
* @since Beta v0.6.2
* @since Beta v0.6.3
* @interface UploadData
* @property {number} Version
* @property {string} Uid
Expand All @@ -35,7 +35,7 @@ declare namespace TGApp.Plugins.Hutao.Combat {

/**
* @description 数据获取返回
* @since Beta v0.6.2
* @since Beta v0.6.3
* @interface Response
* @extends TGApp.Plugins.Hutao.Base.Response
* @property {Data} data
Expand All @@ -47,7 +47,7 @@ declare namespace TGApp.Plugins.Hutao.Combat {

/**
* @description 数据
* @since Beta v0.6.2
* @since Beta v0.6.3
* @interface Data
* @property {number} RecordTotal 总数
* @property {Array<TGApp.Plugins.Hutao.Base.Rate>} BackupAvatarRates 使用率
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/Hutao/utils/abyssUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* @description 将本地数据转为上传用的数据
* @since Beta v0.6.2
* @since Beta v0.6.3
* @param {TGApp.Sqlite.Abyss.SingleTable} data 本地数据
* @returns {TGApp.Plugins.Hutao.Abyss.RecordUpload} 上传用的数据
*/
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/Hutao/utils/combatUtil.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* @file plugins/Hutao/utils/combatUtil.ts
* @description 将本地数据转为上传用的数据
* @since Beta v0.6.2
* @since Beta v0.6.3
*/

/**
* @description 将本地数据转为上传用的数据
* @since Beta v0.6.2
* @since Beta v0.6.3
* @param {number[]} avatars 角色
* @param {number} schedule 期数
* @param {number} uid UID
Expand Down
36 changes: 18 additions & 18 deletions src/types/Game/Combat.d.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/**
* @file types/Game/Combat.d.ts
* @description 幻想真境剧诗类型定义
* @since Beta v0.6.2
* @since Beta v0.6.3
*/

/**
* @description 幻想真境剧诗相关类型
* @since Beta v0.6.2
* @since Beta v0.6.3
* @namespace TGApp.Game.Combat
* @memberOf TGApp.Game
*/
declare namespace TGApp.Game.Combat {
/**
* @description 幻想真境剧诗数据返回类型
* @interface Response
* @since Beta v0.6.2
* @since Beta v0.6.3
* @extends TGApp.BBS.Response.BaseWithData
* @property {FullData} data
* @return Response
Expand All @@ -26,7 +26,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description 返回完整数据类型
* @interface FullData
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {boolean} is_unlock 是否解锁
* @property {Record<string,string>} links 相关链接
* @property {Array<Combat>} data 挑战数据
Expand All @@ -41,7 +41,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description 角色数据
* @interface Avatar
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {number} avatar_id 角色id
* @property {number} avatar_type 角色武器类型 // todo
* @property {string} name 角色名称
Expand All @@ -64,7 +64,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description 简要角色
* @interface AvatarMini
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {number} avatar_id 角色id
* @property {number} avatar_icon 角色图标
* @property {string} value 值
Expand All @@ -81,7 +81,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description Buff
* @interface Buff
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {string} name 名称
* @property {string} icon 图标
* @property {number} level 等级
Expand All @@ -98,7 +98,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description Buff助益
* @interface BuffEffect
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {string} icon 图标
* @property {string} name 名称
* @property {string} desc 描述
Expand All @@ -113,7 +113,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description 卡片
* @interface Card
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {string} icon 图标
* @property {string} name 名称
* @property {string} desc 描述 // todo 带 <color>
Expand All @@ -132,7 +132,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description 时间
* @interface DateTime
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {number} year 年份
* @property {number} month 月份
* @property {number} day 日期
Expand All @@ -153,7 +153,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description 状态
* @interface Stat
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {number} difficulty_id 难度等级
* @property {number} max_round_id 最多层数
* @property {number} heraldry 纹章数
Expand All @@ -178,7 +178,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description 敌人
* @interface Enemy
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {string} name 名称
* @property {string} icon 图标
* @property {number} level 等级
Expand All @@ -193,7 +193,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description 单期挑战数据
* @interface Combat
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {Detail} detail 挑战详情
* @property {Stat} stat 挑战状态
* @property {Schedule} schedule 挑战期数
Expand All @@ -212,7 +212,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description 挑战详情
* @interface Detail
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {Array<RoundData>} rounds_data 轮次数据
* @property {Stat} detail_stat 详细状态
* @property {string} lineup_link 未知链接
Expand All @@ -230,7 +230,7 @@ declare namespace TGApp.Game.Combat {

/**
* @description 轮次数据
* @since Beta v0.6.2
* @since Beta v0.6.3
* @interface RoundData
* @property {Array<Avatar>} avatars 角色
* @property {Array<Card>} choice_cards 选中卡片
Expand Down Expand Up @@ -258,7 +258,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description 总体buff
* @interface SplendourBuff
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {object} summary 概况
* @property {number} summary.total_level 总等级
* @property {string} summary.desc 描述
Expand All @@ -276,7 +276,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description 战斗数据
* @interface FightStatisic
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {AvatarMini} max_defeat_avatar 击败最多敌人
* @property {AvatarMini} max_damage_avatar 最高伤害输出
* @property {AvatarMini} max_take_damage_avatar 最高承受伤害
Expand All @@ -299,7 +299,7 @@ declare namespace TGApp.Game.Combat {
/**
* @description 期数
* @interface Schedule
* @since Beta v0.6.2
* @since Beta v0.6.3
* @property {string} start_time 开始时间(秒级时间戳)
* @property {string} end_time 结束时间(秒级时间戳)
* @property {number} schedule_type 类型 // 1-本期。2-上期
Expand Down
4 changes: 2 additions & 2 deletions src/web/request/getRoleCombat.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @file web/request/getRoleCombat.ts
* @description 真境剧诗
* @since Beta v0.6.2
* @since Beta v0.6.3
*/

import TGHttp from "../../utils/TGHttp.js";
Expand All @@ -10,7 +10,7 @@ import TGUtils from "../utils/TGUtils.js";

/**
* @description 获取剧诗信息
* @since Beta v.0.6.2
* @since Beta v.0.6.3
* @param {TGApp.App.Account.Cookie} cookie
* @param {TGApp.Sqlite.Account.Game} account
* @returns {Promise<TGApp.Game.Combat.Combat[]|TGApp.BBS.Response.Base|false>}
Expand Down
4 changes: 2 additions & 2 deletions src/web/utils/tools.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @file web/utils/tools.ts
* @description 应用用到的工具函数
* @since Beta v0.6.2
* @since Beta v0.6.3
*/

import TGConstant from "../constant/TGConstant.js";
Expand Down Expand Up @@ -42,7 +42,7 @@ export function transCookie(cookie: Record<string, string>): string {

/**
* @description ds 算法需要数据转换后的字符串是按照字典序排序的
* @since Beta v0.6.2
* @since Beta v0.6.3
* @param {Record<string, string|number>} obj object
* @returns {string} query string
*/
Expand Down

0 comments on commit d35b94f

Please sign in to comment.