title: Specify a function's type inline with typescript
body: <p>Is there a way in typescript to define the type of a function (note: not an arrow function) in typescript?</p>
  
  <p>I'm aware of the following method:</p>
  
  <pre><code>const MyFunctionCreator = (): MyFunction =&gt; {
      return function(input) {
          return "";
      };
  };
  </code></pre>
  
  <p>However, I am trying to set the type of a static function inside a class, so this is not ideal.</p>
  
  <pre><code>class MyClass {
      static function(input) {
          return "";
      }
  }
  </code></pre>
  
  <p>Is there a way in the example above to do something like:</p>
  
  <pre><code>class MyClass {
      static myFunction: MyFunction(input) {
          return "";
      }
  
      static myFunction(input) {
          return "";
      } as MyFunction
  }
  </code></pre>
  
  <p>I can of course re-type the param/return types every time, but I wish to share types across my classes.</p>