title: How to create a default for a generic parameter of a type?
body: <p>How would you build a type like the following:</p>
  <pre><code>type T&lt;X extends Z = Z&gt; = ...
  </code></pre>
  <p>so that you can consume it as <code>T</code> instead of always having to provide a parameter <code>T&lt;X&gt;</code>?</p>
  <p>Specifically, when using the same types for the <code>Z = Z</code> part, I get the error</p>
  <pre><code>Type instantiation is excessively deep and possibly infinite.ts(2589)
  </code></pre>
  <p>Here is the exact code:</p>
  <pre><code>export type QuestionType&lt;
    TAnswerMap extends GenericAnswerMapType = GenericAnswerMapType
  &gt; =
    | RadioQuestionType&lt;TAnswerMap&gt;
    | DateQuestionType&lt;TAnswerMap&gt;
    | DropdownQuestionType&lt;TAnswerMap&gt;
    | BooleanQuestionType&lt;TAnswerMap&gt;
    | TextQuestionType&lt;TAnswerMap&gt;
    | ListQuestionType&lt;TAnswerMap&gt;
  </code></pre>
  <p>and the TS error</p>
  <pre><code>../shared/constants/questionnaire.tsx:116:13 - error TS2589: Type instantiation is excessively deep and possibly infinite.
  
  116 export type QuestionType&lt;
                  ~~~~~~~~~~~~
  </code></pre>