i18next-express-middleware
Advanced tools
Comparing version 1.7.2 to 1.7.3
@@ -0,1 +1,5 @@ | ||
### 1.7.3 | ||
- typescript: Update typings to allow req.i18n and req.t without Typescript error. [177](https://github.com/i18next/i18next-express-middleware/pull/177) | ||
### 1.7.2 | ||
@@ -2,0 +6,0 @@ |
@@ -1,5 +0,12 @@ | ||
declare namespace Express { | ||
export interface Request { | ||
import * as express from 'express'; | ||
import i18next from 'i18next'; | ||
declare global { | ||
namespace Express { | ||
interface Request { | ||
language: string; | ||
languages: string[]; | ||
i18n:i18next.i18n; | ||
t:i18next.TFunction | ||
} | ||
} | ||
@@ -9,5 +16,2 @@ } | ||
declare module 'i18next-express-middleware' { | ||
import * as express from 'express'; | ||
import i18next from 'i18next'; | ||
type I18next = i18next.i18n; | ||
@@ -14,0 +18,0 @@ type IgnoreRoutesFunction = (req: express.Request, res: express.Response, options: HandleOptions, i18next: I18next) => boolean; |
{ | ||
"name": "i18next-express-middleware", | ||
"version": "1.7.2", | ||
"version": "1.7.3", | ||
"description": "express middleware for i18next", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32225
540