diff --git a/request/request.d.ts b/request/request.d.ts index e7edc39b8..43e62b203 100644 --- a/request/request.d.ts +++ b/request/request.d.ts @@ -21,7 +21,7 @@ declare module 'request' { function RequestAPI(options: RequestAPI.Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): RequestAPI.Request; module RequestAPI { - export function defaults(options: Options): typeof RequestAPI; + export function defaults(options: DefaultsOptions): typeof RequestAPI; export function request(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; export function request(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; @@ -97,6 +97,11 @@ declare module 'request' { gzip?: boolean; } + export interface DefaultsOptions extends OptionalOptions { + url?: string, + uri?: string + } + export type Options = (UriOptions|UrlOptions)&OptionalOptions; export interface RequestPart {