Typescript plugin for Vue3 like Volar in VSCode
I have an aplication which uses Typescript. Everythink works fine without errors till I do not run npm run build. Then console is full of errors from missing and wrong types. Is there a plugin for this to check this errors in runtime while I am typing?
VSCode have something like Volar.
Thanks for help.
请先登录再写评论。
Which IDE and TypeScript version do you use?
Volar support has been added in 2023.1.3: https://blog.jetbrains.com/webstorm/2023/06/webstorm-2023-1-3/#volar_support_for_vue
I use PhpStorm 2023. I selected it in menu while asking question. Have no idea what version of Typescript it is. Is the Volat available also in PhpStorm? This should solve the problem.
The version of Typescript is 8.19.3
> I use PhpStorm 2023
Which version exactly is indicated in Help > About?
Volar is available in PhpStorm starting from 2023.1.
> 8.19.3
The latest TypeScript version is 5.2.2.
Please check `Settings | Languages & Frameworks | TypeScript` and `Settings | Languages & Frameworks | TypeScript | Vue`.
Dont understand how latest varsion of typescript is 5.22.2
I run command npm tsc --version which returns 8.19.3
The PhpStorm version is 2023.2.2
The Typescript and Typescript Vue settings looks like on pictures below. There is something like Volar, but default is something else related to Typescript
So your TS version used in the project is less than 5.0. In this case when “Automatically” is selected, TypeScript service is used instead of Vue service.
What happens if you enable “Vue Language Server” option?
> Then console is full of errors from missing and wrong types
Could you provide an example? Does it happen in TypeScript or Vue files?