title: Extending and defining function signatures in TypeScript
body: <p>Is it possible to assign a function signature to a name?</p>
  
  <p>For example, some external module provides an interface</p>
  
  <pre><code>interface ExtFunctionInterface {
      (arg1: string, arg2: number): boolean
  }
  </code></pre>
  
  <p>I would like to create a local interface or abstract class that assigns the above interface signature, to a method name. For example:</p>
  
  <pre><code>interface MyLocalInterface {
      someMethodName typeof ExtFunctionInterface 
  }
  </code></pre>
  
  <p>or </p>
  
  <pre><code>abstract class MyLocalAbstractClass {
      public abstract someMethodName typeof|signature of ExtFunctionInterface 
  }
  </code></pre>
  
  <p>So that when the interface is implemented or the class is extended:</p>
  
  <pre><code>class MyClass {implements|extends} MyLocal{Interface|AbstractClass} {
  
      // Correct impl
      public someMethodName(arg1: string, arg2: number): boolean {
          // impl
      }
  
      // Compiler would complain that the function is not implemented
      // correctly because "arg2" is missing or type is wrong for e.g.
      public someMethodName(arg1: string): boolean {
          // impl
      }
  
  }
  </code></pre>
  
  <p>This means that when ExtFunctionInterface is changed, the compiler would notify that the signature is incorrect.</p>