title: Compiled typescript files to javascript files: Angular 2
body: <p>I've just started learning and developing an application in Angular 2. The typescript language we use for development is really interesting but I have a question regarding data types in typescript.
   Since typescript files are compiled to javascript, how are the data types compiled in javascript?</p>
  
  <p>For example:</p>
  
  <pre><code>sample.ts
  value_a : String;
  </code></pre>
  
  <p>the above is a sample typescript file which declares a variable of type String. When we compile this typescript file, this gets compiled into a javascript file. Now how will the datatype of this variable defined in the javascript file (as per my knowledge you can't define datatypes in javascript, it automatically determines the datatype when you assign some value to that variable). </p>