title: Typescript: How overload function in interface
body: <p>I want to extends a native javascript type in typescript. This is possible using an interface to declare extended properties.
  But how to declare overloaded properties ?</p>
  
  <pre><code>interface HTMLElement {
      add:(a:string)=&gt;void; // error: add is duplicate
      add:(a:boolean)=&gt;void;
  }
  
  HTMLElement.prototype.add = function (a):void{
      if(typeof a=="string"){
  
      }
      else if(typeof a=="boolean"){
  
      }
  }
  
  class HTMLElement2 {
      add(a:string):void; // ok
      add(a:boolean):void;
      add(a):void{
          if(typeof a=="string"){
  
          }
          else if(typeof a=="boolean"){
  
          }
      }
  }
  </code></pre>
  
  <p>Thank you</p>