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

2.0.17 vue-tsc error - multiple event properties with different modifiers returns TS1117: An object literal cannot have multiple properties with the same name #4382

Closed synthmusic closed 1 month ago

synthmusic commented 1 month ago

vue-tsc throwing error on component with multiple @keydown events with different modifiers as of 2.0.17.
Does not reproduce in 2.0.16

vue-tsc --build --force

with component that includes

<input
  @keydown.esc="handleEsc"
  @keydown.down.prevent="handleDown"
  @keydown.up.prevent="handleUp"
  @keydown.tab="handleTab"
/>

results in

- error TS1117: An object literal cannot have multiple properties with the same name.
@keydown.down.prevent="handleDown"
 ~~~~~~~

- error TS1117: An object literal cannot have multiple properties with the same name.
@keydown.up.prevent="handleUp"
 ~~~~~~~

- error TS1117: An object literal cannot have multiple properties with the same name.
@keydown.tab="handleTab"
 ~~~~~~~
so1ve commented 1 month ago

Fixed by https://github.com/vuejs/language-tools/commit/b359aa9ba2bb2e96141f5b22586df23a09598c0f

synthmusic commented 1 month ago

looked, didn't find - thanks much to you all!