title: Typescript - Property does not exist on type when attempting to extend a Class prototype
body: <p>I'm using Typescript and FabricJS, and I'm attempting to extend the 'Point' class. Here's what it looks like:</p>
  
  <pre><code>export class Point {
      x: number;
      y: number;
  
      constructor(x: number, y: number);
  
      add(that: Point): Point;
      addEquals(that: Point): Point;
      // ...(more methods)
  }
  </code></pre>
  
  <p>Here's my attempt to extend it and add a method, in another file:</p>
  
  <pre><code>import { Point } from 'fabric/fabric-impl';
  
  export interface Point {
      a(): any;
  }
  Point.prototype.a = function () { }; // line that gives error
  </code></pre>
  
  <p>Here I get the error <code>"[ts] Property 'a' does not exist on type 'Point'. [2339]".</code></p>
  
  <p>I'm able to get something similar to this working using Typescript's 'extends', by creating a subclass:</p>
  
  <pre><code>interface myPoint {
      a: any;
  }
  
  class myPoint extends Point {    
      constructor(x: number, y: number) {
          super(x, y);
      }
  
  }
  myPoint.prototype.a = function () { };
  </code></pre>
  
  <p>This works fine, but I'd rather add directly the method directly to the Point class. Any ideas on what's wrong?</p>