title: Update object from class variable using method
body: <p>My goal is to create array of objects which have set default properties, but in some cases I will need to update one or more of property.
  Here is my example class with variables - objects</p>
  <pre><code>export class Components{
      public static component_1 = {
          width: 1,
          height: 2,
          x: 3,
          y:4
      }
      
      public static component_2 = {
          width: 10,
          height: 20,
          x: 30,
          y:40
      }
  
      ...
  }
  </code></pre>
  <p>I would like to create my array of object in way eg</p>
  <p><code>let myArrOfComponents = [Components.component_1, Components.component_2, ...]</code></p>
  <p>The problem is that in some cases I will have to update one or more of properties in object, eg width and x. I would like to do this for example like</p>
  <pre><code>let myArrOfComponents = [Components.component_1.configure(width = 99, x=88)]
  </code></pre>
  <p>Can you help me how I can do this? Im not sure how implement '.configure()' I'm trying to solve this but have no idea how implement it or something with similar behavior</p>