Skip to content

Commit b899ec7

Browse files
use as const as satisfies while assigning the type
1 parent db220ca commit b899ec7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/base/packages/nextjs/scaffold.config.ts.template.mjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const contents = ({ preConfigContent, configOverrides, extraConfigTypeName }) =>
2121

2222
return `import * as chains from "viem/chains";
2323
24+
${preConfigContent[0] || ''}
25+
2426
export type BaseConfig = {
2527
// The networks on which your DApp is live
2628
targetNetworks: readonly chains.Chain[];
@@ -47,10 +49,8 @@ export type BaseConfig = {
4749
export type ScaffoldConfig = BaseConfig ${extraConfigTypeName[0] ? `& ${extraConfigTypeName[0]}` : ''};
4850
4951
export const DEFAULT_ALCHEMY_API_KEY = "oKxs-03sij-U_N0iOlrSsZFr29-IqbuF";
50-
${preConfigContent[0] || ''}
51-
;
5252
53-
const scaffoldConfig: ScaffoldConfig = ${stringify(finalConfig)};
53+
const scaffoldConfig = ${stringify(finalConfig)} as const satisfies ScaffoldConfig;
5454
5555
export default scaffoldConfig;`;
5656
};

0 commit comments

Comments
 (0)