Unverified Commit bd9f0eb4 authored by SJvaca30's avatar SJvaca30 Committed by GitHub

docs: clarify next-env.d.ts regeneration (#94232)

## What?

Closes #94153.

Clarifies that `next-env.d.ts` is managed by Next.js and that its
contents may change over time, including between commands such as `next
dev` and `next typegen`.

## Why?

Projects that still track `next-env.d.ts` can see command-order diffs
when the generated route type imports switch between `.next/dev/types`
and `.next/types`. The docs already recommend excluding the file from
version control; this makes the generated-file contract and manual-edit
guidance explicit.

## Testing

- `npx --yes prettier@3.6.2 --check
docs/01-app/03-api-reference/05-config/02-typescript.mdx`
- `git diff --check`
parent 0dc1884c
...@@ -88,7 +88,7 @@ Running `next dev`, `next build`, or [`next typegen`](/docs/app/api-reference/cl ...@@ -88,7 +88,7 @@ Running `next dev`, `next build`, or [`next typegen`](/docs/app/api-reference/cl
> **Good to know**: > **Good to know**:
> >
> - We recommend adding `next-env.d.ts` to your `.gitignore` file. > - `next-env.d.ts` is managed by Next.js. Its contents are an implementation detail and may change over time. Add it to `.gitignore`. If your project already tracks the file, remove it from Git. Do not edit this file manually.
> - The file must be in your `tsconfig.json` `include` array (`create-next-app` does this automatically). > - The file must be in your `tsconfig.json` `include` array (`create-next-app` does this automatically).
## Examples ## Examples
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment