What are Vue 3’s defineEmits and defineProps in the Composition API, and why are they useful?

defineProps and defineEmits streamline prop passing and event emitting within setup functions. They improve type inference and readability by defining these properties directly in the setup function, providing a cleaner, TypeScript-compatible syntax.