title: TypeScript nesting static properties
body: <p>I'm trying to build a class that will contain constant values to be used at different places.</p>
  
  <p>The structure should be something like this:</p>
  
  <pre><code>class JavascriptEvents {
      static change: string = "change";
      static click: string = "click";
      static blur: string = "blur";
      static inputChange: string = "input propertychange paste";
      static dblClick: string = "dblclick";
      static bootstrap: Object = {
          accordion: {
              show: "show.bs.collapse",
              shown: "shown.bs.collapse",
              hide: "hide.bs.collapse",
              hidden: "hidden.bs.collapse"
          },
          modal: {
              shown: "shown.bs.modal",
              show: "show.bs.modal",
              hide: "hide.bs.modal",
              hidden: "hidden.bs.modal",
              loaded: "loaded.bs.modal"
          }
      }
  }
  </code></pre>
  
  <p>Question: How should the <code>bootstrap</code> part be nested so I can reference an event like:</p>
  
  <pre><code>$("someElement").on(JavascriptEvents.bootstrap.modal.shown, function(){
      // do whatever needed
  });
  </code></pre>