title: Access object properties from typescript
body: <p>Having a *.d.ts file with the following definition:</p>
  
  <pre><code>class StateManager {
      states(key:string): Phaser.State;
  </code></pre>
  
  <p>Can be accessed in two ways:</p>
  
  <pre><code>myStateManager.states[key]
  myStateManager.states(key)
  </code></pre>
  
  <p>But only the first will actually work due to the JS definition of states:</p>
  
  <pre><code>this.states = {};
  </code></pre>
  
  <p><strong>Is there a way to force the correct notation in typescript?</strong></p>