Is your feature request related to a problem? Please describe.
Right now HttpRequest is can be assigned any property. Thanks to that you can pass custom properties down the stream as middleware-jwt does.
However, custom properties are of type any. I can't see a way to make them type-safe. Am I missing something?
Describe the solution you'd like
I'd like to pass custom properties in a type-safe manner as it is done with params, query, and body.
Describe alternatives you've considered
I tried to extend the HttpRequest type and make my middleware return the extended version, but with no success.
Additional context
Is your feature request related to a problem? Please describe.
Right now
HttpRequestis can be assigned any property. Thanks to that you can pass custom properties down the stream as middleware-jwt does.However, custom properties are of type
any. I can't see a way to make them type-safe. Am I missing something?Describe the solution you'd like
I'd like to pass custom properties in a type-safe manner as it is done with
params,query, andbody.Describe alternatives you've considered
I tried to extend the
HttpRequesttype and make my middleware return the extended version, but with no success.Additional context