title: Private constructor variables and public getters for TypeScript classes
body: <p>I come from  C# background.  Most of my classes are designed to be immutable. I was wondering if it is good practice to use private constructor variables and public getters for accessing data in TypeScript classes.</p>
  
  <p>For example:</p>
  
  <pre><code>class UnitType {
     constructor(private code: string, private name: string, private unitType: string) {
  
  }
  
  get Code(): string {
      return this.code;
  }
  get Name(): string {
      return this.name;
  }
  get UnitType(): string
      return this.unitType;
  }
  </code></pre>
  
  <p>I cannot seem to find any examples of TypeScript code like above. Am I missing something?</p>