I set up my vue js 3 project on vite using npm create vue@latest and I chose TypeScript from the list of dependencies.
Whenever I import a component, the location gets underlined in red in my VS Code. When I hover over, the following message appears: Could not find a declaration file for module ‘./components/ComponentOne.vue’. ‘c:/Users/me/…/src/components/ComponentOne.vue’ implicitly has an ‘any’ type.ts(7016).
I searched for possible answers and the suggested solution was to create a shims-vue.d.ts file (which I didn’t have) and include the extension in tsconfig.json. I tried that, however I included the extension in tsconfig.app.json as I do not have tsconfig.json in the project. This did not help.
Also, it sounds weird that I would have to set up TS manually when selecting TS during the project set-up.
The application runs fine, however, the underline in ide is not disappearing. Could someone please explain to me what to do? And why is it happening?
Shall I set up TS manually despite selecting the language at the project set-up? I am using composition API and a SFC.
Thanks!