title: Typescript extend type if boolean type is true
body: <p>I'd like to know if it's possible to extend a type depending on another type's value?</p>
  <pre><code>interface NavType {
      hideNav?: boolean
      dev?: boolean
  }
  </code></pre>
  <p>I'd like to allow the use of <code>hideNav</code> only if the <code>dev</code> arg is false.</p>
  <pre><code>const Navbar: React.FC&lt;NavType&gt; = ({ children, hideNav, dev = false }) =&gt; (
      &lt;nav&gt;
          {!dev ? (
              &lt;NavDefault hideNav={!!hideNav}&gt;{children}&lt;/NavDefault&gt;
          ) : (
              &lt;NavDev&gt;{children}&lt;/NavDev&gt;
          )}
      &lt;/nav&gt;
  )
  </code></pre>
  <p>How can I use conditionals in this case?</p>
  <pre><code>// Should PASS
  const navArgs1: NavType = {
      hideNav: undefined,
      dev: true
  }
  
  const navArgs2: NavType = {
      hideNav: true or false,
      dev: false
  }
  
  // Should NOT PASS
  const navArgs3: NavType = {
      hideNav: true or false,
      dev: true
  }
  </code></pre>