Search code examples
typescriptvue.jsvisual-studio-codevetur

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?


Solution

  • Using Vetur extension:

    In settings:

    "vetur.experimental.templateInterpolationService": true,
    

    enter image description here