title: Typescript array of different generic types
body: <p>If I have an array <code>a</code> where each element is an object consisting of two properties <code>first</code> and <code>second</code>, how should I declare `a's type such that the following is always satisfied?</p>
  
  <pre><code> ForAll(x in a)(type(x.first) == T iff type(x.second) == (T =&gt; string))
  </code></pre>
  
  <p>I.e., I want to make sure that, for example, <code>a[3].second(a[3].first)</code> is typesafe.</p>