title: How to create a Map of different type of value in typescript
body: <p>I have started learning Typescript and I was trying to create a map with different type of values, but it's not working.
  I tried directly giving <code>string</code> and <code>number</code> as an options while defining the <code>Map</code> but it's throwing error that we are unable to map <code>number</code> to <code>string</code></p>
  <pre><code>const testMap: Map&lt;string,string|number&gt; = new Map([[&quot;a&quot;, &quot;test1&quot;],[&quot;b&quot;,&quot;test2&quot;],[&quot;c&quot;,1]]);
  </code></pre>
  <p>Please suggest.</p>
  <p><a href="https://www.typescriptlang.org/play?#code/MYewdgzgLgBFCm0CyBDADgLhqtAeaATgJZgDmANDISaTAD4xgCuAtgEbwEB8MAvI-ADu2dAAoA2uIBEKKZSkJoARikBdStLZyYCxFABMajVODalq1QEoA3EA" rel="nofollow noreferrer">Playground</a></p>