Imagine I have the following type
type BannerConditions = {
publication_id?: number;
product_id?: number;
resource?: string;
type: string;
};
But publication_id and product_id can only exist if resource exists. Can I define it somehow?