title: Typescript - Higher order function types
body: <p>I'm getting really excited about TypeScript. How do you set the type of a function parameter?</p>
  
  <pre><code>function twoMoreThanYou(calculateANumber: Function):number {
      return calculateANumber(4) + 2;
  }
  
  function double(n:number):number {
      return n*2;
  }
  
  console.log("TWO MORE", twoMoreThanYou(double))
  </code></pre>
  
  <p>How can I type <code>calculateANumber</code> better? I'd like to specify that it must be a function that takes a number and returns a number.</p>
  
  <p>Can I then make an "interface" or some shorthand for that type so I can make my higher order function signatures more readable?</p>