title: 'this' undefined in child class
body: <p>I can't use 'this' in the express route. Why is that? Because I need <code>this.postRepo</code> in class B's multiple methods. Any alternative way for this?</p>
  
  <pre class="lang-ts prettyprint-override"><code>// Parent
  export default abstract class A {
    // no constructor
    // few methods
  }
  
  // Child
  export default class B extends A {
    public postRepo: number
  
    constructor() {
      super();
      this.postRepo = 111;
    }
  
    public methodA(req?: Request, res?: Response): any {
      console.log(this); // undefined
      console.log(this.postRepo); // TypeError: Cannot read property 'postRepo' of undefined
    }
  
    // ...methods that required this.postRepo
  }
  
  // New
  const classB = new B();
  classB.methodA(); // &lt;--- this is working
  router.get("/", classB.methodA); // &lt;--- undefined
  </code></pre>