I have a component, It takes arguments such as :
interface Props { label: string; children?: React.ReactNode; withoutActions?: boolean; fieldKey?: KeyProperties; corporate: Corporate;}
The withoutActions and fieldKey are used by a form.If the withoutActions prop is true, then there should not be a provided fieldKey.
However, if my withoutActions is undefined, then i should enforce my fieldLabel to be of type **KeyProperties**
which is a specific list of available values for it.
If withoutActions is undefined, the other SHOULD NOT be defined at allIf withoutActions is true, the other SHOULD be defined respecting the specific keyProperties type.
How can i implement that ?