You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -27,10 +27,6 @@ y crear un archivo **`tsconfig.json`** :
27
27
28
28
<<< @/shared/tsconfig.json
29
29
30
-
::: tip
31
-
`@nuxt/typescript-build` incluye `@nuxt/types`, asi que no necesitas instalarlo de forma independiente.
32
-
:::
33
-
34
30
::: tip
35
31
36
32
Revisar la [documentación oficial de TypeScript](https://www.typescriptlang.org/docs/handbook/compiler-options.html) para aprender acerca de las diferentes opciones del compilador.
Types versioning match Nuxt versioning since [2.13.0](https://github.com/nuxt/nuxt.js/releases/tag/v2.13.0).
32
+
:::
33
+
15
34
## Configuration
16
35
17
36
All you need to do is add **`@nuxt/typescript-build`** to your **`buildModules`** in **`nuxt.config.js`**
@@ -28,7 +47,7 @@ and create a **`tsconfig.json`** file :
28
47
<<< @/shared/tsconfig.json
29
48
30
49
::: tip
31
-
Notice that **es2018** target is needed to be able to use [**Optional Chaining**](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#optional-chaining) and [**Nullish Coalescing**](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#nullish-coalescing), as **esnext** target doesn't seem to support these features for now.
50
+
Notice that **ES2018** target is needed to be able to use [**Optional Chaining**](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#optional-chaining) and [**Nullish Coalescing**](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#nullish-coalescing), as **ESNext** target doesn't seem to support these features for now.
32
51
:::
33
52
34
53
You will also need to provide types for Vue files by adding the following type declaration:
@@ -45,10 +64,6 @@ declare module "*.vue" {
45
64
You can place this file in the root directory of your project or a directory named `types`. You can place it in a custom directory, but you'll need to configure [`typeRoots`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-typeroots-and-types) in the `tsconfig.json` file.
46
65
:::
47
66
48
-
::: tip
49
-
`@nuxt/typescript-build` ships `@nuxt/types`, so there's no need to install it independently.
50
-
:::
51
-
52
67
::: tip
53
68
54
69
Check official [TypeScript documentation](https://www.typescriptlang.org/docs/handbook/compiler-options.html) to learn about the different compiler options.
0 commit comments