Reputation: 632
I read that vscode behind the scenes relies on typescript definitions along with JSDoc. So will me downloading typescript definitions help in the intellisense even though I am using pure javascript and not typescript in my project?
eg: will downloading and installing npm --save-dev @types/<some_library>
help with the intellisense for that library?
Upvotes: 0
Views: 37
Reputation: 639
The Answer is no in regards to the auto completion of vs code since you may not be able to import those types in your js
files.
As a side note, you can use typescript to check javascript for type confirmity. Therefore you just need to add the following flags to your tsconfig compilerOptions
after initializig one in your repo.
"checkJs": true,
"allowJs": true
VS Code certainly will point out type errors for simple types but may not find any errors in any third party lib.
Upvotes: 1