mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Adding DefaultsOptions that allows for optional uri and url when using the defaults function
This commit is contained in:
Vendored
+6
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user