title: Why do I receive "Argument of type 'Date' is not assignable to parameter of type 'string | number'" when creating a date with a date object?
body: <p>I have a function that takes a date object as an argument. This function returns a different date. </p>
  
  <pre><code>function makeDate(date:Date) {
    return new Date(date); //&lt;--error here
  }
  const newDate = new Date(); //
  console.log(makeDate(newDate)); // Returns date object just fine
  </code></pre>
  
  <p>Typescript in Vscode shows the followinng error:</p>
  
  <p><strong><em>"Argument of type 'Date' is not assignable to parameter of type 'string | number'."</em></strong></p>
  
  <p>While the official docs state the Date constructor can take a number (milliseconds), a string (date string), there seems to be no issue with creating a date object <em>by passing another date object</em> into the Date constructor. Therefore, I would expect to receive no error.</p>
  
  <p>I've Googled for this result, but the SO and Github issues I found don't seem to answer this or explain the issue (or at least I am not understanding the explanation as it relates to my example).</p>
  
  <p>Should I be getting this error? And is there a way to fix it?</p>
  
  <p>Thanks!</p>