refactor: add type definition for emits

This commit is contained in:
Sebin Nyshkim 2023-09-05 22:49:23 +02:00
parent f1961f5cef
commit 1553825719

View file

@ -15,8 +15,12 @@ interface Props {
locales: LocaleOption[] locales: LocaleOption[]
} }
interface Emits {
(e: 'update:modelValue', value: string): void
}
const props = defineProps<Props>() const props = defineProps<Props>()
const emit = defineEmits(['update:modelValue']) const emit = defineEmits<Emits>()
const selectModel = computed({ const selectModel = computed({
get() { get() {