title: Typescript error: A private property is missing?
body: <p>I have a class with a private property but when I try to create an array with this elements I get the following error:</p>
  
  <pre class="lang-ts prettyprint-override"><code>error TS2322: Type '{ "id": number; "totalTime": number; "team": { "id": number; "name": string; }; }[]' is not assignable to type 'Training[]'.
  [0]   Type '{ "id": number; "totalTime": number; "team": { "id": number; "name": string; }; }' is not assignable to type 'Training'.
  [0]     Property 'remainingTime' is missing in type '{ "id": number; "totalTime": number; "team": { "id": number; "name": string; }; }'
  </code></pre>
  
  <p><strong>Array class:</strong></p>
  
  <pre class="lang-ts prettyprint-override"><code>import { TEAMS } from './mock-teams';
  import { Training } from './training';
  
  export var TRAININGS: Training[] = [ 
      {"id": 0, "totalTime": 60, "team": {"id": TEAMS[0]['id'], "name": TEAMS[0]['name'] } },
      {"id": 1, "totalTime": 60, "team": {"id": TEAMS[0]['id'], "name": TEAMS[0]['name'] } }
  ];
  </code></pre>
  
  <p><strong>Training class:</strong></p>
  
  <pre class="lang-ts prettyprint-override"><code>export class Training {
      private remainingTime: number = 0;
  
      constructor(
          public id: number,
          public totalTime: number,
          public team?: Team) {
      }   
  }
  </code></pre>
  
  <p>I don't understand why typescript is complaining about a private property which even is not in the constructor.</p>