title: How to initialize map with elements in typescript?
body: <p>I woule like to create this map and add few elements to it while initialization. The key should be the name of the person.
  How this can be achieved?</p>
  
  <pre><code> let person1: Person = ...
   let person2: Person = ...
   let map: { [key: string]: Person } = {
          person1.name = person1,
          person2.name = person2
        };
  </code></pre>
  
  <p>but this doesn't compile. How to put some elements inside?</p>