title: Index signature in React props
body: <p>I'm looking for a correct way to describe React props type in TS.</p>
  
  <p>My component props is something like:</p>
  
  <pre class="lang-js prettyprint-override"><code>interface Props {
    prop1: number,
    prop2: string,
  }
  </code></pre>
  
  <p>But my components also accepts classNames as a prop (e.g. <code>_myClassName</code> well be converted to class <code>my-class-name</code>).</p>
  
  <p>With props type above TS prints error <code>_myClassName doesn't exist on type Props</code>.
  I've tried to change Props to:</p>
  
  <pre class="lang-js prettyprint-override"><code>interface Props{
    prop1: number,
    prop2: string,
    [className: string]: any,
  }
  </code></pre>
  
  <p>But in that case TS doesn't check type of prop1 and prop2. The following code will not produce error:</p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;MyComponent prop1="some-string" /&gt; // prop1 must be a number
  </code></pre>
  
  <p>So, is there a correct way to handle such cases?</p>