Skip to content

Commit

Permalink
update config type
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Nov 4, 2022
1 parent 83fa2ae commit b579f41
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/next/server/config.ts
Expand Up @@ -57,8 +57,12 @@ const experimentalWarning = execOnce(
}
)

// TODO-APP: the type of this is wrong. In worker.ts it's called with only a fraction of the config, not the full config object.
export function setHttpClientAndAgentOptions(config: NextConfig) {
export function setHttpClientAndAgentOptions(config: {
httpAgentOptions?: NextConfig['httpAgentOptions']
experimental?: {
enableUndici?: boolean
}
}) {
if (isAboveNodejs16) {
// Node.js 18 has undici built-in.
if (config.experimental?.enableUndici && !isAboveNodejs18) {
Expand Down

0 comments on commit b579f41

Please sign in to comment.