From 1553825719ae0f6230cdd29f22786d553b07b6dc Mon Sep 17 00:00:00 2001 From: Sebin Nyshkim Date: Tue, 5 Sep 2023 22:49:23 +0200 Subject: [PATCH] refactor: add type definition for emits --- src/components/LocaleSwitcher.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/LocaleSwitcher.vue b/src/components/LocaleSwitcher.vue index ab21fbd..d86d7cb 100644 --- a/src/components/LocaleSwitcher.vue +++ b/src/components/LocaleSwitcher.vue @@ -15,8 +15,12 @@ interface Props { locales: LocaleOption[] } +interface Emits { + (e: 'update:modelValue', value: string): void +} + const props = defineProps() -const emit = defineEmits(['update:modelValue']) +const emit = defineEmits() const selectModel = computed({ get() {