title: Error: Cannot invoke an expression whose type lacks a call signature
body: <p>I am brand new to typescript, and I have two classes. In the parent class I have:</p>
  
  <pre><code>abstract class Component {
    public deps: any = {};
    public props: any = {};
  
    public setProp(prop: string): any {
      return &lt;T&gt;(val: T): T =&gt; {
        this.props[prop] = val;
        return val;
      };
    }
  }
  </code></pre>
  
  <p>In the child class I have:</p>
  
  <pre><code>class Post extends Component {
    public toggleBody: string;
  
    constructor() {
      this.toggleBody = this.setProp('showFullBody');
    }
  
    public showMore(): boolean {
      return this.toggleBody(true);
    }
  
    public showLess(): boolean {
      return this.toggleBody(false);
    }
  }
  </code></pre>
  
  <p>Both showMore and ShowLess give me the error, "Cannot invoke an expression whose type lacks a call signature."</p>
  
  <p>But the function that setProp returns DOES have a call signature, I think? I think I'm misunderstanding something important about typings of functions, but I don't know what it is.</p>
  
  <p>Thanks!</p>