Fix to just make ClientRequestArgs an alias of RequestOptions

This commit is contained in:
Kevin Greene
2017-10-23 15:32:52 -07:00
parent bf50c9a7a7
commit 63e6236af8
3 changed files with 15 additions and 9 deletions
+5 -3
View File
@@ -575,7 +575,7 @@ declare module "http" {
[header: string]: number | string | string[] | undefined;
}
export interface ClientRequestArgs {
export interface RequestOptions {
protocol?: string;
host?: string;
hostname?: string;
@@ -591,6 +591,8 @@ declare module "http" {
timeout?: number;
}
export type ClientRequestArgs = RequestOptions
export interface Server extends net.Server {
setTimeout(msecs: number, callback: Function): void;
maxHeadersCount: number;
@@ -731,7 +733,7 @@ declare module "http" {
};
export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) =>void ): Server;
export function createClient(port?: number, host?: string): any;
export function request(options: ClientRequestArgs | string, callback?: (res: IncomingMessage) => void): ClientRequest;
export function request(options: RequestOptions | string, callback?: (res: IncomingMessage) => void): ClientRequest;
export function get(options: any, callback?: (res: IncomingMessage) => void): ClientRequest;
export var globalAgent: Agent;
}
@@ -927,7 +929,7 @@ declare module "https" {
SNICallback?: (servername: string) => any;
}
export interface RequestOptions extends http.ClientRequestArgs {
export interface RequestOptions extends http.RequestOptions {
pfx?: any;
key?: any;
passphrase?: string;
+5 -3
View File
@@ -647,7 +647,7 @@ declare module "http" {
[header: string]: number | string | string[] | undefined;
}
export interface ClientRequestArgs {
export interface RequestOptions {
protocol?: string;
host?: string;
hostname?: string;
@@ -663,6 +663,8 @@ declare module "http" {
timeout?: number;
}
export type ClientRequestArgs = RequestOptions
export interface Server extends net.Server {
setTimeout(msecs: number, callback: Function): void;
maxHeadersCount: number;
@@ -809,7 +811,7 @@ declare module "http" {
};
export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) => void): Server;
export function createClient(port?: number, host?: string): any;
export function request(options: ClientRequestArgs | string, callback?: (res: IncomingMessage) => void): ClientRequest;
export function request(options: RequestOptions | string, callback?: (res: IncomingMessage) => void): ClientRequest;
export function get(options: any, callback?: (res: IncomingMessage) => void): ClientRequest;
export var globalAgent: Agent;
}
@@ -1334,7 +1336,7 @@ declare module "https" {
SNICallback?: (servername: string, cb: (err: Error, ctx: tls.SecureContext) => any) => any;
}
export interface RequestOptions extends http.ClientRequestArgs {
export interface RequestOptions extends http.RequestOptions {
pfx?: any;
key?: any;
passphrase?: string;
+5 -3
View File
@@ -664,7 +664,7 @@ declare module "http" {
[header: string]: number | string | string[] | undefined;
}
export interface ClientRequestArgs {
export interface RequestOptions {
protocol?: string;
host?: string;
hostname?: string;
@@ -680,6 +680,8 @@ declare module "http" {
timeout?: number;
}
export type ClientRequestArgs = RequestOptions
export interface Server extends net.Server {
setTimeout(msecs: number, callback: Function): void;
maxHeadersCount: number;
@@ -826,7 +828,7 @@ declare module "http" {
};
export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) => void): Server;
export function createClient(port?: number, host?: string): any;
export function request(options: ClientRequestArgs | string, callback?: (res: IncomingMessage) => void): ClientRequest;
export function request(options: RequestOptions | string, callback?: (res: IncomingMessage) => void): ClientRequest;
export function get(options: any, callback?: (res: IncomingMessage) => void): ClientRequest;
export var globalAgent: Agent;
}
@@ -1399,7 +1401,7 @@ declare module "https" {
SNICallback?: (servername: string, cb: (err: Error, ctx: tls.SecureContext) => any) => any;
}
export interface RequestOptions extends http.ClientRequestArgs {
export interface RequestOptions extends http.RequestOptions {
pfx?: any;
key?: any;
passphrase?: string;