I have:
import { Request, Response, NextFunction } from 'express';
interface IUserRequest extends Request {
user: User;
}
async use(req: IUserRequest, res: Response, next: NextFunction) {
const apiKey: string = String(req.headers['x-api-key']).trim();
But TypeScript 3.7.4, complains: Property 'headers' does not exist on type 'IUserRequest'.
What am I doing wrong?