title: Make one field non-optional when another field in passed
body: <p>I have an interface like this:</p>
  
  <pre><code>interface A {
      a: number;
      b?: string;
      c?: string;
  }
  </code></pre>
  
  <p>and I would like to make the following code work:</p>
  
  <pre><code>// obj: A
  // this should not throw errors
  obj.b &amp;&amp; obj.c
  
  // this should throw errors since I want to make c mandatory when b is passed
  let obj2: A = { a: 1, b: "test" }
  </code></pre>
  
  <p>I tried to do it this way:</p>
  
  <pre><code>type A = ({ b: string, c: string } | {}) &amp; { a: number }
  </code></pre>
  
  <p>but then the first case throws errors and the second does not.</p>
  
  <p>It there a way to make it work in TypeScript?</p>