type BackgroundColor = 'white' | 'light-grey'; type Size = 'small' | 'tiny'; type MultiSelect = 'multiple-select'; type ModifierCombination = | [BackgroundColor, Size?, MultiSelect?] | [Size, BackgroundColor?, MultiSelect?] | [MultiSelect, BackgroundColor?, Size?] | [BackgroundColor, MultiSelect, Size?] | [Size, MultiSelect, BackgroundColor?] | [MultiSelect, Size, BackgroundColor?]; type SelectListModifierConfig = { 'o-select-list': ModifierCombination; }; export type SelectListModifier = { [P in keyof SelectListModifierConfig]: { prefix: P; modifiers: SelectListModifierConfig[P]; }; }[keyof SelectListModifierConfig]; export type ModifierItems = SelectListModifier[] | ModifierCombination;