Environment
|
|
| Operating system |
Linux 6.19.10-200.fc43.x86_64 |
| CPU |
AMD Ryzen 7 7840U w/ Radeon 780M Graphics (16 cores) |
| Node.js version |
v22.22.0 |
| nuxt/cli version |
3.33.1 |
| Package manager |
pnpm@10.9.0 |
| Nuxt version |
4.3.1 |
| Nitro version |
2.13.1 |
| Builder |
vite@7.3.1 |
| Config |
compatibilityDate, devtools, fonts, future, modules, nitro, typescript |
| Modules |
@nuxt/fonts@0.13.0, vuetify-nuxt-module@0.19.5, nuxt-auth-utils@0.5.28 |
Reproduction
Create a test file with content const a: number = "asdf"; under tests/utils.test.ts
Describe the bug
Running pnpm nuxt typecheck succeeds, however, it should report errors. At least Type 'string' is not assignable to type 'number' and depending on config also 'a' is declared but its value is never read..
Additional context
// content of tsconfig.json
{
// https://nuxt.com/docs/guide/concepts/typescript
"files": [],
"references": [
{
"path": "./.nuxt/tsconfig.app.json"
},
{
"path": "./.nuxt/tsconfig.server.json"
},
{
"path": "./.nuxt/tsconfig.shared.json"
},
{
"path": "./.nuxt/tsconfig.node.json"
}
]
}
Logs
Environment
Linux 6.19.10-200.fc43.x86_64AMD Ryzen 7 7840U w/ Radeon 780M Graphics (16 cores)v22.22.03.33.1pnpm@10.9.04.3.12.13.1vite@7.3.1compatibilityDate,devtools,fonts,future,modules,nitro,typescript@nuxt/fonts@0.13.0,vuetify-nuxt-module@0.19.5,nuxt-auth-utils@0.5.28Reproduction
Create a test file with content
const a: number = "asdf";undertests/utils.test.tsDescribe the bug
Running
pnpm nuxt typechecksucceeds, however, it should report errors. At leastType 'string' is not assignable to type 'number'and depending on config also'a' is declared but its value is never read..Additional context
Logs