title: How to compare typescript type?
body: <p>How can I compare typescript types in this scenario</p>
  <pre><code>interface TableParams extends TableProps {
    data: Array&lt;object&gt; | JSX.Element
  }
  
  export const BasicTable = ({ data}: TableParams) =&gt; {
    if(typeof data == Array&lt;object&gt;){ // typeof data = object
      //do something
    }
    
    if(typeof data == JSX.Element){ //typeof data = object
      //do something 
    }
  }
  </code></pre>
  <p>So I can pass an array of objects or a JSX element. If an array passed through the props I'd like to do something if a JSX element passed I'd like to simply return it.</p>