Why is Typescript NOT extending the Request object? I'm beyond frustrated trying to get this to work..
Declare the type.. after installing the @types/Express package..
// global.d.ts
declare namespace Express {
interface Request {
user: string;
}
}
(req, res) => {
const user = req.user
}
Property 'user' does not exist on type 'Request'
WHY? WHY? WHY?