title: From Typescript to Javascript
body: <p>I have a ts code that was translated in js and now i want to use instantiate objects from the generated js code but i am having the error "object" not defined.</p>
  
  <p>For example the class in ts look like this:</p>
  
  <pre><code>class Person{
      name: string;
  
      constructor(name: string){
          this.name = name;
    }
  /*...*/
  }
  </code></pre>
  
  <p>And the generated js: </p>
  
  <pre><code>class Person{    
      constructor(name){
          this.name = name;
    }
  /*...*/
  }
  </code></pre>
  
  <p>now to used the object <code>Person</code> i did something like this:</p>
  
  <pre><code>var bob = new Person("bob");
  </code></pre>
  
  <p>But i am getting the error: <em>Person is not defined</em>.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>class Person {
    constructor(name) {
      this.name = name;
    }
  }
  
  var bob = new Person("bob");
  
  console.log(bob);</code></pre>
  </div>
  </div>
  </p>