Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Fix type definitions to account for transparent proxy discovery (#57)
Browse files Browse the repository at this point in the history
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
- #56
  • Loading branch information
nulltoken committed Jan 11, 2021
1 parent 9963359 commit 8e6305a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
export = proxy;

0 comments on commit 8e6305a

Please sign in to comment.