I have a component that gets 2 props, one is another component and the second is a JSON file:
interface HeaderProps {
title: ReactElement<typeof Title>;
data: any;
}
The prop 'title' is very specific and shows that only the component <Title /> can be passed there.
How can I specify the type of the prop data so instead of any it will be for JSON type only?