TooTallNate/proxy-agents

Can't set jar when createCookieAgent(httpProxyAgent.HttpProxyAgent)

TenUchikawa opened this issue · 1 comments

Can't set jar when createCookieAgent(httpProxyAgent.HttpProxyAgent)

The type of the first argument is (string | URL) & CookieAgentOptions, so it cannot be assigned.
Shouldn't the type of the first argument be the following?
{
url:string|URL
}

const HttpProxyCookieAgent = createCookieAgent(httpProxyAgent.HttpProxyAgent);
const HttpsProxyCookieAgent = createCookieAgent(
  httpsProxyAgent.HttpsProxyAgent
);
//                       ↓
new HttpProxyCookieAgent({});
//                        ↓
new HttpsProxyCookieAgent({});