From 5d46d072ec2946be96989ef42e0dc906bdb6a227 Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <996881204@qq.com> Date: Mon, 18 Nov 2024 01:25:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=8F=AF=E9=80=89=E5=AD=97=E6=AE=B5=E7=9A=84=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/interfaces/schema.ts | 6 +++--- src/push/dingtalk.ts | 2 +- src/push/discord.ts | 2 +- src/push/i-got.ts | 2 +- src/push/telegram.ts | 2 +- src/push/wechat-app.ts | 2 +- src/push/wechat-robot.ts | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/interfaces/schema.ts b/src/interfaces/schema.ts index bb9c680..ccf61fd 100644 --- a/src/interfaces/schema.ts +++ b/src/interfaces/schema.ts @@ -48,16 +48,16 @@ export type ConfigSchema = { // 字段描述 description?: string // 字段是否必填 - required: IsRequired> + required: boolean // IsRequired> // 字段默认值 default?: T[K] // 字段选项,仅当字段类型为 select 时有效 - options?: IsUnion extends true ? { + options?: { // 选项名称 label: string // 选项值 value: T[K] // 选项值的类型跟字段的类型一致 - }[] : never + }[] } } diff --git a/src/push/dingtalk.ts b/src/push/dingtalk.ts index 874733c..6b82539 100644 --- a/src/push/dingtalk.ts +++ b/src/push/dingtalk.ts @@ -64,7 +64,7 @@ type TempDingtalkOption = { feedCard?: FeedCard['feedCard'] at?: Text['at'] - // [key: string]: any + [key: string]: any } export type DingtalkOptionSchema = OptionSchema diff --git a/src/push/discord.ts b/src/push/discord.ts index 513f3c3..a013927 100644 --- a/src/push/discord.ts +++ b/src/push/discord.ts @@ -49,7 +49,7 @@ export type DiscordOption = { * 机器人头像的 Url */ avatar_url?: string - // [key: string]: any + [key: string]: any } export type DiscordOptionSchema = OptionSchema diff --git a/src/push/i-got.ts b/src/push/i-got.ts index f38bd30..bd3bea0 100644 --- a/src/push/i-got.ts +++ b/src/push/i-got.ts @@ -47,7 +47,7 @@ export interface IGotOption { * 主题; 订阅链接下有效;对推送内容分类,用户可选择性订阅 */ topic?: string - // [key: string]: any + [key: string]: any } export type IGotOptionSchema = OptionSchema diff --git a/src/push/telegram.ts b/src/push/telegram.ts index a0a23e2..bef7a07 100644 --- a/src/push/telegram.ts +++ b/src/push/telegram.ts @@ -74,7 +74,7 @@ export interface TelegramOption { * 可选的唯一标识符,用以向该标识符对应的话题发送消息,仅限启用了话题功能的超级群组可用 */ message_thread_id?: string - // [key: string]: any + [key: string]: any } export type TelegramOptionSchema = OptionSchema diff --git a/src/push/wechat-app.ts b/src/push/wechat-app.ts index c1b2b58..31fbf8f 100644 --- a/src/push/wechat-app.ts +++ b/src/push/wechat-app.ts @@ -60,7 +60,7 @@ export type WechatAppOption = { enable_duplicate_check?: 0 | 1 // 表示是否重复消息检查的时间间隔,默认1800s,最大不超过4小时 duplicate_check_interval?: number - // [key: string]: any + [key: string]: any // 指定接收消息的成员,成员ID列表(多个接收者用‘|’分隔,最多支持1000个)。 // 特殊情况:指定为"@all",则向该企业应用的全部成员发送 touser?: string diff --git a/src/push/wechat-robot.ts b/src/push/wechat-robot.ts index 9dbc6e5..f8bb9cb 100644 --- a/src/push/wechat-robot.ts +++ b/src/push/wechat-robot.ts @@ -25,7 +25,7 @@ export const wechatRobotConfigSchema: WechatRobotConfigSchema = { export interface WechatRobotOption { msgtype?: WechatRobotMsgType - // [key: string]: any + [key: string]: any } export type WechatRobotOptionSchema = OptionSchema export const wechatRobotOptionSchema: WechatRobotOptionSchema = {