`declare '#app' {}` not working for `useNuxtApp()`
Vue - Official extension or vue-tsc version
2.0.26
VSCode version
1.91.0
Vue version
3.3.13
TypeScript version
4.9.5
System Info
System:
OS: Windows 11 10.0.22631
CPU: (8) x64 Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz
Memory: 2.57 GB / 15.88 GB
Binaries:
Node: 18.20.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (126.0.2592.87)
Internet Explorer: 11.0.22621.3527
Steps to reproduce
'#app' module with NuxtApp not working but '#app/nuxt' module with NuxtApp working.
It works:
But it doen't work:
Or it:
What is expected?
Working '#app' module
What is actually happening?
Not working '#app' module
Link to minimal reproduction
https://stackblitz.com/edit/github-fxc8uz?file=index.d.ts
Any additional comments?
No response
Experiencing the same issue though not using nuxt and just global declare for some internal package in my monorepo.
Last working version for my was vue-tsc 2.0.22. 24 starts failing for me
@minht11 for me it doesn't work even for [email protected] and Vue extension with this version. Generally, since the beginning of Nuxt 3 I have had problems with typing in useNuxtApp, but now I finally managed to find some specifics.
Thank you for reporting this issue. I think this issue can't be fixed in this repo, as it may happen in any TypeScript Nuxt projects. Please report the issue to Nuxt. Thanks!