title: How to assign values to all properties of class in TypeScript?
body: <p>I have a class with private properties:</p>
  
  <pre><code>class A implements IA {
     private id: number;
     private name: string;
  
     constructor(obj: IA) {
        // Set here properties from obj
     }
  }
  </code></pre>
  
  <p>I want to pass object <code>IA</code> with initialized values when I create instance A, and refill only that properties in class, which I passed.</p>
  
  <p><code>new A({id: 1})</code> or <code>new A({id: 1, name: "O"})</code></p>
  
  <p>How to do this in TypeScript?</p>