title: Type 'X' cannot be used as an index type
body: <p>I receive en error in typescript:</p>
  
  <blockquote>
    <p>message: 'Type 'TransitionStyles' cannot be used as an index type.'</p>
  </blockquote>
  
  <p>I would like to know if it is possible to change my interface so it can also be used and an <code>index type</code>:</p>
  
  <pre><code>export interface TransitionStyles {
    entering: Object
    entered: Object
    exiting: Object
    exited: Object
    [key: string]: Object
  }
  </code></pre>
  
  <p>or I am forced to use a different interface as:</p>
  
  <p><code>export type TransitionState = 'entering' | 'entered' | 'exiting' | 'exited'
  </code></p>