vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.79k stars 390 forks source link

Syntax highlighting breaks when using type assertion in template #4716

Closed FloEdelmann closed 1 month ago

FloEdelmann commented 1 month ago

Vue - Official extension or vue-tsc version

Vue - Official v2.0.10

VSCode version

1.92.2

Vue version

3.4.38

TypeScript version

5.5.4

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
    Memory: 18.26 GB / 31.02 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.13.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.5.2 - /usr/local/bin/npm
    pnpm: 7.18.2 - /usr/local/bin/pnpm

Steps to reproduce

Create a new Vue file with these contents:

<template>
  <some-component
    :value="foo as boolean"
    :other-prop="bar"
    disabled
  />
</template>

What is expected?

Its syntax should be highlighted properly.

What is actually happening?

grafik

Note that it works when parentheses are added:

grafik

Link to minimal reproduction

No response

Any additional comments?

No response

KermanX commented 1 month ago

Duplicate of #4534.