export declare function toBytes(src: Response | Blob): Promise>; /** Reports bytes downloaded for a single fetch; `total` from Content-Length. */ export type ProgressCallback = (bytesReceived: number, total?: number) => void; /** * Read a Response body to bytes while reporting download progress. * * When Content-Length is known the body is streamed directly into one pre-sized * buffer (no per-chunk array, no second copy), ticking `onProgress` as chunks * arrive. Without a known length there is no fraction to show, so it falls back * to a single one-shot read and one completion tick rather than buffering * chunks. Only used when a caller opts in via `onProgress`; the plain {@link * toBytes} fast path is unaffected. */ export declare function toBytesWithProgress(res: Response, onProgress: ProgressCallback): Promise>;