Skip to content

Commit 2667560

Browse files
introduce NextConfigExperimental as suggested in PR review
1 parent 95cf34b commit 2667560

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

packages/next-on-pages/build-metadata.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ type NextOnPagesBuildMetadata = {
77
/** (subset of) values obtained from the user's next.config.js (if any was found) */
88
config?: {
99
experimental?: Pick<
10-
NonNullable<
11-
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- the import needs to be dynamic since the nextConfig file itself uses this type
12-
import('./src/buildApplication/nextConfig').NextConfig['experimental']
13-
>,
10+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- the import needs to be dynamic since the nextConfig file itself uses this type
11+
import('./src/buildApplication/nextConfig').NextConfigExperimental,
1412
'allowedRevalidateHeaderKeys' | 'fetchCacheKeyPrefix'
1513
>;
1614
};

packages/next-on-pages/src/buildApplication/nextConfig.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ import * as os from 'os';
99
* version of it which includes just what we need in next-on-pages.
1010
*/
1111
export type NextConfig = Record<string, unknown> & {
12-
experimental?: {
13-
incrementalCacheHandlerPath?: string;
14-
allowedRevalidateHeaderKeys?: string[];
15-
fetchCacheKeyPrefix?: string;
16-
};
12+
experimental?: NextConfigExperimental;
13+
};
14+
15+
export type NextConfigExperimental = {
16+
incrementalCacheHandlerPath?: string;
17+
allowedRevalidateHeaderKeys?: string[];
18+
fetchCacheKeyPrefix?: string;
1719
};
1820

1921
/**

0 commit comments

Comments
 (0)