title: Reducing TypeScript Type possibility with recursive typing
body: <p>Since TypeScript allows Advanced Type definition, I want to experiment a lot this approach, but it's not as easy as I expected.</p>
  
  <p>For example, I want to have a kind of "wizard-step-by-step" method:</p>
  
  <pre><code>function fillWizardOptions&lt;T&gt;() {
       return &lt;P extends T&gt; (value:  P) =&gt; {
           return fillWizardOptions&lt;Exclude&lt;T, P&gt;&gt;();
       }
  }
  </code></pre>
  
  <p>So each time I call a chained sub-function, I want to lose the previous option, but currently, <code>Exclude</code> doesn't work as I was expected:</p>
  
  <pre><code>fillWizardOptions&lt;string|number|boolean&gt;()
       ('foo')
       ('bar');// Expect here of have only number|boolean, but I still have string|number|boolean
  </code></pre>
  
  <p>Probably I miss something.</p>
  
  <p>Also, if someone know where I can find a kind of <code>playground</code> like for <a href="https://regex101.com/" rel="nofollow noreferrer">RegEx101</a></p>
  
  <p>Thanks.</p>
  
  <p>Update: forget to mention that I'm using TypeScript 3.3.1</p>