title: How to document a nullable union type with jsDoc?
body: <p>According to <a href="https://jsdoc.app/tags-type.html" rel="nofollow noreferrer">jsDoc - tag @type</a> the correct way to annotate a union type is <code>@type {(number|boolean)}</code> and the correct way to annotate a nullable type is <code>@type {?number}</code>.</p>
  <p>How do I document a type which is a union and nullable at the same time? I tried</p>
  <ul>
  <li><code>@type {?(number|boolean)}</code> -- question mark in front of parentheses</li>
  <li><code>@type {(?number|?boolean)}</code> -- mark every type of the union individually nullable</li>
  <li><code>@type {(?number|boolean)}</code> -- mark only the first type of the union nullable</li>
  </ul>
  <p>However, my IDE (JetBrains PhpStorm) compains about every variant.</p>