Closed re-jim closed 1 year ago
Anything new on this issue? I get the same error...
Just as any
for now.
if something like this is done to type would be nice:
export interface Agent extends httpsAgent {
_promisifiedCallback: boolean;
timeout: number | null;
options: AgentOptions;
callback: AgentCallback;
addRequest: (req?: any, opts?: any) => void;
freeSocket: (socket: any, opts: any) => void;
}
different extend - httpsAgent vs EventEmitter and options are not optional now.
but I guess change is more complex than that :)
I think also AgentOptions should come from node http|https or similar clone
You can use as Partial<Agent> as Agent
to avoid as any
This code in this repository has been moved to the proxy-agents
monorepo, so I am closing this pull request. If you feel that this issue still exists as of the latest release, feel free to open a new issue over there.
S3 recommends to use this package: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-configuring-proxies.html
However, when I try the suggested code, I get a typings error:
Type 'ProxyAgent' is not assignable to type 'Agent'