UNPKG

809 BTypeScriptView Raw
1import * as got from 'got';
2import { Downloader } from './Downloader';
3/**
4 * See [`got#options`](https://github.com/sindresorhus/got#options) for possible keys/values.
5 */
6export declare type GotDownloaderOptions = got.GotOptions<string | null> & {
7 /**
8 * if defined, triggers every time `got`'s `downloadProgress` event callback is triggered.
9 */
10 getProgressCallback?: (progress: got.Progress) => Promise<void>;
11 /**
12 * if `true`, disables the console progress bar (setting the `ELECTRON_GET_NO_PROGRESS`
13 * environment variable to a non-empty value also does this).
14 */
15 quiet?: boolean;
16};
17export declare class GotDownloader implements Downloader<GotDownloaderOptions> {
18 download(url: string, targetFilePath: string, options?: GotDownloaderOptions): Promise<void>;
19}