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