收紧后端 TypeScript:统一 Json 类型与 TaskContext 契约
关闭 allowJs;集中 JsonObject 定义并替换分散 any 别名;parseTaskContext 返回 TaskContext;任务详情 API 标注 AdminTaskDetailView;测试减少 as any。
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { logWarn } from '../../utils/logger.js'
|
||||
import type { JsonObject } from '../../types/json.js'
|
||||
import {
|
||||
getNotificationConfig,
|
||||
listEnabledBarkRecipients,
|
||||
@@ -7,7 +8,6 @@ import {
|
||||
import { sendBarkNotification } from './bark-service.js'
|
||||
import { sendWpushNotification } from './wpush-service.js'
|
||||
|
||||
type JsonObject = Record<string, any>
|
||||
type NotificationResult = ReturnType<typeof mapNotificationResult>
|
||||
type NotificationInput = {
|
||||
title?: string
|
||||
|
||||
Reference in New Issue
Block a user