title: Declare class type with TypeScript (pass class as parameter)
body: <p>so I have a function which accepts different constructors, like so:</p>
  
  <pre><code>export class SomeSuperClass {
   ...
  }
  
  export class A extends SomeSuperClass {
   ...
  }
  
  export class B extends SomeSuperClass {
   ...
  }
  
  
  const foo = function(Clazz: SomeSuperClass){
  
    const v = new Clazz();
  
  }
  
  foo(A);  // pass the class itself
  foo(B);  // pass the class itself
  </code></pre>
  
  <p>the problem is that <code>SomeSuperClass</code> means that <code>Clazz</code> will be an instance of <code>SomeSuperClass</code>, but not <code>SomeSuperClass</code> itself.</p>
  
  <p>I tried something stupid like this (which obviously doesn't work):</p>
  
  <pre><code>   const foo = function(Clazz: SomeSuperClass.constructor){
  
        const v = new Clazz();
  
     }
  </code></pre>
  
  <p>what's the right way to do this?</p>