title: Are Typescript class objects slower in performance by wrapping together their methods?
body: <p>I could be mistaken but by looking at typescripts playground I noticed that they wrap their classe's methods together with the object variable which feels like it may reduce performance every time I call a new object.</p>
  
  <p>e.g. Typescript Playground Output of Class</p>
  
  <pre><code>var FatObject = (function () {
     function FatObject(thing) {
         this.objectProperty = 'string';
         this.anotherProp = thing;
     }
     FatObject.prototype.someMassivMethod = function () {
         //many lines of code 
         //...
         //...
         //...
         //.......................
      };
     return FatObject;
  }());
  
  var thing = 'example';
  var objOne = new FatObject(thing);
  var objTwo = new FatObject(thing);
  var objThree = new FatObject(thing);
  var objFour = new FatObject(thing);
  </code></pre>
  
  <p>I feel that if I write massive methods, each time I create a new object from the class I will also be compiling these massive methods.</p>
  
  <p>Rather than declaring the methods outside the function name when I create new objects.</p>
  
  <p>e.g. old way:</p>
  
  <pre><code>function ThinObj(thing) {
      this.anotherProp = thing;
      this.objectProperty = 'string';
  }
  
  ThinObj.prototype.someMassivMethod = function() {
      //many lines of code 
      //...
      //...
      //...
      //..................
  }
  
  const thing = 'example'
  let objOne = new ThinObj(thing);
  let objTwo = new ThinObj(thing);
  let objThree = new ThinObj(thing);
  let objFour = new ThinObj(thing);
  </code></pre>
  
  <p>Can anyone clarify if:</p>
  
  <p>A: I am loading 4 types of functions in memory in the typescript example (or overwriting them since prototype is used - I'm still shakey with my understanding of prototype).</p>
  
  <p>B: If more compiler work is happening with Typescript wrapping the methods together?</p>
  
  <p>Thanks</p>