3

I have searched and searched and I cant seem to find a definite answer to whether or not you should be able to get intellisense on typed data within the template of a single file component.

I am using VSCode with nuxt, nuxt-composition-api and using the vetur extension. I thought it might be the vetur extension intefering but I disabled and still couldnt get any intellisense.

I have a typescript file that I am creating and exporting an array of objects. Both the array and object are fully typed with interfaces. When I import these into the .vue file I can see that within the script tags I can get the intellisense I am expecting and can access all the properties associated with each object. However when I go to use it within the template tags using with a v-for loop for example I get no intellisense for my data.

Is this expected? Or have I done something wrong here. Just want to know if I'm chasing something that isn't possible?

Thanks.

Craig
  • 31
  • 1
  • Did you gave a look to Volar? https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar – kissu Jul 23 '21 at 20:08
  • I had the same problem, solution here: https://stackoverflow.com/questions/53653689/how-enable-typescript-typing-and-intellisense-for-vue-props-in-template-in-vs-co?rq=1 – Dan Aug 20 '21 at 10:11

0 Answers0