title: TypeScript: Is it possible to define new class members using decorators?
body: <p>Example:</p>
  
  <pre><code>function Getter(target: any, key: string): void {
    let getter = () =&gt; this[key];
    /*  create "foobar" property from "_foobar" */
    Object.defineProperty(target, removeUnderscores(key), {
      get: getter,
      enumerable: true,
      configurable: true
    });
  }
  
  class Foo {
     @Getter 
     private _foobar: string;
     constructor() {
        this._foobar = "Hello World" // OK
        console.log(this.foobar) // Compiler error
     }
  }
  
  let foo = new Foo();
  console.log(foo.foobar) // Compiler error
  </code></pre>
  
  <p>I guess it's possible to make <code>_foobar</code> public and rename it to <code>foobar</code> to avoid creating new property names, but trying to modify that property externally won't cause compile-time error, it should cause a run-time error when it's modified internally or externally.</p>