@jinming6/ming-tool
Version:
Front-end tool library
24 lines (23 loc) • 730 B
TypeScript
import { type DownloadFileOpts, type DownloadFileV2Opts } from '../models/file/file.interfaces';
/**
* 下载文件(arrayBuffer)
*/
export declare function downloadArrayBuffer(stream: ArrayBuffer, filename: string): boolean;
/**
* 转换为webp格式
*/
export declare function convert2Webp(file: File | Blob, quality?: number): Promise<Blob>;
/**
* 下载文件(url)
*/
export declare function downloadUrl(url: string, filename: string): boolean;
/**
* 下载文件
* @deprecated 从 1.2.3 版本开始
* 请使用 downloadFileV2 代替
*/
export declare function downloadFile(options: DownloadFileOpts): boolean;
/**
* 下载文件 v2
*/
export declare function downloadFileV2(options: DownloadFileV2Opts): boolean;