title: How do I access a static property in typescript from an instance of a subclass?
body: <p>Use case: 
  I have a base class from which many other classes inherit. 
  The base class is called <code>HSManagedObject</code>.</p>
  
  <p>I have another class called <code>HSContext</code> that keeps a dictionary of <code>HSManagedObject</code>s where the keys are the names of the various subclasses and the values are lists of the instances of those subclasses. I insert them like so: </p>
  
  <pre><code>insertObject(object: HSManagedObject) { 
     this.projectObjects[object.key()].push(object)
  }
  </code></pre>
  
  <p>Because class names go away when I minify my javascript (they all become <code>t</code>), I added a static property to each of those classes called <code>key</code> that uniquely identifies the class in question. </p>
  
  <p>When I add an object to the dictionary, I would like to infer the class name of that object from the instance. Is there a way to get the static <code>key</code> variable just from the instance when I don't know which subclass it belongs to? </p>
  
  <p>Currently I am adding an instance method to each of the subclasses called <code>key()</code> that returns the class's static <code>key</code> value and calling the instance method to get the class value. It seems like I shouldn't need to do this though. So in all of my subclasses I have some code like this:</p>
  
  <pre><code>static key = "HSRule";
  key() {
      return HSRule.key;
  }
  </code></pre>