From 8e6305a5ce5ec05b5601ec9863668068b39187ed Mon Sep 17 00:00:00 2001 From: nulltoken Date: Tue, 12 Jan 2021 00:43:00 +0100 Subject: [PATCH] Fix type definitions to account for transparent proxy discovery (#57) ProxyAgent constructor can be invoked without a parameter. In that case, the proxy uri is retrieved from environment variables. Relevant: - https://github.com/TooTallNate/node-proxy-agent/blob/master/test/test.js#L166-L214 - https://github.com/TooTallNate/node-proxy-agent/pull/56 --- index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 62db29a..646c6a1 100644 --- a/index.d.ts +++ b/index.d.ts @@ -8,8 +8,8 @@ declare module ProxyAgent { declare const proxy: ProxyAgentConstructor; interface ProxyAgentConstructor { - (options: AgentOptions | string): ProxyAgent.ProxyAgent; - new (options: AgentOptions | string): ProxyAgent.ProxyAgent; + (options?: AgentOptions | string): ProxyAgent.ProxyAgent; + new (options?: AgentOptions | string): ProxyAgent.ProxyAgent; } -export = proxy; \ No newline at end of file +export = proxy;