mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
fix(request): add maxSockets params at pool option (#40892)
* fix(request): add maxSockets params at pool option * fix pool options type
This commit is contained in:
10
types/request/index.d.ts
vendored
10
types/request/index.d.ts
vendored
@@ -149,7 +149,7 @@ declare namespace request {
|
||||
maxRedirects?: number;
|
||||
removeRefererHeader?: boolean;
|
||||
encoding?: string | null;
|
||||
pool?: any;
|
||||
pool?: PoolOptions;
|
||||
timeout?: number;
|
||||
localAddress?: string;
|
||||
proxy?: any;
|
||||
@@ -197,6 +197,12 @@ declare namespace request {
|
||||
};
|
||||
}
|
||||
|
||||
interface ExtraPoolOptions {
|
||||
maxSockets?: number;
|
||||
}
|
||||
|
||||
type PoolOptions = false | { [key: string]: http.Agent | https.Agent } & ExtraPoolOptions | ExtraPoolOptions;
|
||||
|
||||
interface NameValuePair {
|
||||
name: string;
|
||||
value: string;
|
||||
@@ -280,7 +286,7 @@ declare namespace request {
|
||||
// set in `Request.prototype.init`
|
||||
headers: Headers;
|
||||
method: string;
|
||||
pool: false | { [key: string]: http.Agent | https.Agent };
|
||||
pool: PoolOptions;
|
||||
dests: stream.Readable[];
|
||||
callback?: RequestCallback;
|
||||
uri: Url & { href: string, pathname: string };
|
||||
|
||||
Reference in New Issue
Block a user