title: How to define a nonserializable property for TypeScript `class` or `interface`?
body: <p>TypeScript</p>
  
  <p>How to define a <em>nonserializable</em> (to JSON) property for TypeScript <code>class</code> or <code>interface</code>? I.e. I need something like this (JavaScript):</p>
  
  <pre><code>Object.defineProperty(this, 'foo', {
    enumerable: false,
    configurable: false,
    get: function(){return 'stuff';}
  });
  </code></pre>