title: How to define Map as argument in angular TypeScript method?
body: <p>I would need some help, because I am stuck. I have problems defining a simple method in angular4 (TypeScript) that gets an argument of the type Map. All I want is to iterate over the elements in the <code>Map</code>. Nothing special.</p>
  
  <p>When I try to iterate over the Map object <code>map2</code> I get the following error.</p>
  
  <p>Error: <code>ERROR TypeError: map2.forEach is not a function</code></p>
  
  <pre><code>doStuff(map2: Map&lt;string, string&gt;):number{
    //I get an ERROR here, because map2 is not recognised as a Map()?
    map2.forEach((value: string, key: string) =&gt; {
    console.log(key, value);  
    });
  
    let map = new Map();
    map.set("A","B");
    map.set("C","d");
  
    console.log(map.get("A")+" :"+ map.size);
    //THIS WORKS
    map.forEach((value: string, key: string) =&gt; {
    console.log(key, value);
     });
      }
  });
  </code></pre>
  
  <p>This is how I call the method from another method</p>
  
  <pre><code>...
  //some other method
  let map4 = JSON.parse('{ "myString": "string", "myNumber": "4" }');
  this.myNumber = this.doStuff(map4);
  ...
  </code></pre>