From 1966cc3c0e7a590651db2a5bd0acdcd83e948aa7 Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Sat, 6 Jul 2024 12:11:38 +0200 Subject: [PATCH] feat: type defineEmits for ApiConfig --- frontend/src/components/misc/ApiConfig.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/misc/ApiConfig.vue b/frontend/src/components/misc/ApiConfig.vue index 9f7893a41..073d6afcb 100644 --- a/frontend/src/components/misc/ApiConfig.vue +++ b/frontend/src/components/misc/ApiConfig.vue @@ -71,14 +71,14 @@ import {success} from '@/message' import Message from '@/components/misc/Message.vue' import ButtonLink from '@/components/misc/ButtonLink.vue' -const props = defineProps({ - configureOpen: { - type: Boolean, - required: false, - default: false, - }, +const props = withDefaults(defineProps<{ + configureOpen?: boolean +}>(), { + configureOpen: false, }) -const emit = defineEmits(['foundApi']) +const emit = defineEmits<{ + 'foundApi': [url: string], +}>() const apiUrl = ref(window.API_URL) const configureApi = ref(window.API_URL === '')