import { type Operation } from "effection"; export interface Downloader extends Operation { download(spec: string, context?: URL): Operation; } export interface DownloaderOptions { host: URL; base: URL; outdir: string; strict?: boolean; concurrency?: number; retries?: number; } export type DownloadResult = { ok: true; bytes: number; } | { ok: false; url: string; referrer: string; error: Error; }; export declare const DownloadApi: import("@effectionx/context-api").Api<{ download(downloader: Downloader, opts: DownloaderOptions, source: URL, referrer: URL): Operation; }>; export declare function useDownloader(opts: DownloaderOptions): Operation; //# sourceMappingURL=downloader.d.ts.map