core icon indicating copy to clipboard operation
core copied to clipboard

Type '"enter"' and '"tab"' is not assignable to type 'VOnModifiers'

Open selicens opened this issue 5 months ago • 0 comments

Vue version

3.5.14

Link to minimal reproduction

https://play.vuejs.org/#eNp9UstOAzEM/BUrl7RStT3AqSpIgDgA4iHgRjhst+5uaDaJEocWVf13nCxPCXGKPTOOZpzsxIn31WtCMRPz2ATtCSJS8sfK6t67QLCDbgIbTd21W+qVxhBhD6vgepA8J5VVtnE2EizIwhF0I7lIRM7KCeyUBXD2Ct+Sn/2+Y5QpgBGO4egYdvkGZ7Ayrh3JddHzPFZcjveTQfskqV4wKtEShlws0SBhgWKTj+jrpvTJF95tsg0ZdNtRLgyuSD7n68bK7hlojG7Wkpv5dEjPubkh7L2pCbkDmOdgUy7n0x+4mAiKbHul2+olOssLLHGVaFzvtcFw60lzLCVmwyIyVxvjNpcFo5DwIxnPdNis/8Bf4jZjStwFjBheUYkvjurQIg30+cMNbrn+Inu3TIbV/5D3yCtP2eMgO012ybZ/6Irbi/INtG0f4/mW0MbPUNloVg7vowT/hrN/on/bPagOyxw/gdi/AxNl0Dc=

Steps to reproduce

<script setup>
import { h, withModifiers } from 'vue'

const btn = h('button', {
  onKeyup: withModifiers(
    (e) => {console.log('keyup:', e.key)},
    ['tab', 'enter', 'delete', 'esc', 'space', 'up', 'down', 'right', 'left']
  )
}, 'click')
</script>

<template>
  <btn />
</template>

What is expected?

Correct prompt

What is actually happening?

  1. Type '"enter"' is not assignable to type 'VOnModifiers'
  2. Type '"tab"' is not assignable to type 'VOnModifiers'

Image

System Info

Windows 11 24H2
Microsoft Edge 136.0.3240.64

Any additional comments?

No response

selicens avatar May 16 '25 08:05 selicens