title: Polymorphic call of this.constructor
body: <p>WRONG QUESTION. EXAMPLE CODE WORKS.</p>
  
  <p>Consider this code</p>
  
  <pre><code>export interface IParameterType{
    name:string,
    label:string,
    type:string,
    defaultValue:number
  }
  
  class Object3D{
    public static parameterTypes: IParameterType[] = [];
    constructor(){
      (this.constructor as typeof Object3D).parameterTypes.forEach(paramType =&gt; {
          console.log(paramType.name);
        });
    }
  
  }
  
  class Cube extends Object3D{
    public static parameterTypes: IParameterType[] = [
      {
        name: 'width',
        label: 'Width',
        type: 'integer',
        defaultValue: 10,
      },
      {
        name: 'height',
        label: 'Height',
        type: 'integer',
        defaultValue: 10,
      },
      {
        name: 'depth',
        label: 'Depth',
        type: 'integer',
        defaultValue: 10,
      },
    ];
  }
  
  class Sphere extends Object3D{
    public static parameterTypes: IParameterType[] = [
      {
        name: 'radius',
        label: 'radius',
        type: 'integer',
        defaultValue: 10,
      },
    ];
  }
  </code></pre>
  
  <p>Problem is that <code>(this.constructor as typeof Object3D).parameterTypes</code> is not called polymorphically, I would like to call the parameterTypes of Cube or Sphere depending on the object instance.</p>
  
  <p>In JavaScript this is straight forward: <code>this.constructor.parameterTypes</code>but TypeScript does not allow me to do that ->  <code>Property 'parameterTypes' does not exist on type 'Function'</code></p>
  
  <p>Any help?</p>
  
  <p>I have tried:</p>
  
  <pre><code>if (this instanceof Cube){
        (this.constructor as typeof Cube).parameterTypes.forEach(paramType =&gt; {
          console.log(paramType.name!);
        });
      }
  </code></pre>
  
  <p>But doing so, what's the use of polymorphism?</p>