defineEmits() type cannot use computed keys
Vue version
>= 3.3.0.alpha.7
Link to minimal reproduction
Steps to reproduce
<script setup lang="ts">
const emit = defineEmits<{
'update:modelValue': [value: string]
}>();
</script>
What is expected?
Should compile component without error.
What is actually happening?
Error: [@vue/compiler-sfc] defineEmits() type cannot use computed keys.
App.vue
8 |
9 | const emit = defineEmits<{
10 | 'update:modelValue': [value: string]
| ^^^^^^^^^^^^^^^^^^^
11 | }>();
12 | </script>
It seems bug was introduced in commit https://github.com/vuejs/core/commit/ef73ea53eaf853d43e70946d2d448ae8c0a83e4f