It's important when you recieve events or calls from the server that you ensure the types are correct, otherwise unwanted errors may pop up.
If you want to ensure the types you're recieving from the client are the types you're expecting, you can use the
This middleware just takes type checking functions.
Using a library like
The rate limiter middleware is created as such: