title: Typescript Set Value of Class itself in Method, Inheritance from Base Class
body: <p>How do I set a value of a class itself in its own method? Trying to utilize <code>this</code>. Receiving an error below .</p>
  <pre><code>export class ProductForm extends FormGroup {
  
      constructor(){
        super({
          productName: new FormControl()
        })
      }
     
      addMoreFieldsTest(): void {
        this = {
          productName: new FormControl(),
          productDescription: new FormControl()
       }
  }
  </code></pre>
  <blockquote>
  <p>Error: The left-hand side of an assignment expression must be a variable or a property access.</p>
  </blockquote>
  <p>I could use AddControl method, however want to set class itself for learning purposes.</p>