title: typescript overloading class methods - same return type, different parameters
body: <p>I've got a typescript class:</p>
  
  <pre><code>class ContactModel {
  
      public getUsage(type: string): restangular.IElement {
        return this.getBase().one('usages', type);
      }
  
      public getUsage(customerId: number, type: string): restangular.IElement {
        return this.ModelFactory.createRequestMapper(ContactModel.options)
          .one('customers', customerId).all('contacts/usages', type);
      }
  
      //...
  }
  </code></pre>
  
  <p>which causes the compiler to throw following error:</p>
  
  <pre><code>&gt;&gt; app/modules/common/model/ContactModel.ts(27,12): error TS2393: Duplicate function implementation.
  &gt;&gt; app/modules/common/model/ContactModel.ts(31,12): error TS2393: Duplicate function implementation.
  </code></pre>
  
  <p>The only difference I see between this example and the <a href="http://www.typescriptlang.org/Handbook#functions-overloads" rel="noreferrer">TypeScript Handbook</a> is that their examples have different return types and I've got the same return types (both cases have different input parameters).</p>
  
  <p>The question is: what am I doing wrong - or do typescript class methods need to have different method argument types to allow overloading? That seems stupid, since both .Net and Java support overloading with same return types and different input types.</p>