import { Response as FetchH2Response } from 'fetch-h2'; import { Response as NodeFetchResponse } from 'node-fetch'; export type FetchEngine = 'node-fetch' | 'fetch-h2'; export type NodeFetchOrFetchH2Response = FetchH2Response | NodeFetchResponse; declare class FetchUtils { private fetchEngine; setFetchEngine(newFetchEngine: FetchEngine): void; fetch(input: string): Promise; /** * Downloads a file from `url` and saves it to `path`. If a `progressCallback` function is passed, it * will be invoked for every chunk received. If the value of `total` parameter is -1, it means we * were unable to determine to total file size before starting the download. */ downloadFile(url: string, path: string, progressCallback?: (current: number, total: number) => void): Promise; } declare const fetchUtils: FetchUtils; export { fetchUtils };