title: In Typescript how can I set types for querySelectorAll with the spread syntax
body: <p>I have this code.</p>
  
  <pre><code>const elements = [...document.querySelectorAll('.someClass')]
  </code></pre>
  
  <p>Combination of:</p>
  
  <ul>
  <li>querySelectorAll</li>
  <li>the spread operator</li>
  </ul>
  
  <p>I can't figure out how to add Typescript types to this line.</p>
  
  <p>I get errors from the console:</p>
  
  <pre><code>TS2548: Type 'NodeListOf&lt;Element&gt;' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.
  </code></pre>