mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-04-22 21:59:49 +08:00
👽️ 完善类型,改用常量枚举,适配typescript 6
This commit is contained in:
57
src/types/BBS/Post.d.ts
vendored
57
src/types/BBS/Post.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 帖子类型定义文件
|
||||
* @since Beta v0.9.8
|
||||
* @since Beta v0.9.9
|
||||
*/
|
||||
|
||||
declare namespace TGApp.BBS.Post {
|
||||
@@ -63,6 +63,61 @@ declare namespace TGApp.BBS.Post {
|
||||
*/
|
||||
type NewsTypeEnum = (typeof NewsType)[keyof typeof NewsType];
|
||||
|
||||
/**
|
||||
* 话题排序类型
|
||||
* @since Beta v0.9.9
|
||||
*/
|
||||
const PostTopicSortType = <const>{
|
||||
/** 最新 */
|
||||
LATEST: 0,
|
||||
/** 精选 */
|
||||
FEATURED: 1,
|
||||
/** 热门 */
|
||||
HOT: 2,
|
||||
};
|
||||
|
||||
/**
|
||||
* 话题排序类型枚举
|
||||
* @since Beta v0.9.9
|
||||
*/
|
||||
type PostTopicSortTypeEnum = (typeof PostTopicSortType)[keyof typeof PostTopicSortType];
|
||||
|
||||
/**
|
||||
* 论坛排序类型
|
||||
* @since Beta v0.9.9
|
||||
*/
|
||||
const ForumSortType = <const>{
|
||||
/** 最新回复 */
|
||||
LATEST_REPLY: 1,
|
||||
/** 最新发布 */
|
||||
LATEST_POST: 2,
|
||||
/** 热门 */
|
||||
HOT: 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* 论坛排序类型枚举
|
||||
* @since Beta v0.9.9
|
||||
*/
|
||||
type ForumSortTypeEnum = (typeof ForumSortType)[keyof typeof ForumSortType];
|
||||
|
||||
/**
|
||||
* 搜索排序类型
|
||||
* @since Beta v0.9.9
|
||||
*/
|
||||
const SearchSortType = <const>{
|
||||
/** 最热 */
|
||||
HOT: 1,
|
||||
/** 最新 */
|
||||
LATEST: 2,
|
||||
};
|
||||
|
||||
/**
|
||||
* 搜索排序类型枚举
|
||||
* @since Beta v0.9.9
|
||||
*/
|
||||
type SearchSortTypeEnum = (typeof SearchSortType)[keyof typeof SearchSortType];
|
||||
|
||||
/**
|
||||
* 资讯返回响应
|
||||
* @since Beta v0.7.2
|
||||
|
||||
22
src/types/BBS/Reply.d.ts
vendored
22
src/types/BBS/Reply.d.ts
vendored
@@ -1,8 +1,28 @@
|
||||
/**
|
||||
* 回复数据类型定义文件
|
||||
* @since Beta v0.7.2
|
||||
* @since Beta v0.9.9
|
||||
*/
|
||||
|
||||
declare namespace TGApp.BBS.Reply {
|
||||
/**
|
||||
* 回复排序类型
|
||||
* @since Beta v0.9.9
|
||||
*/
|
||||
const ReplyOrderType = <const>{
|
||||
/* 热门 */
|
||||
HOT: 0,
|
||||
/* 最早 */
|
||||
OLDEST: 1,
|
||||
/* 最新 */
|
||||
LATEST: 2,
|
||||
};
|
||||
|
||||
/**
|
||||
* 回复排序类型枚举
|
||||
* @since Beta v0.9.9
|
||||
*/
|
||||
type ReplyOrderTypeEnum = (typeof ReplyOrderType)[keyof typeof ReplyOrderType];
|
||||
|
||||
/**
|
||||
* 帖子回复数据类型
|
||||
* @since Beta v0.7.1
|
||||
|
||||
Reference in New Issue
Block a user