1 | /**
|
2 | * Generic interface for the artifact downloader library.
|
3 | * The default implementation is {@link GotDownloader},
|
4 | * but any custom downloader can be passed to `@electron/get` via
|
5 | * the {@link ElectronDownloadRequestOptions.downloader} option.
|
6 | *
|
7 | * @typeParam T - Options to pass to the downloader
|
8 | * @category Downloader
|
9 | */
|
10 | export interface Downloader<T> {
|
11 | /**
|
12 | * Download an artifact from an arbitrary URL to a file path on system
|
13 | * @param url URL of the file to download
|
14 | * @param targetFilePath Filesystem path to download the artifact to (including the file name)
|
15 | * @param options Options to pass to the downloader
|
16 | */
|
17 | download(url: string, targetFilePath: string, options: T): Promise<void>;
|
18 | }
|