title: @typescript-eslint/no-unused-vars complains when parameter is used only for generics
body: <p>In one of my functions, I have added an argument which determines the return type from that function. I use it to specify which APIs are loaded in an initializer and therefore always should have data. Simplified example:</p>
  <pre><code>interface CanBeUndefined {
    data: [] | undefined;
  }
  
  interface AlwaysHasData {
    data: [];
  }
  
  interface Query {}
  
  const query: Query = {};
  const canBeUndefined = parseQuery(query, true);
  const cannotBeUndefined = parseQuery(query, false);
  
  function parseQuery&lt;TCouldBeUndefined extends boolean&gt;(
    query: Query,
    couldBeUndefined: TCouldBeUndefined // This is where the error occurs
  ) {
    // Do stuff with query
    return query as TCouldBeUndefined extends true
      ? CanBeUndefined
      : AlwaysHasData;
  }
  </code></pre>
  <p>My problem here is that the eslint rule @typescript-eslint/no-unused-vars throws an error because of the parameter couldBeUndefined, which is technically correct. The variable is never used other than for generics.</p>
  <p>Is there a way to solve this without disabling that rule one way or another? Is this a use-case that should maybe even be accepted by that rule?</p>