18

I'm working with Vue and VS Code with vetur extension installed.

I've defined a MyClass class with two public attributes. Inside the "script" section i'm able to get proper intelisense for the value property.

But I cannot check intellisense nor typing enforcement inside the template. as the image below.

enter image description here

I should see only enabled and number.

How can I configure my VS Code to get this type enforcement on the template?

Daniel Santos
  • 14,328
  • 21
  • 91
  • 174

1 Answers1

30

Using Vetur extension:

In settings:

"vetur.experimental.templateInterpolationService": true,

enter image description here

Alex
  • 59,571
  • 22
  • 137
  • 126
  • Get an error in the functional component with this option: {{ props.author.fullName }} Property 'props' does not exist on type 'CombinedVueInstance<{ author: IAuthorCard; } & Vue, object, object, object, Record>'. Did you mean '$props'?Vetur(2551) – n4ks Apr 13 '21 at 15:26