title: Create a Generic type interface with some specific interface
body: <p>I don't really know the terms to search on google for this, so it might be duplicated.</p>
  <p>I have an interface that looks like</p>
  <pre><code>export interface SolidOptions&lt;T&gt;  {
    position: Cartesian3;
    options?: T;
  }
  </code></pre>
  <p>now, I want this T to be <em>ONLY</em> of 3 types : CylinderOptions | RectangleOptions | PolygoneOptions</p>
  <p>I do <em>NOT</em> want this solution :</p>
  <pre><code>export interface SolidOptions&lt;T&gt;  {
    position: Cesium.Cartesian3;
    options?: CylinderOptions | RectangleOptions | PolygoneOptions;
  }
  </code></pre>
  <p>the reason why is I want to use this as follow :</p>
  <pre><code>    static generateCylinder = (options: SolidOptions&lt;CylinderOptions&gt;)=&gt;  {
      }
      
      static generateRectangle = (options: SolidOptions&lt;RectangleOptions &gt;)=&gt;  {
      }
  
      static generatePolygon = (options: SolidOptions&lt;PolygoneOptions&gt;)=&gt;  {
      }
  
  </code></pre>
  <p>and not having the abilities to pass the wrong type to the wrong function.</p>