title: How to create an object type from tuple of objects?
body: <p>From this data structure :</p>
  <pre class="lang-js prettyprint-override"><code>const properties = [
    { name: 'name', type: '' },
    { name: 'age', type: 0 },
    { name: 'sex', type: ['m', 'f'] as const },
    { name: 'username', type: '' }
  ]
  </code></pre>
  <p>I am trying to construct -dynamically- the following type :</p>
  <pre class="lang-js prettyprint-override"><code>type Person = {
    name: string;
    age: number;
    sex: 'm'|'f';
    username: string;
  }
  </code></pre>
  <p>I know TypeScript has the means to create types by mapping other types. But here the source Object is an Array so it seems a little bit tricky. How would I do that?</p>