vuejs / language-tools

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

Types imported in the `<script setup>` should not be used as a variable in template #4353

Closed nekolab closed 1 month ago

nekolab commented 1 month ago

Playground repro: https://play.vuejs.org/#eNp9kU9PwzAMxb+KyaUgjU0DTlM3aaBJwGEgmOCSS9V6XUeaRIk7hqp+d5xM+yOEdovfe7F/Tloxtba/aVCMROpzV1kCj9RYUJkuxwn5ZCJ1VVvjCFpwuOwB/ViEV2fsIhw6WDpTQ8I9kkMyRlr4mJsCQ8r/iUmdG+0Jal/COHS9TB5RKQOfxqniIrmSOh3scHg8F4S1VRkhVwDpajhp23i569IBV1GttG0INtc1D1VjKdiXAkZFRtk1DVnYM/enR/2G9SMm6wNulg5O5omeIM+4y6rsr73R/FJtmCdFbmpbKXQvlipeR4oRRCd4GW/z/Rw1cg329nq+wvzrH33tt0ELkOjRbVCKg0eZK5F29ux9jls+H0zetlGcPmO+oTeqCYy72H2jC8Y+yUXap/h3lS4XfrYl1H6/VAANyS7mpeA/fDiz+hH3tn8X70ndie4XSPnNng==

What's wrong

As we can see in the reproduction: :data-t1="PropType.A" should be wrong but the typescript is not able to detect it :data-t2="VNodeTypes" is wrong and get detected

What we want to see:

tides under the PropType.A too