title: Typescript overloading type boolean is not assignable to type false
body: <p>I have a method that returns different type based on option key value.</p>
  
  <pre><code>class Test {
    getData(options: { obj: true }): Object;
    getData(options: { obj: false }): any[];
    getData(): any[];
    getData(options = { obj: false }): Object | any[] {
      if (options.obj) {
        return {};
      } else {
        return [];
      }
    }
  }
  </code></pre>
  
  <p>When passing the <code>obj</code> as <code>true</code>, I'm returning object otherwise array. That works fine.</p>
  
  <pre><code>const instance = new Test();
  const result = instance.getData({ obj: true }); // inffered as array
  const result2 = instance.getData(); // inffered as object
  </code></pre>
  
  <p>The problem is when I need to use dynamic value it throws an error: </p>
  
  <blockquote>
    <p>type boolean is not assignable to type false</p>
  </blockquote>
  
  <pre><code>function getResult(obj: boolean = false ) {
    return instance.getData({ obj });
  }
  </code></pre>
  
  <p>What is the problem? </p>