title: how to use union types with parseInt?
body: <p>I have a value coming in as a string, like "1.5"
  If its a number I want it to be logged as a number.
  This code will do the j</p>
  
  <pre><code>  // parse out the value as a number if it is one
    let val = parseFloat(event.value) || event.value;
    event.value = val;
  </code></pre>
  
  <p>where i have an Interface</p>
  
  <pre><code>interface IEvent {
    value: string | number;
    ...
  }
  </code></pre>
  
  <p>But this gives an error as </p>
  
  <blockquote>
    <p>'argument of type string|number is not assigned parameter string'</p>
  </blockquote>
  
  <p>since parseInt expects a string.</p>
  
  <p>How can i get around this, or just stop that warning?</p>