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

Commit

Permalink
Add comment to not edit in next-env file (vercel#26573)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ijjk authored Jun 24, 2021
1 parent ff2faa5 commit 0344c35
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/next/lib/typescript/writeAppTypeDeclarations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export async function writeAppTypeDeclarations(
os.EOL +
(imageImportsEnabled
? '/// <reference types="next/image-types/global" />' + os.EOL
: '')
: '') +
os.EOL +
'// NOTE: This file should not be edited' +
os.EOL +
'// see https://nextjs.org/docs/basic-features/typescript for more information.'
)
}

0 comments on commit 0344c35

Please sign in to comment.