title: TypeScript: Function interface as a callable inside a class
body: <p>I want to create an function interface, that can act as a callable inside a class.</p>
  
  <p>So basically what I want to do is the following:</p>
  
  <pre><code>interface Callable {
      (x: number): number;
      someAdditionalStuff?: any;
  }
  
  class Foo {
      doSomething: Callable (x: number) {
          return x + 3;
      }
  }
  </code></pre>
  
  <p>I know that <code>Foo.doSomething</code> hasn't the correct syntax.</p>
  
  <p>I wondered if this is somehow possible to achieve?</p>
  
  <p><strong>Update:</strong> To make it little bit more clear. What I want is, that the type of <code>doSomehting</code> is <code>Callable</code>. But I want to flesh out the function body in the class, not in the interface and I don't want that you have to set <code>someAdditionalStuff</code> anywhere in the class or function implementation.</p>
  
  <p>The target is, that I can add stuff to the class member, that are different, each time I create a new instance of the class.</p>