zy-react-library/hooks/useDownloadFile/index.d.ts

15 lines
462 B
TypeScript
Raw Normal View History

2025-10-31 14:26:46 +08:00
export interface DownloadFileOptions {
/** 下载文件的URL */
url: string;
/** 下载文件的自定义文件名 */
name?: string;
}
export type DownloadFileFunction = (options: DownloadFileOptions) => void;
2025-10-22 14:43:42 +08:00
/**
*
*/
2025-10-31 14:26:46 +08:00
export default function useDownloadFile(returnType: "array"): [boolean, DownloadFileFunction];
export default function useDownloadFile(returnType?: "object"): { loading: boolean; downloadFile: DownloadFileFunction };