How To Extend Express Request Interface in Typescript
| |

How To Extend Express Request Interface in Typescript

The problem You will likely be caught in this situation when you create middleware that processes the request data before it reaches the resource route. An example of this is JWT, where you will need to decode the token before every request, and put in the decoded data somewhere. In Javascript, it would have been…