defineEmits — typed emits.
1<script setup lang="ts">2const emit = defineEmits<{3 (e: "update", value: string): void4 (e: "delete", id: number): void5 (e: "submit", data: FormData): void6}>()78function handleClick() {9 emit("update", "new value")10}11</script>
With validation:
1<script setup lang="ts">2const emit = defineEmits<{3 (e: "update", value: string): void4}>()56// Runtime validation7const emit = defineEmits({8 update: (value: string) => typeof value === "string"9})10</script>