You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Express request objects are not meant to have properties set on them (req.property = some_value), and the types reflect this (no way to adequately reflect that req has a property set).
set properties on res.locals for all intents identical apart from naming w/ built in support from express.
The suggested solution is to use res.locals as different properties set using declaration merging will all be merged into 1 giant request type, which would be extremely confusing.
The text was updated successfully, but these errors were encountered:
Problem
Express request objects are not meant to have properties set on them (
req.property = some_value
), and the types reflect this (no way to adequately reflect thatreq
has a property set).Solution
We could adopt either
res.locals
for all intents identical apart from naming w/ built in support from express.The suggested solution is to use
res.locals
as different properties set using declaration merging will all be merged into 1 giant request type, which would be extremely confusing.The text was updated successfully, but these errors were encountered: