i18next / i18next-express-middleware

[deprecated] can be replaced with i18next-http-middleware
https://github.com/i18next/i18next-http-middleware
MIT License
206 stars 52 forks source link

Update typings to export I18NextRequest instead of extending global express Request #211

Closed nicolasigot closed 4 years ago

nicolasigot commented 4 years ago

Hello @isaachinman , @jamuhl ,

As discussed within my previous PR, I created this one with updated typings. https://github.com/i18next/i18next-express-middleware/pull/177

I had to replace in all my code req.t & req.language by (req as I18NextRequest).t and (req as I18NextRequest).language.

You may have people complain about this once merged but I guess this is the direction you would like to take for your typings.

Thanks, Nicolas

isaachinman commented 4 years ago

Wondering if this should be released on a major, as it could possibly break TS builds?

jamuhl commented 4 years ago

published in i18next-express-middleware@2.0.0