title: Typescript extract and create Union as a subset of a Union
body: <p>I have the following Union type;</p>
  
  <pre><code>type MyUnionType = 'foo' | 'bar' | 'baz'
  </code></pre>
  
  <p>I would like to create a new Union <code>MySubUnion</code> as a subset;</p>
  
  <pre><code>type MySubUnion = 'foo' | 'bar'
  </code></pre>
  
  <p>I would like <code>MySubUnion</code> to be constrained to the values of its parent <code>MyUnionType</code></p>
  
  <pre><code>type MySubUnion = 'foo' | 'bas' // =&gt; Error Type String 'b...
  </code></pre>