Typescript errors all over the place in VS Code

I use the Directus template from the Directus.io start page. When I open the nuxt app in VS Code the IDE gets crazy and complains about almost every method.

Do you have any hints as to how I have to setup my VS Code to work correctly with TypeScript?

Did you npm install dependencies?

Yes, and the apps are running perfectly fine, no problems with nothing. Just the code in VS Code has lots and lots of red lines...

Hmm... this is so ... Microsoft: I restarted my computer... and voilá! – Thank you for your feedback, @Nik! Always much appreciated!

Great you figured it out. Might be enough to restart the ts server inside vscode next time. There is a dedicated command for that.

It turns out that lots of the warnings were caused by a web accessibility extension. It complains about a missing lang attribute when I actually only use a Type Annotation like this one: const canvasRef = ref<HTMLCanvasElement>() I turned the ext off...

1 Answer

1

Resolved in the comments above: It turns out that lots of the warnings were caused by a web accessibility extension