title: Why won't Typescript declare an unassigned variable?
body: <p>Typescript compiles the following class with unassigned variable <code>world</code>:</p>
  
  <pre><code>class Hello {
    world: string;
  }
  </code></pre>
  
  <p>to the following javascript <em>without</em> a declaration for variable <code>world</code>:</p>
  
  <pre><code>var Hello = (function () {
      function Hello() {
      }
      return Hello;
  }());
  </code></pre>
  
  <p>But if you assign the variable to <em>anything</em>:</p>
  
  <pre><code>class Hello {
    world: string = undefined;
  }
  </code></pre>
  
  <p>Then the declaration for the variable <em>is</em> included:</p>
  
  <pre><code>var Hello = (function () {
      function Hello() {
          this.world = undefined;
      }
      return Hello;
  }());
  </code></pre>
  
  <p>Why won't Typescript add the declaration for <code>world</code> when no default value is assigned to it?</p>
  
  <p>For example the following code:</p>
  
  <pre><code>new Hello().hasOwnProperty('world')
  </code></pre>
  
  <p>Returns <code>false</code> for the first case, but <code>true</code> for the second case. I actually do expect it to be true, because I've declared it in Typescript (although I didn't assign a value to it).</p>
  
  <p>I also couldn't find a compiler option for this. Did I miss anything? Why does Typescript do this?</p>