Interface Downloader<T>

Generic interface for the artifact downloader library. The default implementation is GotDownloader, but any custom downloader can be passed to @electron/get via the ElectronDownloadRequestOptions.downloader option.

interface Downloader<T> {
    download(url, targetFilePath, options): Promise<void>;
}

Type Parameters

  • T

    Options to pass to the downloader

Implemented by

Methods

Methods

  • Download an artifact from an arbitrary URL to a file path on system

    Parameters

    • url: string

      URL of the file to download

    • targetFilePath: string

      Filesystem path to download the artifact to (including the file name)

    • options: T

      Options to pass to the downloader

    Returns Promise<void>