title: Typescript generics: readonly values from interface children
body: <p>Given this input:</p>
  <pre class="lang-js prettyprint-override"><code>export type Test = {
      one: {
          a: string;
          b: string;
          c: string;
      };
      two: {
          a: string;
          b: string;
          d: string;
      };
  }
  </code></pre>
  <p>I need a generics like <code>CombinedChildren&lt;T&gt;</code> which outputs the following type:</p>
  <pre class="lang-js prettyprint-override"><code>export type Combined = {
      a?: string;
      b?: string;
      c?: string;
      d?: string;
  }
  </code></pre>
  <p>Basically, it takes the children properties and combines them, <em>including them even if they're not present in all children</em>.</p>
  <p>Tried</p>
  <pre class="lang-js prettyprint-override"><code>export type KeyOfTest = Partial&lt;Test[keyof Test]&gt;
  export type MappedKeyOfTest = Partial&lt;{
      [key in keyof Test[keyof Test]]: Test[keyof Test][key]
  }&gt;
  </code></pre>
  <p>But none output exactly what I want.</p>