Installation
npm install --save @types/download
Summary
This package contains type definitions for download (https://github.com/kevva/download).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/download.
import { DecompressOptions } from "decompress";
import { GotEmitter, GotOptions } from "got";
import { Duplex } from "stream";
declare namespace download {
interface DownloadOptions extends DecompressOptions, GotOptions<string | null> {
extract?: boolean | undefined;
filename?: string | undefined;
}
}
declare function download(
url: string,
destination?: string,
options?: download.DownloadOptions,
): Promise<Buffer> & GotEmitter & Duplex;
declare function download(url: string, options?: download.DownloadOptions): Promise<Buffer> & GotEmitter & Duplex;
export = download;
Additional Details
Credits
These definitions were written by Nico Jansen, and BendingBender.