title: Typescript overload arrow function is not working
body: <p>(I'm using strict null checks)</p>
  
  <p>I have the following arrow function, with overloaded type:</p>
  
  <pre><code>    type INumberConverter = {
        (value: number): number;
        (value: null): null;
      };
      const decimalToPercent: INumberConverter = (value: number | null): number | null =&gt; {
        if (!value) {
          return null;
        }
        return value * 100;
      };
  </code></pre>
  
  <p>To my understanding from other questions (<a href="https://stackoverflow.com/questions/20646171/can-i-use-typescript-overloads-when-using-fat-arrow-syntax-for-class-methods#comment74062493_20646788">Can I use TypeScript overloads when using fat arrow syntax for class methods?</a>) this should be a valid. Never the less I get the following error:</p>
  
  <pre><code>TS2322: Type '(value: number | null) =&gt; number | null' is not assignable to type 'INumberConverter'.   Type 'number | null' is not assignable to type 'number'.     Type 'null' is not assignable to type 'number'
  </code></pre>
  
  <p>If I write this function regularly (with the <code>function</code> keyword):</p>
  
  <pre><code>    function decimalToPercent(value: null): null;
      function decimalToPercent(value: number): number;
      function decimalToPercent(value: number | null): number | null {
        if (!value) {
          return null;
        }
        return value * 100;
      }
  </code></pre>
  
  <p>It works without errors.</p>
  
  <p>I need to use arrow function so <code>this</code> will not be change, and I need this overloading so typescript knows <code>decimalToPercent(1)</code> cannot be null.</p>
  
  <p>Why doesn't it work the way I did it, and how can I fix it?</p>