@bbon/filedownload
Version:
File download helper
38 lines • 947 B
TypeScript
export declare const DEFAULT_MIMETYPE = "application/octet-stream";
export declare type DownloadOptions = {
/**
* Data to download
*
* @type {(string | ArrayBuffer | ArrayBufferView | Blob)}
*/
data: string | ArrayBuffer | ArrayBufferView | Blob;
/**
* File name
*
* @type {string}
*/
filename: string;
/**
* response.headers['content-type']
*
* default: application/octet-stream
*
* @type {string}
*/
contentType?: string;
};
export declare type DownloadFileOptions = DownloadOptions & {
bom?: string;
};
declare class FileDownloadHelper {
/**
* File download
*
* @param {DownloadOptions} options
* @memberof FileDownloadHelper
*/
download(options: DownloadOptions): void;
private downloadFile;
}
export default FileDownloadHelper;
//# sourceMappingURL=FileDownload.d.ts.map