title: Typescript find type of union type
body: <p>I want to know the type <code>c</code> in <code>printTypeOf</code> function.
  Here is my code:</p>
  
  <pre><code>type Email ={
      email:string,
  }
  type Phone ={
      phone:string,
  }
  type ContactInfo = Email | Phone;
  
  function printTypeOf(c: ContactInfo) {
      console.log(typeof c)
  }
  
  const x: Email = { email: "X" };
  printTypeOf(x);
  
  </code></pre>
  
  <p>Current output is <code>object</code> but I need to find if it is <code>Email</code> or <code>Phone</code></p>