title: Typescript: why function without parameters can be cast to function with parameters
body: <p>Why there aren't any compilation errors in this code?
  Code:</p>
  
  <pre><code>function partial(f: (a: string) =&gt; string, a: string) : string {
    return "";
  }
  
  var test = () =&gt; "";
  var result = partial(test, "");
  </code></pre>
  
  <p>Function "partial" takes as the first argument a function, that takes one parameter, but I pass to it function, that doesn't take any parameters, and typescript compiler thinks, that this is OK. I understand that this can't break anything because you can pass all parameters in the world to the function that doesn't take any, and it won't break anything, but it should be a compilation error because typescript is about types and there is an obvious type missmatch and it can possible be a developer's error.</p>
  
  <p>Is there any workarounds for this problem?</p>