From Vue 3.3 is possible to define emits in TypeScript like this
<script setup lang="ts">
const emit = defineEmits<{
change: [id: number]
update: [value: string]
}>()
</script>
How can I do it if I want a return type different from void
, like a String
?