While examining some code written by another developer, I came across the syntax defineProps<({})>()
. After doing some research, I couldn't find any resources that helped me understand this particular syntax.
My Way of Defining Props
defineProps({
})
How others define props
defineProps<({
})>()
I'm curious to know the difference between these two syntaxes.
Thank you in advance for your insights.
I'm still learning about defining props in Vue 3 script setup and wasn't aware of these two different syntax options. This question is my attempt to better understand both variations.