title: JavaScript classes vs TypeScript classes
body: <p>I am new to TypeScript and JavaScript classes!</p>
  <p>I was learning TypeScript where I created something as simple as this</p>
  <pre><code>class User {
    name: string;
    email: string;
  
    constructor(name: string, email: string) {
      this.name = name;
      this.email = email;
    }
  }
  
  let newUser = new User(&quot;Rohit Bhatia&quot;, &quot;iro@gmail.com&quot;);
  </code></pre>
  <p>and this was given to me as equivalence</p>
  <pre><code>var User = /** @class */ (function () {
      function User(name, email) {
          this.name = name;
          this.email = email;
      }
      return User;
  }());
  var newUser = new User(&quot;Rohit Bhatia&quot;, &quot;iro@gmail.com&quot;);
  </code></pre>
  <p>Now, I have three questions</p>
  <ol>
  <li><p>what is <code>@class</code> (or <code>@</code> in general in JavaScript)? <code>var User = /** @class */ (function () {</code></p>
  </li>
  <li><p>classes are in JavaScript as well? So why doesn't TypeScript transform them into JS classes?</p>
  </li>
  <li><p>in TS class we can do something like this</p>
  <p>class User {
  name: string;
  email: string;</p>
  </li>
  </ol>
  <p>but can't we do something like this in JavaScript? Or what is the difference between JS classes and TS classes?</p>