UNPKG

860 BTypeScriptView Raw
1import { Progress as GotProgress, Options as GotOptions } 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 = (GotOptions & {
7 isStream?: true;
8}) & {
9 /**
10 * if defined, triggers every time `got`'s `downloadProgress` event callback is triggered.
11 */
12 getProgressCallback?: (progress: GotProgress) => Promise<void>;
13 /**
14 * if `true`, disables the console progress bar (setting the `ELECTRON_GET_NO_PROGRESS`
15 * environment variable to a non-empty value also does this).
16 */
17 quiet?: boolean;
18};
19export declare class GotDownloader implements Downloader<GotDownloaderOptions> {
20 download(url: string, targetFilePath: string, options?: GotDownloaderOptions): Promise<void>;
21}