Skip to content

Class string color scopes incorrect when v-model contains TS "as" cast #520

@qgates

Description

@qgates

Example:

<textarea
  v-model="var as string"
  class="fld-module h-full resize-none">
...

Class string is assigned incorrect scopes meta.namespace.declaration.ts and source.ts.embedded.html.vue etc..

The order of attributes seems to make no difference. Workarounds:

  • bracket the entire v-model expression eg. v-model="(var as string)"
  • use angle bracket casting instead, eg. v-model="<string>var"

How it appears (using tomorrow night theme):

image

How it should appear:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions