Daniel Santos
Daniel Santos

Reputation: 15788

How enable Typescript typing and intellisense for vue props in template in VS Code?

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?

Upvotes: 18

Views: 7229

Answers (1)

Alex
Alex

Reputation: 67533

Using Vetur extension:

In settings:

"vetur.experimental.templateInterpolationService": true,

enter image description here

Upvotes: 30

Related Questions