title: Convert Map to Record in typescript
body: <p>I have a use case in which I am creating a metric using Math Expression-</p>
  <pre><code>new MathExpression({
    expression: `SUM([${Object.keys(metricArguments).join(&quot;, &quot;)}])`,
    usingMetrics: metricArguments,
  })
  </code></pre>
  <p>Here metricArguments is a <code>Map&lt;string,IMetric&gt;</code> but <code>usingMetrics</code> need <code>Record&lt;string,IMetric&gt;</code> type.I wanted to ask how can I convert a <code>Map&lt;string,Imetric&gt;</code> into <code>Record&lt;string,Imetric&gt;</code> as I have my metrics stored in map.
  I could also have inserted the metric in a Record type instead of map but could not find any method to do it.</p>