summaryrefslogtreecommitdiff
path: root/desktop/node_modules/@electron/get/dist/esm/GotDownloader.d.ts
blob: 6494756c11837b402d87aa8bcc7dbbcab6e51a48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { Progress as GotProgress, Options as GotOptions } from 'got';
import { Downloader } from './Downloader';
/**
 * See [`got#options`](https://github.com/sindresorhus/got#options) for possible keys/values.
 */
export declare type GotDownloaderOptions = (GotOptions & {
    isStream?: true;
}) & {
    /**
     * if defined, triggers every time `got`'s `downloadProgress` event callback is triggered.
     */
    getProgressCallback?: (progress: GotProgress) => Promise<void>;
    /**
     * if `true`, disables the console progress bar (setting the `ELECTRON_GET_NO_PROGRESS`
     * environment variable to a non-empty value also does this).
     */
    quiet?: boolean;
};
export declare class GotDownloader implements Downloader<GotDownloaderOptions> {
    download(url: string, targetFilePath: string, options?: GotDownloaderOptions): Promise<void>;
}