title: Use typescript to extend the generic keys of a generic object input
body: <p>I have the following typescript code:</p>
  <pre><code>type StrictPropertyCheck&lt;T, TExpected&gt; = Exclude&lt;keyof T, keyof TExpected&gt; extends never ? Record&lt;string, unknown&gt; : 'TypeWithStrictPropertyCheck';
  
  export const check = &lt;
      T1 extends Record&lt;string, string | string[]&gt;,
      T2 extends T1 &amp; StrictPropertyCheck&lt;T2, T1&gt;,
    &gt;(arg: {
      myKey: [T1, ...T2[]]
    }): {
      myKey: T1[]
    } =&gt; {
    return arg
  }
  
  export const template = check({
    myKey: [{
      a: '',
      b: [''],
      c: ['', '']
    }, {
      a: '',
      b: [''],
      c: ['', '']
    }]
  })
  </code></pre>
  <p>The <code>check</code> function checks that all the objects in the array <code>myKey</code> has the same keys and key types for each index.</p>
  <p>How can I instead of explicitly typing <code>myKey</code> in the function <code>arg</code> input, accept any number of keys with any given name, and still have the same check performed for each array related to the individual key?</p>
  <p>In short; I would like <code>arg</code> to accept any key instead of an explicit one.</p>
  <p>EDIT:</p>
  <p>The array for each <code>arg</code>-key should consist of objects, where the key-names in every object is exactly the same as the key-names in the first object in the array. Additionally, the key-type of each object-key in every object, must match the key-type of the corresponding key-name in the first object. The key-types in each object can either be <code>string[]</code> or <code>string</code>.</p>
  <p>(this is what the check function does, just not for any <code>arg</code>-key)</p>