title: Use the type of a class or interface method
body: <p>To give this question a bit of context, I have a child component which calls a callback provided by its parent. <strong>This is a typical scenario in AngularJS.</strong>
  <br>Since I'm using TypeScript, <strong>I'd like to strongly type the callback in the child component</strong>. </p>
  
  <p>Here's the initial state without any strong typings:</p>
  
  <pre><code>class ParentComponentController {
    public parentMethod(param1: number, param2: string): boolean {
      return param1 &gt; 0 &amp;&amp; param2.length &gt; 2;
    }
  }
  
  class ChildComponentController {
    constructor(private parentMethod: Function) {}
  
    public onCertainTrigger() {
      this.parentMethod(10, 'something');
    }
  }
  </code></pre>
  
  <p>This is how I can achieve a strong typing but it seems so messy: </p>
  
  <pre><code>declare type parentMethod = (param1: number, param2: string) =&gt; boolean;
  
  interface ICommonApi {
    parentMethod: parentMethod;
  }
  
  class ParentComponentController implements ICommonApi {
    public parentMethod(param1: number, param2: string): boolean {
      return param1 &gt; 0 &amp;&amp; param2.length &gt; 2;
    }
  }
  
  class ChildComponentController {
    constructor(private parentMethod: parentMethod) { }
  
    public onCertainTrigger() {
      this.parentMethod(10, 'something');
    }
  }
  </code></pre>
  
  <p>Ideally, I envision this as a one-liner. Is something like this possible?</p>
  
  <pre><code>class ParentComponentController   {
    public parentMethod(param1: number, param2: string): boolean {
      return param1 &gt; 0 &amp;&amp; param2.length &gt; 2;
    }
  }
  
  class ChildComponentController {
    // This results in an error
    constructor(private parentMethod: ParentComponentController.parentMethod) {}
  
    public onCertainTrigger() {
      this.parentMethod(10, 'something');
    }
  }
  </code></pre>