mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-14 12:14:40 +01:00
update docs
This commit is contained in:
@@ -45,54 +45,6 @@ export default defineNuxtConfig({
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
## 3. Enable strict mode
|
|
||||||
|
|
||||||
If you want to use Zod for input validation, make sure you have enabled strict mode:
|
|
||||||
|
|
||||||
::code-group
|
|
||||||
|
|
||||||
```json [tsconfig.json]
|
|
||||||
{
|
|
||||||
"extends": "./.nuxt/tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"strict": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
```ts [nuxt.config.ts]
|
|
||||||
export default defineNuxtConfig({
|
|
||||||
typescript: {
|
|
||||||
strict: true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
If strict mode is too much, at least enable `strictNullChecks`:
|
|
||||||
|
|
||||||
::code-group
|
|
||||||
|
|
||||||
```json [tsconfig.json]
|
|
||||||
{
|
|
||||||
"extends": "./.nuxt/tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"strictNullChecks": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
```ts [nuxt.config.ts]
|
|
||||||
export default defineNuxtConfig({
|
|
||||||
typescript: {
|
|
||||||
tsConfig: {
|
|
||||||
strictNullChecks: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
// https://v3.nuxtjs.org/concepts/typescript
|
// https://v3.nuxtjs.org/concepts/typescript
|
||||||
"extends": "./.nuxt/tsconfig.json",
|
"extends": "./.nuxt/tsconfig.json"
|
||||||
"compilerOptions": {
|
|
||||||
"strict": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user