Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 0344c35

Browse files
authored
Add comment to not edit in next-env file (vercel#26573)
This adds a comment to the generated `next-env.d.ts` to mention it should not be edited pointing to the documentation which contains an example of adding custom types separately. x-ref: vercel#26560 ## Documentation / Examples - [x] Make sure the linting passes
1 parent ff2faa5 commit 0344c35

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/next/lib/typescript/writeAppTypeDeclarations.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ export async function writeAppTypeDeclarations(
1717
os.EOL +
1818
(imageImportsEnabled
1919
? '/// <reference types="next/image-types/global" />' + os.EOL
20-
: '')
20+
: '') +
21+
os.EOL +
22+
'// NOTE: This file should not be edited' +
23+
os.EOL +
24+
'// see https://nextjs.org/docs/basic-features/typescript for more information.'
2125
)
2226
}

0 commit comments

Comments
 (0)