title: How to type bound the Express query param as an Array of string in Typescript
body: <p>I am passing an array of query strings from postman to my Nodejs server written in typescript.
  in my backend code Typescript compiler could not understand the type of the query param sent in the query field of the express request object. It kept complaining below error.</p>
  
  <pre><code>Element implicitly has an 'any' type because the expression of type '0' can't be used to index type 'string | ParsedQs | string[] | ParsedQs[]'.
    Property '0' does not exist on type 'string | ParsedQs | string[] | ParsedQs[]'.ts(7053)
  </code></pre>
  
  <p>from postman I am passing the request like this </p>
  
  <p><code>http://localhost:56368/api/v1/admin/GetUserWorkingHrs?data[]=Alok,Singapore/ITPL/Building1/F1/Z1,booking,create</code></p>
  
  <p>My backEnd is as below.</p>
  
  <pre><code>getUserWorkingHrs = async (req: Request, res: Response) =&gt; {
      if(req.query.data){
        console.log(isArray(req.query.data), 'length of Array is :', req.query.data.length);
        console.log('TypeScript Error &gt;&gt; Property 0 does not exist on type string | ParsedQs | string[] | ParsedQs[].ts(7053)', req.query.data[0]);
      }
  }
  </code></pre>
  
  <p>for my check on isArray(req.query.param), I am getting <strong>true</strong> and the length of the array returns <strong>1</strong>, but if I use forEach loop on req.query.data, compiler reports error "can not find the property forEach for a string" and if I consider the req.query.data as a string and apply split function I am getting error too.</p>
  
  <p>want to understand, how the typescript compiler consider the array of express query param?</p>
  
  <p>want to understand, what should be the correct type to extract the Array of Query param to the local constant identifier like this <code>const qry:any[] = req.query.data</code>; for this assignment, I am getting below error.</p>
  
  <pre><code>'qry' is declared but its value is never read.ts(6133)
  Type 'string | ParsedQs | string[] | ParsedQs[]' is not assignable to type 'any[]'.
    Type 'string' is not assignable to type 'any[]'.ts(2322)
  </code></pre>