I’m trying to add a property to express request object from a middleware using typescript. However I can’t figure out how to add extra properties to the object. I’d prefer to not use bracket notation if possible.
I’m looking for a solution that would allow me to write something similar to this (if possible):
app.use((req, res, next) => {
req.property = setProperty();
next();
});