From 57e1a60b21ec02c40875a2adc6213e2e2d72ec49 Mon Sep 17 00:00:00 2001 From: Fabian B <32813692+madebyfabian@users.noreply.github.com> Date: Fri, 26 Apr 2024 17:05:04 +0200 Subject: [PATCH] docs: update strict checks section with new default (#26965) --- docs/2.guide/1.concepts/8.typescript.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/2.guide/1.concepts/8.typescript.md b/docs/2.guide/1.concepts/8.typescript.md index afc7ae5a05..3c57bd7464 100644 --- a/docs/2.guide/1.concepts/8.typescript.md +++ b/docs/2.guide/1.concepts/8.typescript.md @@ -76,18 +76,18 @@ 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](/docs/api/nuxt-config#alias) within your `nuxt.config`. `nuxi` will pick them up and extend `./.nuxt/tsconfig.json` accordingly. :: -## Stricter Checks +## Strict Checks TypeScript comes with certain checks to give you more safety and analysis of your program. -Once you’ve 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)). +[Strict checks](https://www.typescriptlang.org/docs/handbook/migrating-from-javascript.html#getting-stricter-checks) are enabled by default in Nuxt 3 to give you greater type safety. -In order to enable strict type checking, you have to update `nuxt.config`: +If you are currently converting your codebase to TypeScript, you may want to temporarily disable strict checks by setting `strict` to `false` in your `nuxt.config`: ```ts twoslash [nuxt.config.ts] export default defineNuxtConfig({ typescript: { - strict: true + strict: false } }) ```