forked from bearjaws/node-wget
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
29 lines (25 loc) · 693 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { EventEmitter } from 'events'
import { ClientRequest, IncomingMessage } from 'http'
declare const wget: {
download(src: string, output: string, options?: wget.DownloadOptions): EventEmitter,
request(options: wget.RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest,
}
declare namespace wget {
type RequestOptions = {
gunzip?: boolean,
} | DownloadOptions
type DownloadOptions = {
protocol?: string,
host?: string,
path?: string,
proxy?: {
protocol?: string,
host?: string,
port?: number,
proxyAuth?: string,
headers?: Record<string, string>,
} | string,
method?: string,
}
}
export = wget