export { download }; export { isFileDownload, isBlobDownload }; export { getFileDownloadInternal, getBlobDownloadInternal }; export type { FileDownloadInternal, BlobDownloadInternal }; import type { FileDownload, BlobDownload } from './types.js'; type FileDownloadInternal = { stream: ReadableStream>; name: string; type: string; lastModified: number; size?: number; }; type BlobDownloadInternal = { stream: ReadableStream>; type: string; size?: number; }; declare function isFileDownload(value: unknown): value is FileDownload; declare function isBlobDownload(value: unknown): value is BlobDownload; declare function getFileDownloadInternal(value: FileDownload): FileDownloadInternal; declare function getBlobDownloadInternal(value: BlobDownload): BlobDownloadInternal; /** Return a `File`, `Blob`, or `ReadableStream` from a telefunction. The client receives a * `FileDownload`/`BlobDownload` — Blob/File-shaped with `onProgress`, `cancel`, * `saveToMemory()`, `saveToDisk(path?)`. https://telefunc.com/file-download */ declare function download(file: File): FileDownload; declare function download(blob: Blob): BlobDownload; declare function download(stream: ReadableStream>, options: { name: string; size?: number; type?: string; lastModified?: number; }): FileDownload; declare function download(stream: ReadableStream>, options?: { type?: string; size?: number; }): BlobDownload;