type BackgroundColorModifier = 'white' | 'light-grey' | 'blue-20'; type FullWidth = 'full-width'; type TeaserImageModifierCombination = [BackgroundColorModifier, FullWidth?] | [FullWidth, BackgroundColorModifier?]; type TeaserHeadingModifierCombination = ['large']; type TeaserModifierConfig = { 'c-teaser__image': TeaserImageModifierCombination; 'c-teaser__heading': TeaserHeadingModifierCombination; }; export type TeaserModifier = { [P in keyof TeaserModifierConfig]: { prefix: P; modifiers: TeaserModifierConfig[P]; }; }[keyof TeaserModifierConfig]; /** * Represents the possible types for modifier items in an Teaser configuration. * It can either be an array of `TeaserModifier` or a single `ModifierCombination` for shorthand usage. */ export type ModifierItems = TeaserModifier[]; export {};