zy-react-library/todo/hooks/useDeleteFile/index.d.ts

23 lines
595 B
TypeScript
Raw Normal View History

2025-10-28 11:28:18 +08:00
export interface DeleteFileItem {
/** 文件URL */
filePath?: string;
2025-10-28 11:28:18 +08:00
/** 文件ID */
id?: string;
2025-10-28 11:28:18 +08:00
[key: string]: any;
}
export interface DeleteFileOptions {
/** 要删除的文件列表 */
files: DeleteFileItem[];
/** 是否单文件删除 */
single?: boolean;
2025-10-28 11:28:18 +08:00
}
export type DeleteFileFunction = (options: DeleteFileOptions) => Promise<any>;
/**
*
*/
export default function useDeleteFile(returnType: "array"): [boolean, DeleteFileFunction];
export default function useDeleteFile(returnType?: "object"): { loading: boolean; deleteFile: DeleteFileFunction };