title: How to constrain generic to a union?
body: <p>Does anybody know how to express: &quot;constrain the generic so it must be a union with a certain type (in this case: null)&quot;?</p>
  <pre class="lang-ts prettyprint-override"><code>type Test&lt;value_T extends Enforce_null_union&gt;
  
  Test&lt;number | null&gt; // Valid
  Test&lt;string | null&gt; // Valid
  Test&lt;number&gt; // Invalid, must be a union containing `null`
  Test&lt;number&gt; // Invalid, must be a union containing `null`
  </code></pre>