Closed AnzyRoman closed 3 months ago
We are experiencing something similar without Laravel (i.e; "pure" vue project). Props autocomplete and inlay hints for missing props are not working. Typescript works just fine though. I'll be happy to help if I can provide useful details !
Ok i have a clue. I tried to manually scaffold laravel breeze like project. Everything was working until I added the custom types from laravel project. The issue in laravel project is exacly about the declaration:
declare module "vue" {
interface ComponentCustomProperties {
route: typeof ziggyRoute;
}
}
Please check if there are any declare module "@vue/runtime-core"
in your project and drop them or modify to declare module "vue"
as a temporary solution.
Thanks for the comment, laravel project doesn't have any declare module "@vue/compiler-core"
but temporary solution was to change declare module "vue"
to declare module "@vue/runtime-core"
. I didn't test this solution yet, and don't know how it will impact the project and Vue-Official integration. But at a glance it seems to work.
I made a mistake, should be runtime
instead of compiler
Vue - Official extension or vue-tsc version
2.0.28
VSCode version
1.91.1
Vue version
3.4.0
TypeScript version
5.5.4
System Info
Steps to reproduce
What is expected?
Custom component coloring and prop autosuggestion.
What is actually happening?
Custom components don't change their color. Typescript works fine.
And autosuggestion doesn't work:
Link to minimal reproduction
https://github.com/AnzyRoman/example-laravel
Any additional comments?
I opened the same project in phpStorm and there were no issues with language tools. There are no issues with in clean Vue TS, NuxtTS or Beeze + Vue JS projects in VSCode.