From 548496e6bae7efadb1a198813e09ac4bcea2f551 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sat, 13 Sep 2025 18:50:36 +0900 Subject: [PATCH] fix types --- packages/frontend/src/composables/use-mkselect.ts | 6 ++---- packages/frontend/src/pages/admin/roles.editor.vue | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/composables/use-mkselect.ts b/packages/frontend/src/composables/use-mkselect.ts index 6c50c40abb..538058a58f 100644 --- a/packages/frontend/src/composables/use-mkselect.ts +++ b/packages/frontend/src/composables/use-mkselect.ts @@ -20,10 +20,8 @@ export function useMkSelect< : (TItemsValue | TInitialValue) >(opts: { items: TItemsInput; - initialValue?: TInitialValue & ( - OptionValue extends TItemsValue - ? OptionValue - : TItemsValue extends TInitialValue + initialValue?: (OptionValue extends TItemsValue ? OptionValue : TInitialValue) & ( + TItemsValue extends TInitialValue ? unknown : { 'Error: Type of initialValue must include all types of items': TItemsValue } ); diff --git a/packages/frontend/src/pages/admin/roles.editor.vue b/packages/frontend/src/pages/admin/roles.editor.vue index 2d809954d1..e134ca6538 100644 --- a/packages/frontend/src/pages/admin/roles.editor.vue +++ b/packages/frontend/src/pages/admin/roles.editor.vue @@ -842,6 +842,7 @@ import FormSlot from '@/components/form/slot.vue'; import { i18n } from '@/i18n.js'; import { instance } from '@/instance.js'; import { deepClone } from '@/utility/clone.js'; +import type { MkSelectItem, GetMkSelectValueTypesFromDef } from '@/components/MkSelect.vue'; const emit = defineEmits<{ (ev: 'update:modelValue', v: any): void;