title: TypeScript intersection types of functions
body: <p>Intersection types of function types don't behave as I would expect them to. Take this sample:</p>
  
  <pre><code>var c: ((x: number) =&gt; void) = x =&gt; { };
  </code></pre>
  
  <p>This compiles just fine. <code>x</code> is a number in the lambda.</p>
  
  <p>But this fails:</p>
  
  <pre><code>var c: ((x: number) =&gt; void) &amp; ((x: number | string) =&gt; void) = x =&gt; { };
  </code></pre>
  
  <p>It says "x implicitly has an 'any' type". (Compiling with --noExplicitAny.)</p>
  
  <p>Even this fails with the same remark:</p>
  
  <pre><code>var c: ((x: number) =&gt; void) &amp; ((x: number) =&gt; void) = x =&gt; { };
  </code></pre>
  
  <p>That means that the not for all types <code>T</code>, <code>T &amp; T</code> is the same as <code>T</code>, which is really weird.</p>