title: Typescript Decorator with Generic Type
body: <p>Does not work below codes :</p>
  
  <pre><code>function deco&lt;T&gt;(){
      return function(target, key){
          // before
          // target[key] = new Decorated&lt;T&gt;();
          // edited
          Object.defineProperty(target, key, {
              get(){
               return new Decorated&lt;T&gt;();
              }
          });
      }
  }
  
  class Decorated&lt;T&gt; {
      set(values: T){
      }
  }
  
  class MyDecos {
      @deco&lt;{a: number}&gt;() a;
      @deco&lt;{b: string}&gt;() b;
  }
  
  const test = new MyDecos;
  test.a.set(); // want to throw error
  test.a.set({a: '1'); // want to throw error
  test.b.set({b: 1); // want to throw error
  </code></pre>
  
  <p>have any wrong with generic?
  assistant displayed <code>values: any</code></p>
  
  <p>I want to <code>Test.set</code> methods working with Generic from decorator</p>