2 years ago
#54462

Babak Karimi Asl
how to add nuxt plugins to vs-code jsDoc type checkings?
when using plugins in nuxt , we can access them in components and store using this
export default {
methods:{
myMethod(){
return this.$myNuxtPlugin.doThings()
}
}
to check types with jsDocs in vscode, in jsconfig.json
i set compilerOptions.checkJs
to true,
but Vetur/vscode-intellisense cannot detect nuxt plugins types .
the error for above example would be :
Property '$myNuxtPlugin' does not exist on type 'CombinedVueInstance<Vue, {
myMethod(): Promise<void>; }>>'.Vetur(2339)
javascript
visual-studio-code
nuxt.js
jsdoc
javascript-intellisense
0 Answers
Your Answer