diff --git a/src/hooks/useDeleteFile/index.d.ts b/src/hooks/useDeleteFile/index.d.ts index 92d6eb1..86e77fb 100644 --- a/src/hooks/useDeleteFile/index.d.ts +++ b/src/hooks/useDeleteFile/index.d.ts @@ -13,7 +13,7 @@ export interface DeleteFileOptions { single?: boolean; } -export type DeleteFileFunction = (options: DeleteFileOptions) => Promise; +export type DeleteFileFunction = (options: DeleteFileOptions) => Promise; /** * 删除文件 diff --git a/src/hooks/useDownloadBlob/index.d.ts b/src/hooks/useDownloadBlob/index.d.ts index 41e1259..b2472af 100644 --- a/src/hooks/useDownloadBlob/index.d.ts +++ b/src/hooks/useDownloadBlob/index.d.ts @@ -7,7 +7,7 @@ interface UseDownloadBlobOptions { params?: Record; } -export type DownloadBlobFunction = (url: string, options?: UseDownloadBlobOptions) => Promise; +export type DownloadBlobFunction = (url: string, options?: UseDownloadBlobOptions) => Promise<{ data: Blob }>; /** * 下载Blob流文件 diff --git a/src/utils/index.d.ts b/src/utils/index.d.ts index 42a0d2f..4f6776d 100644 --- a/src/utils/index.d.ts +++ b/src/utils/index.d.ts @@ -81,7 +81,7 @@ export function image2Base642(file: File): Promise; /** * 判断图片是否可访问成功 */ -export function checkImgExists(imgUrl: string): Promise; +export function checkImgExists(imgUrl: string): Promise; /** * 获取数据类型 @@ -135,7 +135,7 @@ export function getUrlParam(key: string): string; */ export function paging(options: { /** 分页的数组 */ - list: any[]; + list: Record[]; /** 当前页 */ currentPage: number | string; /** 每页条数 */ @@ -184,7 +184,7 @@ export function getLabelName(options: { /** 状态 */ status: number | string; /** 翻译的数组 */ - list: any[]; + list: Record[]; /** id字段名 */ idKey?: string; /** name字段名 */ @@ -206,7 +206,7 @@ export function idCardGetDateAndGender(idCard: string): { sex: "1" | "0"; date: */ export function getMatchedItems(options: { /** 获取的数组 */ - list: any[]; + list: Record[]; /** 获取的值 */ value: (number | string)[]; /** 获取的id字段名 */ @@ -218,7 +218,7 @@ export function getMatchedItems(options: { */ export function getUnmatchedItems(options: { /** 获取的数组 */ - list: any[]; + list: Record[]; /** 获取的值 */ value: (number | string)[]; /** 获取的id字段名 */ @@ -230,7 +230,7 @@ export function getUnmatchedItems(options: { */ export function listTransTree(options: { /** 需要转换的json */ - json: any[]; + json: Record[]; /** id字段 */ idKey: string; /** 父级id字段 */ @@ -289,7 +289,7 @@ export function base642File(base64: string, filename?: string): File; export function getTreeNodePaths = Record>( options: { /** 树形数据 */ - data: any[]; + data: Record[]; /** 目标节点ID */ targetId: string | number; /** id字段名 */ @@ -297,7 +297,7 @@ export function getTreeNodePaths = Record[]; /** 是否包含自身 */ isIncludeOneself?: boolean; }, @@ -309,7 +309,7 @@ export function getTreeNodePaths = Record[]; /** 层级限制 */ level?: number; /** 子节点字段名 */ @@ -330,7 +330,7 @@ export function processTreeDataByLevel( export function processTreeDataForOnlyLastLevel( options: { /** 树形数据 */ - data: any[]; + data: Record[]; /** 子节点字段名 */ childrenKey: string; /** 是否只允许选择最后一级 */ @@ -347,21 +347,21 @@ export function processTreeDataForOnlyLastLevel( * 验证结束时间是否大于开始时间 */ export function validatorEndTime(options: { startTime: string; message?: string; type?: "date" | "datetime" }): { - validator: (_: any, value: any) => Promise; + validator: (_: any, value: any) => Promise | void; }; /** * 验证时间是否大于当前时间 */ export function validatorTimeGTCurrentDay(options?: { message?: string; type?: "date" | "datetime" }): { - validator: (_: any, value: any) => Promise; + validator: (_: any, value: any) => Promise | void; }; /** * 验证时间是否大于等于当前时间 */ export function validatorTimeGECurrentDay(options?: { message?: string; type?: "date" | "datetime" }): { - validator: (_: any, value: any) => Promise; + validator: (_: any, value: any) => Promise | void; }; /**