title: TypeScript: Map has key (object) not working
body: <p>I'm having some troubles while checking if a map already has an object as key.</p>
  
  <p>e.g.</p>
  
  <pre><code>const myMap: Map&lt;MyObject1, MyObject2&gt; = new Map&lt;MyObject1, MyObject2&gt;();
  </code></pre>
  
  <p>I also defined an equals function in MyObject1 class</p>
  
  <pre><code>equals(other: ThreatAgentMgm): boolean {
      return other.id === this.id;
  }
  </code></pre>
  
  <p>but <code>myMap.has(myObject1)</code> is always false.
  I read theat the has method is based on the === operator, should I define something else in MyObject1 class?</p>