Lazy import proxy-agent

This commit is contained in:
Fedor Indutny 2024-03-20 11:05:10 -07:00 committed by GitHub
parent 83e8f4b59d
commit 091b50c414
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 60 additions and 39 deletions

View file

@ -9,7 +9,7 @@ import { strictAssert } from '../util/assert';
import { explodePromise } from '../util/explodePromise';
import { getUserAgent } from '../util/getUserAgent';
import * as durations from '../util/durations';
import type { createProxyAgent } from '../util/createProxyAgent';
import type { ProxyAgent } from '../util/createProxyAgent';
import { createHTTPSAgent } from '../util/createHTTPSAgent';
import * as log from '../logging/log';
import * as Timers from '../Timers';
@ -28,7 +28,7 @@ export type ConnectOptionsType<Resource extends IResource> = Readonly<{
url: string;
certificateAuthority?: string;
version: string;
proxyAgent?: ReturnType<typeof createProxyAgent>;
proxyAgent?: ProxyAgent;
timeout?: number;
extraHeaders?: Record<string, string>;