title: How to get instance of typescript class inside a model?
body: <p>I'm new on TypeScript, I'm trying to get a class instance.</p>
  
  <p>This my code:</p>
  
  <pre><code>    export class Location {
  
        name: string;
        tone: string;
        owner: string;
        rooms: Array &lt; any &gt; ;
  
        constructor(
          public auth: AuthProvider
        ) {
          this.setDefault();
        }
  
        setDefault() {
          this.name = '';
          this.tone = 'default';
          this.owner = this.auth.auth.auth.currentUser.uid;
          this.rooms = [];
        }
  
        getInstance(){
          //how to return instance of the class value
        }
        setName(){
        this.name = "Demo";
    }
  
    getName(){
        return this.name;
    }
      }
  </code></pre>
  
  <p>So after setting location name using setName() I need to get a location instance that contain all location data name, owner ... </p>
  
  <p>Any help?</p>
  
  <p>Thanks</p>