title: Typescript Function Interface
body: <p>Why doesn't Typescript warn me that the function I am defining does not match the interface declaration, but it does warn me if I try to invoke the function.</p>
  
  <pre><code>interface IFormatter {
      (data: string, toUpper : boolean): string;
  };
  
  //Compiler does not flag error here.
  var upperCaseFormatter: IFormatter = function (data: string) {
      return data.toUpperCase();
  }  
  
  upperCaseFormatter("test"); //but does flag an error here.
  </code></pre>