title: Typescript Generic as Parameter
body: <p>I have a class:</p>
  
  <pre><code>export class BaseClass&lt;T&gt; {
      constructor(data?: Partial&lt;T&gt;) {
          Object.assign(this, data);
      }
      name: string;
      id: number;
  }
  </code></pre>
  
  <p>From this class, I extend the properties:</p>
  
  <pre><code>export class ExampleOne extends BaseClass&lt;ExampleOne&gt; {
      isReusable: boolean;
  }
  
  export class ExampleTwo extends BaseClass&lt;ExampleTwo&gt; {
      propOne: string;
      propTwo: boolean;
  
  }
  </code></pre>
  
  <p>I've used a mapped type in BaseClass so that I could have "similar" syntax to that of C# to initialize an object as well as reuse the constructor in subsequent, classes that inherit BaseClass.</p>
  
  <pre><code>var x = new ExampleTwo({name: 'test', id: 1, propOne: 'test', propTwo: false});
  </code></pre>
  
  <p>This all seems to be working fine, but I would like to pass any one of these derived classes as a parameter to another function. </p>
  
  <pre><code>testFunction(data: BaseClass&lt;T&gt;) {
      //logic
  }
  </code></pre>
  
  <p>I receive an error stating that the build <code>Cannot find name T</code>. I changed the signature to </p>
  
  <pre><code>testFunction(data: BaseClass&lt;any&gt;) {
      //logic
  }
  </code></pre>
  
  <p>and that appeared to work, but I feel like there should be a better way to handle this. </p>
  
  <p>What am I missing? </p>