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;