title: Create a class with getters based on the properties of another class
body: <p>Say I have a class A with a hundred properties:</p>
  <pre class="lang-js prettyprint-override"><code>class A {
    FOO = &quot;foo&quot;;
    BAR = &quot;bar&quot;;
    // (...) 98 more properties
  }
  </code></pre>
  <p>In typescript, how does one go about dynamically defining a class B with one getter for each property of class A?<br />
  The corresponding statically defined class B would look like this:</p>
  <pre class="lang-js prettyprint-override"><code>class B {
    get FOO() {
      someFunction('FOO');
    }
  
    get BAR() {
      someFunction('BAR');
    }
  
    // (...) 98 more getters
  }
  </code></pre>
  <p>The relation between these classes is as follows:</p>
  <ul>
  <li>a getter name in B is equal to property name in A</li>
  <li>the body of getter in B is exactly the call of function <code>someFunction</code> with a single argument that is a string with the name of the getter</li>
  </ul>