title: How to type `request.query` in express using TypeScript?
body: <p>I'm running an <code>express.js</code> application using TypeScript.
  Every time I try to process <code>request.query.foo</code> I get the following error:</p>
  <pre><code>Argument of type 'string | ParsedQs | string[] | ParsedQs[] | undefined' is not assignable to parameter of type 'string'.
    Type 'undefined' is not assignable to type 'string'.
  </code></pre>
  <p>Setup:</p>
  <pre><code>import { Request, Response, Router } from 'express';
  
  const router = Router();
  
  function getHandler(request: Request, response: Response) {
    const { query } = request;
  
    query.foo; // string | QueryString.ParsedQs | string[] | QueryString.ParsedQs[] | undefined
  
  }
  
  router.route('/')
    .get(getHandler)
  </code></pre>
  <p>Is there a proper way to type <code>request.query</code> without casting?</p>