title: Dates in a Typescript interface are actually strings when inspected
body: <p>Unfortunately the total code to reproduce this would be extensive, so I'm hoping that my problem is obvious with what I can easily provide.  If required, I'll post a more complete solution.</p>
  
  <p>First, I am defining an interface:</p>
  
  <pre><code>export interface ITest {
      myDate: Date;
  }
  </code></pre>
  
  <p>Then I create an array of these for testing:</p>
  
  <pre><code>export const TEST: ITest[]=[{myDate: new Date(1995, 8, 1)}]
  </code></pre>
  
  <p>I expose these using a service in Angular2 that is hitting the InMemoryDbService from <code>angular2-in-memory-web-api</code>.  The code where I call this and get the array is as follows:</p>
  
  <pre><code>get(): Promise&lt;ITest[]&gt;{
      return this.http.get(this.testUrl)
          .toPromise()
          .then(response =&gt; response.json().data as ITest[])
          .catch(this.handleError);
  }
  </code></pre>
  
  <p>...and then I bring it into my component with:</p>
  
  <pre><code>    this.testService.get().then(tests =&gt; {
          this.tests = tests;
          console.log("Date Type:"+typeof(this.tests[0].myDate));
      });
  </code></pre>
  
  <p>This all works fine, but the problem is the <code>console.log</code> statement shown there results in:</p>
  
  <pre><code>Date Type:string
  </code></pre>
  
  <p>The data in it is correct, in that the string held by my date is <code>1995-09-01T07:00:00.000Z</code>, but the main issue is - it isn't a <code>Date</code> it is a <code>string</code>!  In VS Code I even get code completion for methods like <code>toDateString</code> but when I execute them I (of course) get <code>toDateString is not a function</code>.  </p>
  
  <p>I am pretty sure that the issue is occurring with <code>response =&gt; response.json().data as ITest[]</code>, but why isn't the date data being cast to an actual <code>Date</code>?  I'm doing it wrong, that I understand. How should I be handling this such that I can have my objects obtain the types I expect?</p>