Skip to content

Commit

Permalink
types: use CustomInstanceExtenstions to extend reportNamespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Nov 13, 2023
1 parent e874255 commit ef68a73
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 13.4.1

- types: use CustomInstanceExtenstions to extend reportNamespaces

### 13.4.0

- fix: separate cjs and mjs typings
Expand Down
2 changes: 1 addition & 1 deletion example/react-typescript/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"i18next": "^23.7.5",
"i18next": "^23.7.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^13.4.0"
Expand Down
5 changes: 4 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ export interface ReportNamespaces {
}

declare module 'i18next' {
interface i18n {
// interface i18n {
// reportNamespaces: ReportNamespaces;
// }
interface CustomInstanceExtenstions {
reportNamespaces: ReportNamespaces;
}
}
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-testing-library": "^5.11.0",
"husky": "^8.0.3",
"i18next": "^23.7.2",
"i18next": "^23.7.6",
"jest": "^24.8.0",
"jest-cli": "^24.8.4",
"lint-staged": "^8.1.3",
Expand Down

0 comments on commit ef68a73

Please sign in to comment.