diff --git a/index.d.ts b/index.d.ts index a22c3e30..ef331e3d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,7 +1,5 @@ -import liburl from 'url'; -import http from 'http'; -import https from 'https'; -import libcookie from 'cookie'; +import * as http from 'http'; +import * as https from 'https'; import { CookieJar } from 'tough-cookie'; type Primitive = string | number | bigint | boolean | symbol | null | undefined; @@ -11,9 +9,9 @@ export type CookieAgentOptions = { jar: CookieJar; }; -interface CookieAgent extends BaseAgent { +type CookieAgent = BaseAgent & { jar: CookieJar; -} +}; export function createCookieAgent< BaseAgent extends http.Agent = http.Agent,