title: convert typescript interface structure to react proptypes
body: <p>I have a dummy project with react and type script.in my project i used typescript interface and react proptypes together.but i have a problem.i can't convert my interfaces to proptypes.</p>
  <p>this my code</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React from 'react';
  import PropTypes from 'prop-types'; 
  
  interface IMyComponent1 {
      type: 'type1';
      id?: string;
      name?: string;
      items?: [
          { name: string, id: string, url: string, badge: { title: string, color: string } }
      ]
  }
  
  interface IMyComponent2 {
      type: 'type2';
      id?: string;
      question?: string;
      answer?: string;
  }
  
  type IMyComponent = IMyComponent1 | IMyComponent2;
  
  const MyComponent: React.FC&lt;IMyComponent&gt; = props =&gt; {
      return (
          &lt;div&gt;
  
          &lt;/div&gt;
      );
  };
  
  MyComponent.propTypes = {
  
  };
  
  export default MyComponent;</code></pre>
  </div>
  </div>
  </p>
  <p>can any one help me for create react proptypes according to IMyComponent interface.</p>