@nuxt/docs-nightly 4.0.3-29238389.29afb8be → 4.0.3-29238405.9e63b3b7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1072,7 +1072,16 @@ However, to take advantage of improved type checking, you can opt in to the new
1072
1072
  + "typecheck": "nuxt prepare && vue-tsc -b --noEmit"
1073
1073
  ```
1074
1074
 
1075
- 4. **Configure Node.js TypeScript options** if needed:
1075
+ 4. **Move all type augmentations into their appropriate context**:
1076
+ * If you are augmenting types for the app context, move the files to the `app/` directory.
1077
+ * If you are augmenting types for the server context, move the files to the `server/` directory.
1078
+ * If you are augmenting types that are **shared between the app and server**, move the files to the `shared/` directory.
1079
+
1080
+ ::warning
1081
+ Augmenting types from outside the `app/`, `server/`, or `shared/` directories will not work with the new project references setup.
1082
+ ::
1083
+
1084
+ 5. **Configure Node.js TypeScript options** if needed:
1076
1085
  <!-- @case-police-ignore tsConfig -->
1077
1086
 
1078
1087
  ```ts
@@ -1094,7 +1103,7 @@ However, to take advantage of improved type checking, you can opt in to the new
1094
1103
  })
1095
1104
  ```
1096
1105
 
1097
- 5. **Update any CI/build scripts** that run TypeScript checking to ensure they use the new project references approach.
1106
+ 6. **Update any CI/build scripts** that run TypeScript checking to ensure they use the new project references approach.
1098
1107
 
1099
1108
  The new configuration provides better type safety and IntelliSense for projects that opt in, while maintaining full backward compatibility for existing setups.
1100
1109
 
@@ -108,6 +108,20 @@ Each of these files is configured to reference the appropriate dependencies and
108
108
  The project reference setup is handled automatically by Nuxt. You typically don't need to modify these configurations manually, but understanding how they work can help you troubleshoot type-checking issues.
109
109
  ::
110
110
 
111
+ ### Augmenting Types with Project References
112
+
113
+ Since the project is divided into **multiple type contexts**, it's important to **augment types within the correct context** to ensure they are properly recognized.
114
+
115
+ For example, if you want to augment types for the `app` context, the augmentation file should be placed in the `app/` directory.
116
+
117
+ Similarly:
118
+ - For the `server` context, place the augmentation file in the `server/` directory.
119
+ - For types that are **shared between the app and server**, place the file in the `shared/` directory.
120
+
121
+ ::warning
122
+ Augmenting types outside of these directories will not be recognized by TypeScript.
123
+ ::
124
+
111
125
  ## Strict Checks
112
126
 
113
127
  TypeScript comes with certain checks to give you more safety and analysis of your program.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/docs-nightly",
3
- "version": "4.0.3-29238389.29afb8be",
3
+ "version": "4.0.3-29238405.9e63b3b7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",