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)