title: TypeScript: Property 'propertyName' does not exist on type 'Function'
body: <p>TypeScript compiler is giving me an error on the following code example although the generated JavaScript on <a href="https://www.typescriptlang.org/play/" rel="noreferrer">https://www.typescriptlang.org/play/</a> works as intended</p>
  
  <p>The error is: <strong><em>error TS2339: Property 'tableName' does not exist on type 'Function'.</em></strong></p>
  
  <pre><code>class ActiveRecord {
      static tableName(): string { // override this
          return "active_record";
      }
  
      static findOne(): any {
          return 'Finding a record on table: ' + this.tableName();
      }
  
      save(): void {
          console.log('Saving record to table: ' + this.constructor.tableName());
      }
  }
  
  class MyModel extends ActiveRecord {
      static tableName(): string {
          return "my_model";
      }
  }
  
  let x = new MyModel();
  x.save(); // "Saving record on table: my_model"
  console.log(MyModel.findOne()); // "Finding a record on table: my_model"
  </code></pre>
  
  <p>Is there is anything I can do to fix this error?</p>