title: Typescript default properties when type casting
body: <p>Is there a way to typecast an object to a class type so that default property values are respected?</p>
  
  <p>For instance:</p>
  
  <pre><code>class Person {
      name: string = "bob";
      age: number;
      sex: string;
  }
  
  var data = {
      "age": 23,
      "sex": "male"
  }
  
  var p = &lt;Person&gt;data;
  
  console.log(p.name); // -&gt; undefined
  </code></pre>
  
  <p>What is the simplest way to do it so <code>p.name</code> is bob?</p>
  
  <p><strong>*Edit</strong></p>
  
  <p>This seems to work:</p>
  
  <pre><code>var record : Person = Object.assign(new Person(), p);
  </code></pre>
  
  <p>Is this good or bad practice?</p>