title: Can you set a static enum inside of a TypeScript class?
body: <p>I'd like to somehow be able to statically set an enum on my TypeScript class and be able to reference it both internally and externally via exporting the class. I'm fairly new to TypeScript, so I'm not sure of the correct syntax for this, but below is some pseudo-code (which extends a Backbone Model) I'd like to be able to use to achieve what I need...</p>
  
  <pre><code>class UnitModel extends Backbone.Model {
      static enum UNIT_STATUS {
          NOT_STARTED,
          STARTED,
          COMPLETED
      }
  
      defaults(): UnitInterface {
          return {
              status: UNIT_STATUS.NOT_STARTED
          };
      }
  
  
      isComplete(){
          return this.get("status") === UNIT_STATUS.COMPLETED;
      }
  
      complete(){
          this.set("status", UNIT_STATUS.COMPLETED);
      }
  }
  
  export = UnitModel;
  </code></pre>
  
  <p>I need to be able to reference the enum inside of this class, but I also need to be able to reference the enum outside of the class, like the following:</p>
  
  <pre><code>import UnitModel = require('path/to/UnitModel');
  alert(UnitModel.UNIT_STATUS.NOT_STARTED);//expected to see 0 since enums start at 0
  </code></pre>