I have this type:
export type InfoItemProps = (
| { inputType: 'dropdown-menu'; options: string[] }
| { inputType: 'text' }
| { inputType: 'date' }
| { inputType: 'text-aria' }
| { inputType: 'phone-number' }
) & {
name: string;
labelText: string;
value: string;
editValue: string;
editMode: boolean;
onEditValueChange: (inputName: string, value: string) => void;
};
But whenever i try to access options it complains that:
Property 'options' does not exist on type
'{ inputType: "text"; } & { name: string; labelText: string; value: string;
editValue: string; editMode: boolean; onEditValueChange: (inputName: string, value: string) => void; }'.
What is going on? How to fix it?