fix types

This commit is contained in:
kakkokari-gtyih 2025-09-13 18:50:36 +09:00
parent a8aeddfaf4
commit 548496e6ba
2 changed files with 3 additions and 4 deletions

View File

@ -20,10 +20,8 @@ export function useMkSelect<
: (TItemsValue | TInitialValue) : (TItemsValue | TInitialValue)
>(opts: { >(opts: {
items: TItemsInput; items: TItemsInput;
initialValue?: TInitialValue & ( initialValue?: (OptionValue extends TItemsValue ? OptionValue : TInitialValue) & (
OptionValue extends TItemsValue TItemsValue extends TInitialValue
? OptionValue
: TItemsValue extends TInitialValue
? unknown ? unknown
: { 'Error: Type of initialValue must include all types of items': TItemsValue } : { 'Error: Type of initialValue must include all types of items': TItemsValue }
); );

View File

@ -842,6 +842,7 @@ import FormSlot from '@/components/form/slot.vue';
import { i18n } from '@/i18n.js'; import { i18n } from '@/i18n.js';
import { instance } from '@/instance.js'; import { instance } from '@/instance.js';
import { deepClone } from '@/utility/clone.js'; import { deepClone } from '@/utility/clone.js';
import type { MkSelectItem, GetMkSelectValueTypesFromDef } from '@/components/MkSelect.vue';
const emit = defineEmits<{ const emit = defineEmits<{
(ev: 'update:modelValue', v: any): void; (ev: 'update:modelValue', v: any): void;