ts一直报这种错误,有木有对vue3+ts有了解的大大解答一下怎么解决
<template>
<button @click="add">add num</button>
</template>
<script lang="ts" setup>
const props = defineProps<{
modelValue: number
}>()
const emit = defineEmits<{
(event: 'update:modelValue', i: number): void
}>()
let i = 0
const add = () => {
i++
emit('update:modelValue', i)
}
</script>