Bug Description
After undici added support for http2, allowH2 was added to the buildConnector parameters, but was not added to the type definition.
|
function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { |
|
connect = buildConnector({ |
|
...tls, |
|
maxCachedSessions, |
|
allowH2, |
|
socketPath, |
|
timeout: connectTimeout, |
|
...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), |
|
...connect |
|
}) |
|
} |
|
connect = buildConnector({ |
|
...tls, |
|
maxCachedSessions, |
|
allowH2, |
|
socketPath, |
|
timeout: connectTimeout == null ? 10e3 : connectTimeout, |
|
...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), |
|
...connect |
|
}) |
|
} |
|
declare namespace buildConnector { |
|
export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & { |
|
maxCachedSessions?: number | null; |
|
socketPath?: string | null; |
|
timeout?: number | null; |
|
port?: number; |
|
keepAlive?: boolean | null; |
|
keepAliveInitialDelay?: number | null; |
|
} |
Reproducible By
Expected Behavior
Logs & Screenshots
Environment
Additional context
Bug Description
After undici added support for http2, allowH2 was added to the buildConnector parameters, but was not added to the type definition.
undici/lib/core/connect.js
Line 76 in 882ff6d
undici/lib/client.js
Lines 256 to 265 in 882ff6d
undici/lib/pool.js
Lines 55 to 64 in 882ff6d
undici/types/connector.d.ts
Lines 7 to 15 in 882ff6d
Reproducible By
Expected Behavior
Logs & Screenshots
Environment
Additional context