docs(typescript): typos (#4660)

Co-authored-by: Damian <48835293+DamianGlowala@users.noreply.github.com>
This commit is contained in:
Sébastien Chopin 2022-04-27 12:36:25 +02:00 committed by GitHub
parent 9ced8e9ac6
commit 96b408ae58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@ yarn nuxi typecheck
## Auto-generated types
When you run `nuxi dev` or `nuxi build`, Nuxt generates the following files for IDE type support (and type-checking):
When you run `nuxi dev` or `nuxi build`, Nuxt generates the following files for IDE type support (and type checking):
### `.nuxt/nuxt.d.ts`
@ -29,6 +29,7 @@ This file contains the recommended basic TypeScript configuration for your proje
::alert{icon=👉}
Nitro also [auto-generates types](/guide/concepts/server-engine#typed-api-routes) for API routes. Plus, Nuxt also generates types for globally available components and [auto-imports from your composables](/guide/directory-structure/composables), plus other core functionality.
::
::alert
Keep in mind that all options extended from `./.nuxt/tsconfig.json` will be overwritten by the options defined in your `tsconfig.json`.
Overwriting options such as `"compilerOptions.paths"` with your own configuration will lead TypeScript to not factor in the module resolutions from `./.nuxt/tsconfig.json`. This can lead to module resolutions such as `#imports` not being recognized.
@ -36,11 +37,11 @@ Overwriting options such as `"compilerOptions.paths"` with your own configuratio
In case you need to extend options provided by `./.nuxt/tsconfig.json` further, you can use the `alias` property within your `nuxt.config`. `nuxi` will pick them up and extend `./.nuxt/tsconfig.json` accordingly.
::
## Stricter Checks
## Stricter checks
TypeScript comes with certain checks to give you more safety and analysis of your program.
Once youve converted your codebase to TypeScript and felt familiar with it, you can start enabling these checks for greater safety. ([read more](https://www.typescriptlang.org/docs/handbook/migrating-from-javascript.html#getting-stricter-checks))
Once youve converted your codebase to TypeScript and felt familiar with it, you can start enabling these checks for greater safety ([read more](https://www.typescriptlang.org/docs/handbook/migrating-from-javascript.html#getting-stricter-checks)).
In order to enable strict type checking, you have to update `nuxt.config`: