Fix #7979, request.d.ts : Options union types

This commit is contained in:
Leo Liang
2016-02-06 11:07:09 +08:00
parent f7164a47ff
commit 90c7b5653c
2 changed files with 13 additions and 1 deletions
+4 -1
View File
@@ -125,7 +125,10 @@ declare module 'request' {
uri?: string;
url?: string;
}
export type Options = RequiredUriUrl & CoreOptions;
export type OptionsWithUri = UriOptions & CoreOptions;
export type OptionsWithUrl = UrlOptions & CoreOptions;
export type Options = OptionsWithUri | OptionsWithUrl;
export interface RequestCallback {
(error: any, response: http.IncomingMessage, body: any): void;