title: In Typescript what does a type annotation with two types between two curly braces mean?
body: <p>An example: </p>
  
  <pre><code>function doSomething(): { string, SomeClass } {
   ...
  } 
  </code></pre>
  
  <p>From playing around with the compiler it seems that it will accept any return value that is an object with any number of <code>string</code> keys and <code>SomeClass</code> values.</p>
  
  <p>So something like this:</p>
  
  <pre><code>{
   "key1": someClass1,
   "key2": someClass2,
    ...
  }
  </code></pre>
  
  <p>Is my understanding correct? </p>
  
  <p>--Update--</p>
  
  <p>It seems like the annotation I need is <code>{ [key: string]: SomeClass }</code> </p>