title: Is TypeScript really a superset of JavaScript?
body: <p>I just started using TypeScript and sometimes get compiler errors "use of undeclared variable". For example the following works in plain JavaScript :</p>
  
  <pre><code>var foo = {};
  foo.bar = 42;
  </code></pre>
  
  <p>If I try to do the same in TypeScript it won't work and give me the mentioned error above. I have to write it like that:</p>
  
  <pre><code>var foo :any = {};
  foo.bar = 42;
  </code></pre>
  
  <p>In plain JavaScript the type definition with any is neither required nor valid, but in TypeScript this seems to be mandatory. I understand the error and the reason for it, but I always heard in Videos and read in the documentation:</p>
  
  <p><a href="http://www.typescriptlang.org/">typescriptlang.org</a>:</p>
  
  <blockquote>
    <p>"TypeScript is a typed superset of JavaScript [...]"</p>
  </blockquote>
  
  <p><a href="http://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript">Introduction Video @minute 3:20</a>:</p>
  
  <blockquote>
    <p>"All JavaScript code is TypeScript code, simply copy and paste"</p>
  </blockquote>
  
  <p>Is that a thing that changed during the development of TypeScript or do I have to pass a specific compiler setting to make this work?</p>