This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare global { | |
interface Navigator { | |
msSaveBlob?: (blob: any, defaultName?: string) => boolean | |
} | |
} | |
export default async function saveFile(arrayBuffers: ArrayBuffer[], fileName: string, fileType: string): Promise<void> { | |
return new Promise((resolve, reject) => { | |
const blob = new Blob(arrayBuffers, { type: fileType }); |