title: Constructor with config object in TypeScript (like jQuery.extend, Ext.apply)
body: <p>What is the equivalent to extending an arbitrary object with another one in TypeScript/ECMAScript6 ?</p>
  
  <p>Essentially something like <code>$.extend(target, src)</code> in jQuery or <code>Ext.apply(target, src, defaults)</code> in ExtJS do.</p>
  
  <p>I want to have a class constructor that simply applies a configuration object onto the object instance created by the constructor like so:</p>
  
  <pre><code>class Address {
  
      country:     string;
      postCode:    string;
      city:        string;
      street:      string;
      houseNumber: string;
  
      constructor (config : any) {
          // simply tag all configuration onto the object, 
          // may be one, may be multiple, may be all properties 
          // of the resulting object instance
  
          Object.apply(this, config); // ????
          // jQuery.extend(this, config);
          // Ext.apply(this, config);
  
          this.init();
  
      }
  
      init () {
          // do some initialization work ...
      }
  
  }
  </code></pre>
  
  <p>Or is the "object configuration pattern" deprecated for type-safe languages like TypeScript and ECMAScript6? </p>
  
  <p>Is there a "new way" achieving the same flexibility?</p>