http-cookie-agent
Advanced tools
Comparing version 6.0.4 to 6.0.5
@@ -16,13 +16,11 @@ import type http from 'node:http'; | ||
export function createCookieAgent< | ||
BaseAgent extends http.Agent = http.Agent, | ||
BaseAgentOptions = unknown, | ||
BaseAgentConstructorRestParams extends unknown[] = unknown[], | ||
>( | ||
BaseAgent: new (options: BaseAgentOptions, ...rest: BaseAgentConstructorRestParams) => BaseAgent, | ||
): new ( | ||
options: BaseAgentOptions & CookieAgentOptions, | ||
...rest: BaseAgentConstructorRestParams | ||
) => CookieAgent<BaseAgent>; | ||
type WithCookieAgentOptions<T> = T extends http.AgentOptions ? T & CookieAgentOptions : T; | ||
type ConstructorParams<Params> = { | ||
[Index in keyof Params]: WithCookieAgentOptions<Params[Index]>; | ||
} & { length: Params['length'] }; | ||
export function createCookieAgent<BaseAgent extends http.Agent = http.Agent, Params extends unknown[] = unknown[]>( | ||
BaseAgent: new (...rest: Params) => BaseAgent, | ||
): new (...rest: ConstructorParams<Params>) => CookieAgent<BaseAgent>; | ||
export const HttpCookieAgent: new (options: http.AgentOptions & CookieAgentOptions) => CookieAgent<http.Agent>; | ||
@@ -29,0 +27,0 @@ export const HttpsCookieAgent: new (options: https.AgentOptions & CookieAgentOptions) => CookieAgent<https.Agent>; |
{ | ||
"name": "http-cookie-agent", | ||
"version": "6.0.4", | ||
"version": "6.0.5", | ||
"description": "Allows cookies with every Node.js HTTP clients.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30922
512