title: Combine dynamic list of object types into one large object type
body: <p>I have a dynamically generated type that produces an array where each element can be any of a set of types like so:</p>
  <pre><code>type Elements = (TypeA | TypeB | TypeC | ...)[] // this is dynamically generated
  </code></pre>
  <p>I have a way to extract each type in the array to a general &quot;or&quot; type without issues</p>
  <pre class="lang-js prettyprint-override"><code>type IndividualElements = ArrayTypes&lt;Elements&gt;
  // the above is results in dynamically generating this type:
  type IndividualElements = TypeA | TypeB | TypeC | ...
  </code></pre>
  <p>This works, but now I'd like to set up an object that contains every key/value from all types in the array. Basically creating a large object combining all properties, kind of like this except dynamically:</p>
  <pre class="lang-js prettyprint-override"><code>type CombinedElement = TypeA &amp; TypeB &amp; TypeC &amp; ...
  </code></pre>
  <p>I could write this out manually, but since each type is generated from a JSON schema automatically I'd rather have a type mechanism to do it dynamically. Is this possible?</p>