Я пытаюсь добавить машинопись к существующему проекту nodejs. На моем контроллере я импортирую express как показано ниже: import { Request, Response, NextFunction } from "express"
и позже мой код:
let reqQuery = { ...req.query };
// Typescript says that Property 'query' does not exist on type 'Request<any, any, any, any>'.ts(2339)
ОБНОВЛЕНИЕ
Это полный код, getProducts является контроллером ("@types / express ":" ^ 4.17.6 ")
import { Request, Response, NextFunction } from "express"
const getProducts = AsyncProvider( async
(req: Request, res: Response, next: NextFunction) => {
let reqQuery = { ...req.query };
....
})
...
module.exports = getProducts;
Не могли бы вы мне помочь, пожалуйста?
Спасибо