Skip to content

Commit 76d3d6d

Browse files
committed
matching the v15 API surface #2339
1 parent 1b42fd6 commit 76d3d6d

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 16.0.5
2+
3+
- **Pages Router: export missing types from `next-i18next/pages`**`TFunction`, `I18n`, `WithTranslation`, `WithTranslationHocType`, and `UseTranslation` types are now properly re-exported, matching the v15 API surface [#2339](https://github.com/i18next/next-i18next/issues/2339)
4+
15
## 16.0.4
26

37
- **TypeScript compatibility with i18next v26** — fixed type error in Pages Router `createConfig` where i18next v26's readonly `preload` type was incompatible with the internal config type

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,8 @@ If you were using i18next and react-i18next directly (as recommended in v15):
676676

677677
1. Update imports from `next-i18next` to `next-i18next/pages`
678678
2. Update `serverSideTranslations` import to `next-i18next/pages/serverSideTranslations`
679-
3. Everything else works the same
679+
3. Update type imports: `import type { TFunction, WithTranslation, I18n } from 'next-i18next/pages'`
680+
4. Everything else works the same
680681

681682
---
682683

src/pagesRouter/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,12 @@ export {
1111
globalI18n as i18n,
1212
} from './appWithTranslation'
1313

14-
export type { UserConfig, SSRConfig } from './types'
14+
export type {
15+
UserConfig,
16+
SSRConfig,
17+
TFunction,
18+
I18n,
19+
WithTranslation,
20+
WithTranslationHocType,
21+
UseTranslation,
22+
} from './types'

0 commit comments

Comments
 (0)