title: Property does not exist in self-referencing interface implementation in Typescript
body: <p>I am still new at Typescript, can someone explain to me where I did wrong here? Is it expected behavior or bug?</p>
  
  <pre class="lang-js prettyprint-override"><code>// interfaces/ValueObject.ts
  
  export interface ValueObject {
    equals&lt;T extends ValueObject&gt; (valueObject: T): boolean;
    toString (): string;
  }
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>// values/Age.ts
  
  export class Age implements ValueObject {
    constructor (
      public readonly value: number,
    ) {}
  
    equals&lt;Age&gt; (anotherAge: Age): boolean {
      return anotherAge.value === this.value;
    }
  
    toString () {
      return `${this.value} year{this.value === 1 ? '' : 's'} old`;
    }
  }
  </code></pre>
  
  <p>Somehow I got the following error on compilation: <code>Property 'value' does not exist on type 'Age'.</code> But I did declare the property value in the constructor, did I do something wrong?</p>