I have a Select component that accepts an array of options. Each option can be an object of anything as long as it has the following attributes id and text
So I typed it like this:
type SelectOption<T> = {
id: string | number
text: string
} & T
But I'm not sure how to use this with defineProps and also defineEmits in the component.
defineProps<{
options: SelectOption<??>
modelValue: SelectOption<??>
}>()
defineEmits<{
(event: 'update:modelValue', SelectOption<??>): void
}>()