import type { FileLoader } from './loaders/fileloader'; type ExternalImportMap = Record; type DownloadJob = { downloadedUris: Set; url: string; options: RequestInit; }; /** * Downloads the transitive closure of a set of model files. * @memberof module:concerto-core */ declare class FileDownloader { fileLoader: FileLoader; getExternalImports: (file: TFile) => ExternalImportMap; concurrency: number; /** * Create a FileDownloader and bind to a FileLoader. * @param fileLoader - the loader to use to download model files * @param getExternalImports - a function taking a file and returning new files * @param concurrency - the number of model files to download concurrently */ constructor(fileLoader: FileLoader, getExternalImports: (file: TFile) => ExternalImportMap, concurrency?: number); /** * Download all external dependencies for an array of model files * @param files - the model files * @param options - Options object passed to FileLoaders * @return a promise that resolves to Files[] for the external model files */ downloadExternalDependencies(files: TFile[], options?: RequestInit): Promise; /** * Execute a Job * @param job - the job to execute * @param fileLoader - the loader to use to download model files. * @return a promise to the job results */ runJob(job: DownloadJob, fileLoader: FileLoader): Promise; } export = FileDownloader;