'how to make the type of query string

when i enter d in width the image is pressing and I want the if condion to work and tell them send you should enter the width can any one solve it for me with explaining please const fileName = req.query.filename as string; const hight = req.query.height as unknown as number ;

  const width=req.query.width as unknown as  number  ;
if (!fileName) {
    res.send("Image name please ");
  } else if (!width) {
    res.send("Width of the image please ");
  } else if (!hight) {
    res.send("Hight if the image please ");
       


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source