title: How to stringify Javascript function object with properties?
body: <p>In typescript, a class with static members is compiled into a function when each static member becomes a function object property.</p>
  
  <p><strong>For example:</strong></p>
  
  <pre><code>class Config {
      static debug = true;
      static verbose = false;
  }
  </code></pre>
  
  <p><strong>Becomes</strong></p>
  
  <pre><code>var Config = (function () {
      function Config() {
      }
      Config.debug = true;
      Config.verbose = false;
      return Config;
  })();
  </code></pre>
  
  <p>Invoking <code>JSON.stringify</code> on such function object will result with <code>undefined</code>.
  What is the right way to stringify in that case?</p>