The chosen file, or null to save through a download link.
Starts the export, passing onChunk on to the download (it is
undefined without a file, and the result's Blob is saved instead).
Saves the Blob; saveBlobViaLink unless a test passes one.
The export result.
Runs an export and saves it: into
writable, chunk by chunk, when the user chose a file, otherwise through a download link once the export completes.With a file,
rungets a chunk consumer that writes to it; pass that on asdownloadExportViaNats'sonChunk, so each write finishes before its chunk is acknowledged. The file is closed when the export completes. If the export or a write fails, or the export is cancelled, the file is aborted instead, which discards what was written; a file that was being replaced stays as it was.