🏷️ fix(type): 一些 Type 改动

This commit is contained in:
BTMuli
2023-04-08 14:31:05 +08:00
parent 80212f2592
commit 628366a876
23 changed files with 117 additions and 533 deletions

View File

@@ -2,11 +2,10 @@
* @file plugins Mys interface calendar.ts
* @description Mys 插件日历接口
* @author BTMuli<bt-muli@outlook.com>
* @since Alpha v0.1.1
* @since Alpha v0.1.2
*/
import { type MysResponse } from "./base";
import { type Map } from "../../../interface/Base";
/**
* @description 日历返回数据
@@ -84,7 +83,7 @@ export interface CalendarContent {
/**
* @description 渲染用的日历数据
* @since Alpha v0.1.1
* @since Alpha v0.1.2
* @interface CalendarCard
* @property {number} id 角色/武器 ID
* @property {number} type 角色/武器,角色为 2武器为 1
@@ -92,7 +91,7 @@ export interface CalendarContent {
* @property {string} cover 角色/武器 封面
* @property {string} url 跳转链接,一般为 content_id
* @property {string[]} drop_day 掉落日
* @property {Map<number>} sort_day 排序
* @property {Record<number, number>} sort_day 排序
* @property {CalendarContent[]} contentInfos 材料内容
* @returns {CalendarCard}
*/
@@ -103,6 +102,6 @@ export interface CalendarCard {
cover: string
url: string
drop_day: string[]
sort_day: Map<number>
sort_day: Record<number, number>
contentInfos: CalendarContent[]
}

View File

@@ -7,7 +7,6 @@
import { getPostData } from "../request/post";
import { type GachaCard, type GachaData } from "../interface/gacha";
import { type Map } from "../../../interface/Base";
/**
* @description 根据卡池信息转为渲染用的卡池信息
@@ -18,7 +17,7 @@ import { type Map } from "../../../interface/Base";
*/
export async function getGachaCard (
gachaData: GachaData[],
poolCover: Map<string> | undefined = undefined,
poolCover: Record<number, string> | undefined = undefined,
): Promise<GachaCard[]> {
const gachaCard: GachaCard[] = [];
await Promise.allSettled(