@minto-ai/tools 1.0.39 → 1.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/array/chunk-array.d.ts +2 -3
  2. package/dist/browser/copy-text.d.ts +2 -3
  3. package/dist/browser/is-android.d.ts +3 -3
  4. package/dist/browser/is-ios.d.ts +1 -1
  5. package/dist/browser/is-mobile.d.ts +3 -4
  6. package/dist/browser/is-pc.d.ts +3 -3
  7. package/dist/core/be-parsed-as-number.d.ts +1 -1
  8. package/dist/core/can-be-parsed-as-number.d.ts +3 -3
  9. package/dist/core/check-array-empty.d.ts +3 -3
  10. package/dist/core/check-empty-not-zero.d.ts +3 -3
  11. package/dist/core/check-empty.d.ts +3 -4
  12. package/dist/core/check-object-empty.d.ts +2 -3
  13. package/dist/core/is-array.d.ts +3 -3
  14. package/dist/core/is-null-or-undefined.d.ts +3 -3
  15. package/dist/core/is-number.d.ts +3 -3
  16. package/dist/core/is-object.d.ts +4 -3
  17. package/dist/core/is-string.d.ts +3 -3
  18. package/dist/core/is-undefined.d.ts +3 -3
  19. package/dist/file/batch-download-file.d.ts +4 -3
  20. package/dist/file/extends/enum.d.ts +11 -1
  21. package/dist/file/get-file-icon.d.ts +3 -3
  22. package/dist/file/get-file-name.d.ts +3 -3
  23. package/dist/file/get-file-suffix-icon.d.ts +3 -3
  24. package/dist/file/get-file-suffix.d.ts +3 -3
  25. package/dist/file/get-file-title.d.ts +3 -3
  26. package/dist/file/index.d.ts +4 -3
  27. package/dist/file/is-compress-file-path.d.ts +8 -0
  28. package/dist/file/is-document-file-path.d.ts +3 -3
  29. package/dist/file/is-file-path.d.ts +3 -3
  30. package/dist/file/is-image-file-path.d.ts +3 -3
  31. package/dist/file/is-music-file-path.d.ts +3 -3
  32. package/dist/file/is-ppt-file-path.d.ts +3 -3
  33. package/dist/file/is-video-file-path.d.ts +3 -3
  34. package/dist/file/single-download-file.d.ts +4 -3
  35. package/dist/file/types/index.d.ts +3 -2
  36. package/dist/index.js +315 -328
  37. package/dist/string/object-to-query-string.d.ts +1 -3
  38. package/dist/supply/get-uuid.d.ts +1 -3
  39. package/dist/supply/time-delay.d.ts +3 -3
  40. package/package.json +1 -1
@@ -1,12 +1,11 @@
1
1
  /**
2
- * 将一个数组分割成多个指定大小的块。
3
- * 这个函数接受一个数组和一个指定的块大小,然后返回一个二维数组。
2
+ * 将一个数组分割成多个指定大小的块。这个函数接受一个数组和一个指定的块大小,然后返回一个二维数组。
4
3
  * 每个子数组包含原数组中的一部分元素,大小由 `chunkSize` 参数决定。
5
4
  * 如果数组的长度不是 `chunkSize` 的整数倍,最后一个块可能包含的元素少于 `chunkSize`。
6
5
  *
7
6
  * @param array 要分割的源数组。
8
7
  * @param chunkSize 每个块的大小。必须为正整数。默认值为 1。
9
- * @returns 返回一个二维数组,每个子数组包含原数组的一部分元素。
8
+ * @returns 返回一个二维数组,每个子数组是原数组的一部分元素。
10
9
  */
11
10
  declare function chunkArray<T>(array: T[], chunkSize?: number): T[][];
12
11
  export default chunkArray;
@@ -1,8 +1,7 @@
1
1
  /**
2
- * 复制文本到剪贴板的函数。
3
- * 如果复制成功,返回一个包含被复制文本的 Promise;如果失败,返回一个包含错误信息的 Promise。
2
+ * 复制文本到剪贴板。
4
3
  *
5
- * @param text 需要复制的文本内容。
4
+ * @param text 需要复制到剪贴板的文本。
6
5
  * @returns 返回一个 Promise 对象。成功时返回被复制的文本,失败时返回错误信息。
7
6
  */
8
7
  declare function copyText(text: string): Promise<string>;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 判断当前设备是否为 Android 设备
3
- * 通过检测用户代理字符串中是否包含 "android" 关键字来判断。
2
+ * 判断当前环境是否为 Android 设备。
3
+ * 主要检测设备类型为 Android。
4
4
  *
5
- * @returns 如果是 Android 设备,返回 true;否则返回 false。
5
+ * @returns 如果是Android设备,返回true;否则返回false。
6
6
  */
7
7
  declare function isAndroid(): boolean;
8
8
  export default isAndroid;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 判断当前设备是否为iOS设备
2
+ * 判断当前环境是否为 iOS 设备。
3
3
  * 主要检测的设备类型包括 iPhone、iPad 和 iPod。
4
4
  *
5
5
  * @returns 如果是iOS设备,返回true;否则返回false。
@@ -1,9 +1,8 @@
1
1
  /**
2
- * 判断当前设备是否为移动设备(手机或平板)。
3
- * 通过检测设备是否为 Android 或 iOS 设备来判断是否为移动设备。
4
- * 如果设备是 Android 或 iOS 设备,则认为是移动设备。
2
+ * 判断当前环境是否为移动设备。
3
+ * 主要检测设备类型为移动设备。
5
4
  *
6
- * @returns 如果是移动设备,返回 true;否则返回 false。
5
+ * @returns 如果是移动设备,返回true;否则返回false。
7
6
  */
8
7
  declare function isMobile(): boolean;
9
8
  export default isMobile;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 判断当前设备是否为桌面设备(PC)。
3
- * 如果当前设备不是移动设备(手机或平板),则认为是桌面设备。
2
+ * 判断当前环境是否为PC设备。
3
+ * 主要检测设备类型为PC设备。
4
4
  *
5
- * @returns 如果是桌面设备,返回 true;否则返回 false。
5
+ * @returns 如果是PC设备,返回true;否则返回false。
6
6
  */
7
7
  declare function isPc(): boolean;
8
8
  export default isPc;
@@ -2,7 +2,7 @@
2
2
  * 将输入值转换为数字类型。
3
3
  *
4
4
  * @param value 输入值。
5
- * @returns 转换后的数字值,如果无法解析则返回 `NaN`。
5
+ * @returns 输入值转换后的数字值,如果无法解析则返回 `NaN`。
6
6
  */
7
7
  declare function beParsedAsNumber(value: number | string): number;
8
8
  export default beParsedAsNumber;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 检查一个值是否可以被解析为有效的数字。
2
+ * 检查输入值是否可以被解析为有效的数字。
3
3
  *
4
- * @param value 需要检查的值
5
- * @returns 如果值可以被解析为数字,则返回 true;否则返回 false
4
+ * @param value 输入值。
5
+ * @returns 如果输入值可以被解析为一个有效的数字,则返回 `true`,否则返回 `false`。
6
6
  */
7
7
  declare function canBeParsedAsNumber(value: unknown): boolean;
8
8
  export default canBeParsedAsNumber;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 检查数组是否为空
2
+ * 检查输入值是否是空数组。
3
3
  *
4
- * @param value 要检查的值。
5
- * @returns 如果 value 是一个数组并且长度为0返回 true,否则返回false
4
+ * @param value 输入值。
5
+ * @returns 如果输入值是一个空数组,则返回 `true`;否则返回 `false`。
6
6
  */
7
7
  declare function checkArrayEmpty(value: unknown): value is Array<unknown>;
8
8
  export default checkArrayEmpty;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 检查给定的值是否为空,但不包括数字 0。空值包括:空字符串、空数组、空对象、nullundefined。
2
+ * 检查输入值是否为空(''、nullundefined、[]、{}),但是不能为0
3
3
  *
4
- * @param value 要检查的值。
5
- * @returns 如果值是空的,且不是数字 0,则返回 true,否则返回 false
4
+ * @param value 输入值。
5
+ * @returns 如果输入值是空(''、null、undefined、[]、{}),但不包括0,则返回 `true`;否则返回 `false`。
6
6
  */
7
7
  declare function checkEmptyNotZero(value: unknown): value is null | undefined | '' | [] | Record<string, never>;
8
8
  export default checkEmptyNotZero;
@@ -1,9 +1,8 @@
1
1
  /**
2
- * 检查给定的值是否为空。
3
- * 空值包括:空字符串、空数组、空对象、null 或 undefined。
2
+ * 检查输入值是否为空(''、0、null、undefined、[]、{})。
4
3
  *
5
- * @param value 要检查的值。
6
- * @returns 如果值是空的,则返回 true,否则返回 false。
4
+ * @param value 输入值。
5
+ * @returns 如果输入值是空的,则返回 true,否则返回 false。
7
6
  */
8
7
  declare function checkEmpty(value: unknown): value is null | undefined | '' | [] | Record<string, never> | 0;
9
8
  export default checkEmpty;
@@ -1,8 +1,7 @@
1
1
  /**
2
- * 检查对象是否为空。
3
- * 一个空对象是指没有任何自身属性的对象。
2
+ * 检查输入值是否是空对象
4
3
  *
5
- * @param value 要检查的值。
4
+ * @param value 输入值。
6
5
  * @returns 如果值是一个空对象,则返回 true,否则返回 false。
7
6
  */
8
7
  declare function checkObjectEmpty(value: unknown): value is Record<string, never>;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 判断给定的值是否是一个数组。
2
+ * 判断输入值是否是一个数组。
3
3
  *
4
- * @param value 要检查的值。
5
- * @returns 如果 value 是一个数组,则返回 true,否则返回 false。
4
+ * @param value 输入值。
5
+ * @returns 如果输入值是一个数组,则返回 true,否则返回 false。
6
6
  */
7
7
  declare function isArray(value: unknown): value is Array<unknown>;
8
8
  export default isArray;
@@ -1,7 +1,7 @@
1
1
  /**
2
- * 检查一个值是否为 null 或 undefined。
3
- * @param value - 要检查的值。
4
- * @returns 如果值为 null 或 undefined,则返回 true;否则返回 false。
2
+ * 检查输入值是否为 null 或 undefined。
3
+ * @param value 输入值。
4
+ * @returns 如果输入值为 null 或 undefined,则返回 true;否则返回 false。
5
5
  */
6
6
  declare function isNullOrUndefined(value: unknown): value is null | undefined;
7
7
  export default isNullOrUndefined;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 判断给定的值是否是一个数字。
2
+ * 判断输入值是否是一个数字。
3
3
  *
4
- * @param value 要检查的值。
5
- * @returns 如果 value 是一个数字,则返回 true,否则返回 false。
4
+ * @param value 输入值。
5
+ * @returns 如果输入值是一个数字,则返回 true,否则返回 false。
6
6
  */
7
7
  declare function isNumber(value: unknown): value is number;
8
8
  export default isNumber;
@@ -1,8 +1,9 @@
1
1
  /**
2
- * 判断给定的值是否是一个对象。但对象的值包含 null 的情况,返回 false。
2
+ * 判断输入值是否是一个对象。
3
+ * 注意:此函数不将 null 视为对象,因此如果输入值是 null,将返回 false。
3
4
  *
4
- * @param value 要检查的值。
5
- * @returns 如果 value 是一个普通对象,则返回 true,否则返回 false。
5
+ * @param value 输入值。
6
+ * @returns 如果输入值是一个普通对象并且不等于 null ,则返回 true;否则返回 false。
6
7
  */
7
8
  declare function isObject(value: unknown): value is Record<PropertyKey, unknown>;
8
9
  export default isObject;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 判断给定的值是否是一个字符串。
2
+ * 判断输入值是否是一个字符串。
3
3
  *
4
- * @param value 要检查的值。
5
- * @returns 如果 value 是一个字符串,则返回 true,否则返回 false。
4
+ * @param value 输入值。
5
+ * @returns 如果输入值是一个字符串,则返回 true,否则返回 false。
6
6
  */
7
7
  declare function isString(value: unknown): value is string;
8
8
  export default isString;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 检查一个值是否为 undefined。
2
+ * 检查输入值是否为 undefined。
3
3
  *
4
- * @param value 需要检查的值。
5
- * @returns 如果值为 undefined,则返回 true;否则返回 false。
4
+ * @param value 输入值。
5
+ * @returns 如果输入值为 undefined,则返回 true;否则返回 false。
6
6
  */
7
7
  declare function isUndefined(value: unknown): value is undefined;
8
8
  export default isUndefined;
@@ -1,8 +1,9 @@
1
1
  /**
2
- * 批量下载文件并打包为 ZIP
2
+ * 批量下载文件并打包为 ZIP。该函数接受一个文件列表,每个文件包含文件路径和可选的文件名,最终将所有文件打包为一个 ZIP 文件并触发下载。
3
3
  *
4
- * @param fileList 文件列表,包含文件路径和文件名
5
- * @param zipName 打包后的 ZIP 文件名
4
+ * @param fileList 文件列表,每个文件包含文件路径和可选的文件名。如果未提供文件名,将自动从文件路径中提取。
5
+ * @param zipName 打包后的 ZIP 文件名。如果文件名不以 `.zip` 结尾,将自动添加 `.zip` 后缀。
6
+ * @returns 返回一个 Promise,在文件打包和下载完成后。
6
7
  */
7
8
  declare function batchDownloadFile(fileList: Array<{
8
9
  filePath: string;
@@ -22,6 +22,8 @@ declare const FileSuffixEnum: {
22
22
  readonly WAV: "wav";
23
23
  readonly TXT: "txt";
24
24
  readonly HTML: "html";
25
+ readonly ZIP: "zip";
26
+ readonly RAR: "rar";
25
27
  };
26
28
  /**
27
29
  * 图片后缀类型枚举
@@ -65,5 +67,13 @@ declare const DocumentFileSuffixEnum: {
65
67
  */
66
68
  declare const MusicFileSuffixEnum: {
67
69
  readonly MP3: "mp3";
70
+ readonly WAV: "wav";
71
+ };
72
+ /**
73
+ * 压缩文件后缀类型枚举
74
+ */
75
+ declare const CompressFileSuffixEnum: {
76
+ readonly ZIP: "zip";
77
+ readonly RAR: "rar";
68
78
  };
69
- export { DocumentFileSuffixEnum, FileSuffixEnum, ImageFileSuffixEnum, MusicFileSuffixEnum, PptFileSuffixEnum, VideoFileSuffixEnum, };
79
+ export { CompressFileSuffixEnum, DocumentFileSuffixEnum, FileSuffixEnum, ImageFileSuffixEnum, MusicFileSuffixEnum, PptFileSuffixEnum, VideoFileSuffixEnum, };
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 根据文件路径获取对应的图标
2
+ * 根据文件后缀获取对应的图标。
3
3
  *
4
- * @param filePath 文件路径
5
- * @returns 图标路径
4
+ * @param filePath 文件路径。
5
+ * @returns 对应文件类型的图标。
6
6
  */
7
7
  declare function getFileIcon(filePath: string): string;
8
8
  export default getFileIcon;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 获取完整的文件名(包含后缀)
2
+ * 从文件路径中提取完整的文件名(包含后缀)。
3
3
  *
4
- * @param filePath 文件路径
5
- * @returns 完整的文件名
4
+ * @param filePath 文件路径。
5
+ * @returns 文件名(包含后缀)。
6
6
  */
7
7
  declare function getFileName(filePath: string): string;
8
8
  export default getFileName;
@@ -1,9 +1,9 @@
1
1
  import { FileSuffix } from './types';
2
2
  /**
3
- * 根据文件后缀获取对应的图标
3
+ * 根据文件后缀获取对应的图标。
4
4
  *
5
- * @param fileSuffix 文件后缀(需为 FileSuffixEnum 中的有效值)
6
- * @returns 对应的图标路径,若未匹配则返回默认图标
5
+ * @param fileSuffix 文件后缀。
6
+ * @returns 对应的图标路径,若未匹配则返回默认图标。
7
7
  */
8
8
  declare function getFileSuffixIcon(fileSuffix: FileSuffix): string;
9
9
  export default getFileSuffixIcon;
@@ -1,9 +1,9 @@
1
1
  import { FileSuffix } from './types';
2
2
  /**
3
- * 获取文件后缀
3
+ * 从文件路径中提取文件后缀。
4
4
  *
5
- * @param filePath 文件路径或文件名
6
- * @returns 文件后缀
5
+ * @param filePath 文件路径。
6
+ * @returns 文件后缀,以小写形式返回。如果文件没有后缀或路径无效,返回空字符串。
7
7
  */
8
8
  declare function getFileSuffix(filePath: string): FileSuffix;
9
9
  export default getFileSuffix;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 获取文件名(不包含后缀)
2
+ * 从文件路径中提取文件名(不包含后缀)。
3
3
  *
4
- * @param filePath 文件路径
5
- * @returns 文件名(不包含后缀)
4
+ * @param filePath 文件路径。
5
+ * @returns 文件名(不包含后缀)。
6
6
  */
7
7
  declare function getFileTitle(filePath: string): string;
8
8
  export default getFileTitle;
@@ -1,4 +1,4 @@
1
- import { DocumentFileSuffix, FileSuffix, ImageFileSuffix, MusicFileSuffix, PptFileSuffix, VideoFileSuffix } from './types';
1
+ import { CompressFileSuffix, DocumentFileSuffix, FileSuffix, ImageFileSuffix, MusicFileSuffix, PptFileSuffix, VideoFileSuffix } from './types';
2
2
  import { default as batchDownloadFile } from './batch-download-file';
3
3
  import { FileSuffixEnum, ImageFileSuffixEnum } from './extends/enum';
4
4
  import { default as getFileIcon } from './get-file-icon';
@@ -6,6 +6,7 @@ import { default as getFileName } from './get-file-name';
6
6
  import { default as getFileSuffix } from './get-file-suffix';
7
7
  import { default as getFileSuffixIcon } from './get-file-suffix-icon';
8
8
  import { default as getFileTitle } from './get-file-title';
9
+ import { default as isCompressFilePath } from './is-compress-file-path';
9
10
  import { default as isDocumentFilePath } from './is-document-file-path';
10
11
  import { default as isFilePath } from './is-file-path';
11
12
  import { default as isImageFilePath } from './is-image-file-path';
@@ -13,5 +14,5 @@ import { default as isMusicFilePath } from './is-music-file-path';
13
14
  import { default as isPptFilePath } from './is-ppt-file-path';
14
15
  import { default as isVideoFilePath } from './is-video-file-path';
15
16
  import { default as singleDownloadFile } from './single-download-file';
16
- export type { DocumentFileSuffix, FileSuffix, ImageFileSuffix, MusicFileSuffix, PptFileSuffix, VideoFileSuffix, };
17
- export { batchDownloadFile, FileSuffixEnum, getFileIcon, getFileName, getFileSuffix, getFileSuffixIcon, getFileTitle, ImageFileSuffixEnum, isDocumentFilePath, isFilePath, isImageFilePath, isMusicFilePath, isPptFilePath, isVideoFilePath, singleDownloadFile, };
17
+ export type { CompressFileSuffix, DocumentFileSuffix, FileSuffix, ImageFileSuffix, MusicFileSuffix, PptFileSuffix, VideoFileSuffix, };
18
+ export { batchDownloadFile, FileSuffixEnum, getFileIcon, getFileName, getFileSuffix, getFileSuffixIcon, getFileTitle, ImageFileSuffixEnum, isCompressFilePath, isDocumentFilePath, isFilePath, isImageFilePath, isMusicFilePath, isPptFilePath, isVideoFilePath, singleDownloadFile, };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 判断是否是有效的压缩文件路径(包含 rar、zip )。
3
+ *
4
+ * @param filePath 文件路径。
5
+ * @returns 是否是有效的压缩文件路径。
6
+ */
7
+ declare function isCompressFilePath(filePath: string): boolean;
8
+ export default isCompressFilePath;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 判断是否是有效的文档文件路径(包含doc、docx、pdf、txt、xls、xlsx
2
+ * 判断是否是有效的文档文件路径(包含doc、docx、pdf、txt、xls、xlsx)。
3
3
  *
4
- * @param filePath 文件路径
5
- * @returns 是否是有效的文档文件路径
4
+ * @param filePath 文件路径。
5
+ * @returns 是否是有效的文档文件路径。
6
6
  */
7
7
  declare function isDocumentFilePath(filePath: string): boolean;
8
8
  export default isDocumentFilePath;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 判断是否是有效的文件路径
2
+ * 判断是否是有效的文件路径(包含doc、docx、pdf、ppt、pptx、xls、xlsx、jpg、jpeg、png、webp、gif、mp4、avi、flv、mkv、mp3、mav、txt、html)。
3
3
  *
4
- * @param filePath 文件路径
5
- * @returns 是否是有效的文件路径
4
+ * @param filePath 文件路径。
5
+ * @returns 是否是有效的文件路径(空后缀文件不属于有效文件路径)。
6
6
  */
7
7
  declare function isFilePath(filePath: string): boolean;
8
8
  export default isFilePath;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 判断是否是有效的图片文件路径(包含jpg、jpeg、png、webp
2
+ * 判断是否是有效的图片文件路径(包含jpg、jpeg、png、webp、gif)。
3
3
  *
4
- * @param filePath 文件路径
5
- * @returns 是否是有效的图片文件路径
4
+ * @param filePath 文件路径。
5
+ * @returns 是否是有效的图片文件路径。
6
6
  */
7
7
  declare function isImageFilePath(filePath: string): boolean;
8
8
  export default isImageFilePath;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 判断是否是有效的音乐文件路径(包含mp3
2
+ * 判断是否是有效的音乐文件路径(包含mp3)。
3
3
  *
4
- * @param filePath 文件路径
5
- * @returns 是否是有效的音乐文件路径
4
+ * @param filePath 文件路径。
5
+ * @returns 是否是有效的音乐文件路径。
6
6
  */
7
7
  declare function isMusicFilePath(filePath: string): boolean;
8
8
  export default isMusicFilePath;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 判断是否是有效的ppt文件路径(包含ppt、pptx
2
+ * 判断是否是有效的ppt文件路径(包含ppt、pptx)。
3
3
  *
4
- * @param filePath 文件路径
5
- * @returns 是否是有效的ppt文件路径
4
+ * @param filePath 文件路径。
5
+ * @returns 是否是有效的ppt文件路径。
6
6
  */
7
7
  declare function isPptFilePath(filePath: string): boolean;
8
8
  export default isPptFilePath;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 判断是否是有效的视频文件路径(包含mp4、avi、flv、mkv
2
+ * 判断是否是有效的视频文件路径(包含mp4、avi、flv、mkv)。
3
3
  *
4
- * @param filePath 文件路径
5
- * @returns 是否是有效的视频文件路径
4
+ * @param filePath 文件路径。
5
+ * @returns 是否是有效的视频文件路径。
6
6
  */
7
7
  declare function isVideoFilePath(filePath: string): boolean;
8
8
  export default isVideoFilePath;
@@ -1,8 +1,9 @@
1
1
  /**
2
- * 下载单个文件
2
+ * 下载单个文件。该函数通过指定的文件路径下载文件,并允许自定义下载文件的名称。
3
3
  *
4
- * @param filePath 文件路径(必须)
5
- * @param fileName 下载时保存的文件名(可选)
4
+ * @param filePath 文件路径。
5
+ * @param fileName 下载时保存的文件名(可选)。如果未提供,将自动从 第一个参数`filePath` 提取文件名。
6
+ * @returns 返回一个 Promise,在文件下载完成后。
6
7
  */
7
8
  declare function singleDownloadFile(filePath: string, fileName?: string): Promise<void>;
8
9
  export default singleDownloadFile;
@@ -1,8 +1,9 @@
1
- import { DocumentFileSuffixEnum, FileSuffixEnum, ImageFileSuffixEnum, MusicFileSuffixEnum, PptFileSuffixEnum, VideoFileSuffixEnum } from '../extends/enum';
1
+ import { CompressFileSuffixEnum, DocumentFileSuffixEnum, FileSuffixEnum, ImageFileSuffixEnum, MusicFileSuffixEnum, PptFileSuffixEnum, VideoFileSuffixEnum } from '../extends/enum';
2
2
  type FileSuffix = (typeof FileSuffixEnum)[keyof typeof FileSuffixEnum];
3
3
  type ImageFileSuffix = (typeof ImageFileSuffixEnum)[keyof typeof ImageFileSuffixEnum];
4
4
  type VideoFileSuffix = (typeof VideoFileSuffixEnum)[keyof typeof VideoFileSuffixEnum];
5
5
  type PptFileSuffix = (typeof PptFileSuffixEnum)[keyof typeof PptFileSuffixEnum];
6
6
  type DocumentFileSuffix = (typeof DocumentFileSuffixEnum)[keyof typeof DocumentFileSuffixEnum];
7
7
  type MusicFileSuffix = (typeof MusicFileSuffixEnum)[keyof typeof MusicFileSuffixEnum];
8
- export type { DocumentFileSuffix, FileSuffix, ImageFileSuffix, MusicFileSuffix, PptFileSuffix, VideoFileSuffix, };
8
+ type CompressFileSuffix = (typeof CompressFileSuffixEnum)[keyof typeof CompressFileSuffixEnum];
9
+ export type { CompressFileSuffix, DocumentFileSuffix, FileSuffix, ImageFileSuffix, MusicFileSuffix, PptFileSuffix, VideoFileSuffix, };