Typescript class: "Overload signature is not compatible with function implementation"
<p>I created the following class:</p>

<pre><code>export class MyItem {
  public name: string;
  public surname: string;
  public category: string;
  public address: string;

  constructor();
  constructor(name:string, surname: string, category: string, address?: string);
  constructor(name:string, surname: string, category: string, address?: string) {
    this.name = name;
    this.surname = surname;
    this.category = category;
    this.address = address;
  }
}
</code></pre>

<p>I get the following error:</p>

<blockquote>
  <p>Overload signature is not compatible with function implementation</p>
</blockquote>

<p>I tried several ways to overload the constructor, the last one I tried is that I posted above (that I get from <a href="https://stackoverflow.com/questions/36557616/how-can-i-do-constructor-overloading-in-a-implemented-interface-in-typescript">here</a>).</p>

<p>But I still get the same error. What's wrong with my code?</p>