Skip to content

Commit

Permalink
suggest using Partial<NextConfig> for typechecking next.config.js
Browse files Browse the repository at this point in the history
the `experimental` and `future` keys are non-optional in the type NextConfig because internally they are always set to a default from defaultConfig, but in next.config.js they are allowed to be optional
  • Loading branch information
fabb committed Jun 6, 2021
1 parent b7cd0a1 commit 7b53e9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/basic-features/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ The `next.config.js` file must be a JavaScript file as it does not get parsed by
// @ts-check

/**
* @type {import('next/dist/next-server/server/config').NextConfig}
* @type {Partial<import('next/dist/next-server/server/config').NextConfig>}
**/
const nextConfig = {
/* config options here */
Expand Down

0 comments on commit 7b53e9e

Please sign in to comment.