title: How to declare a TypeScript property to accept React class component?
body: <p>There is a React component:</p>
  <pre><code>class MyComponent extends React.Component&lt;
    IMyComponentInterfaceWithProps
  &gt; { ... }
  </code></pre>
  <p>Now, in other place in the app, I would like to pass this component as follows:</p>
  <pre><code>routes = (&lt;MyComponent /&gt;);
  </code></pre>
  <p>How to declare a type for routes object using TypeScript?</p>
  <p>Something like:</p>
  <pre><code>let routes = typeof MyComponent // (this does not work!)
  </code></pre>
  <p>When I try the above I get an error:</p>
  <blockquote>
  <p>Type '{}' is missing the following properties from type
  'Pick&lt;Readonly &amp; Readonly&lt;{ children?:
  ReactNode; }&gt;, &quot;IMyComponentInterfaceWithProp1&quot; |
  &quot;IMyComponentInterfaceWithProp2&quot; |
  &quot;IMyComponentInterfaceWithProp3&quot; | ... 5 more ... | &quot;children&quot;&gt;':
  IMyComponentInterfaceWithProp4, IMyComponentInterfaceWithProp5,
  IMyComponentInterfaceWithProp6, IMyComponentInterfaceWithProp7, and 3
  more.&quot;,</p>
  </blockquote>