title: Typescript generic for function with a variable number of parameters
body: <p>I have a function that takes an arbitrary number of classes.</p>
  
  <pre><code>function findObjects(...Classes) { ... }
  </code></pre>
  
  <p>All classes inherit from one <code>Component</code> class. This function in a certain way searches for objects that are instances of these classes.</p>
  
  <p>How to implement a template for functions with a variable number of parameters?</p>
  
  <p>It should be something like this:</p>
  
  <pre><code>function findObjects(...Classes): [...Classes] { ... }
  </code></pre>
  
  <p>This is necessary for the correct definition of types and for the correct operation of intellisense.</p>