I would like to know if there is a way to check types in runtime with TypeScript in this scenario. The scenario is just for illustrative purposes.
const SomeReactComponent = ({ children, inverseOrientation }) => {
const header = findByType('ComponentHeader', children);
const content = findBytype('ComponentContent', children);
const footer = findByType('ComponentFooter, children);
if(inverseOrientation) return <div> {[footer,content,header]} </div>;
return <div>{children}</div>;
}