Skip to content

Commit 1012630

Browse files
ijjkstyfle
andauthored
Add note about adding additional types (#26545)
* Add note about adding additional types * Update to bold edit also * Apply suggestions from code review Co-authored-by: Steven <[email protected]>
1 parent be62f02 commit 1012630

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/basic-features/typescript.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ npm run dev
5353

5454
You're now ready to start converting files from `.js` to `.tsx` and leveraging the benefits of TypeScript!.
5555

56-
> A file named `next-env.d.ts` will be created in the root of your project. This file ensures Next.js types are picked up by the TypeScript compiler. **You cannot remove it**, and it should not be edited as it can change at any time.
56+
> A file named `next-env.d.ts` will be created in the root of your project. This file ensures Next.js types are picked up by the TypeScript compiler. **You cannot remove it or edit it** as it can change at any time.
5757
5858
> TypeScript `strict` mode is turned off by default. When you feel comfortable with TypeScript, it's recommended to turn it on in your `tsconfig.json`.
5959
60+
> Instead of editing `next-env.d.ts`, you can include additional types by adding a new file e.g. `additional.d.ts` and then referencing it in the [`include`](https://www.typescriptlang.org/tsconfig#include) array in your `tsconfig.json`.
61+
6062
By default, Next.js will do type checking as part of `next build`. We recommend using code editor type checking during development.
6163

6264
If you want to silence the error reports, refer to the documentation for [Ignoring TypeScript errors](/docs/api-reference/next.config.js/ignoring-typescript-errors.md).

0 commit comments

Comments
 (0)