title: how typescript comparing two objects?
body: <p>I have one class called <code>tax</code>.</p>
  
  <pre><code>    export class tax {
          private _id: string;
          private _name: string;
          private _percentage: number;`
  
          constructor(id: string = "", taxName: string = "", percentage: number = 0) {
              this._id = id;
              this._name = taxName;
              this._percentage = percentage;
          }
  
  
          public get id(): string {
              return this._id;
          }
  
          public set id(v: string) {
              this._id = v;
          }
          public get name(): string {
              return this._name;
          }
  
          public set name(v: string) {
              this._name = v;
          }
          public get percentage(): number {
              return this._percentage;
          }
  
          public set percentage(v: number) {
              this._percentage = v;
          }
  
          toString(){
              return this.id;
          }
      }
  </code></pre>
  
  <p>When I create 2 different objects of this class</p>
  
  <pre><code>    a1: tax = new tax("id","name",4);
      a2: tax = new tax("id","name",4); 
  
      console.log(a1 === a2); //false
      console.log(a1 == a2); //false
  </code></pre>
  
  <p>When I give a1 === a2 it should give true.
  what <strong>changes</strong> i have to do in my class so it will give a1 === a2 ?
  What I have to do in tax class? or which method I have to override in tax class?</p>