how to add nuxt plugins to vs-code jsDoc type checkings?

Viewed 97

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)
0 Answers
Related