react-i18next 16.6.2 → 16.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/TransWithoutContext.d.ts +3 -5
- package/dist/es/package.json +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
### 16.6.4
|
|
2
|
+
|
|
3
|
+
- allow TypeScript 6 as peer dependency [1910](https://github.com/i18next/react-i18next/issues/1910)
|
|
4
|
+
|
|
5
|
+
### 16.6.3
|
|
6
|
+
|
|
7
|
+
- fix(types): merge `TransSelector` overloads into a single signature so `typeof Trans` remains extendable [1909](https://github.com/i18next/react-i18next/issues/1909)
|
|
8
|
+
|
|
1
9
|
### 16.6.2
|
|
2
10
|
|
|
3
11
|
- feat(types): `useTranslation` now accepts selector functions as `keyPrefix` with full type-safe key narrowing when `enableSelector` is enabled [2367](https://github.com/i18next/i18next/issues/2367)
|
package/TransWithoutContext.d.ts
CHANGED
|
@@ -85,10 +85,11 @@ export interface TransSelectorProps<
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
export interface TransSelector {
|
|
88
|
-
// ── Selector function ──────────────────────────────────────────────────────
|
|
89
88
|
<
|
|
90
89
|
Target extends ConstrainTarget<TOpt>,
|
|
91
|
-
Key extends
|
|
90
|
+
Key extends
|
|
91
|
+
| SelectorFn<GetSource<$NoInfer<Ns>, KPrefix>, ApplyTarget<Target, TOpt>, TOpt>
|
|
92
|
+
| SelectorKey,
|
|
92
93
|
const Ns extends Namespace = _DefaultNamespace,
|
|
93
94
|
KPrefix = undefined,
|
|
94
95
|
TContext extends string | undefined = undefined,
|
|
@@ -97,9 +98,6 @@ export interface TransSelector {
|
|
|
97
98
|
>(
|
|
98
99
|
props: TransSelectorProps<Key, Ns, KPrefix, TContext, TOpt> & E,
|
|
99
100
|
): React.ReactElement;
|
|
100
|
-
|
|
101
|
-
// ── Pre-computed SelectorKey ────────────────────────────────────────────────
|
|
102
|
-
(props: TransSelectorProps<SelectorKey> & Record<string, any>): React.ReactElement;
|
|
103
101
|
}
|
|
104
102
|
|
|
105
103
|
export const Trans: _EnableSelector extends true | 'optimize' ? TransSelector : TransLegacy;
|
package/dist/es/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"16.6.
|
|
1
|
+
{"type":"module","version":"16.6.4"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-i18next",
|
|
3
|
-
"version": "16.6.
|
|
3
|
+
"version": "16.6.4",
|
|
4
4
|
"description": "Internationalization for react done right. Using the i18next i18n ecosystem.",
|
|
5
5
|
"main": "dist/commonjs/index.js",
|
|
6
6
|
"types": "./index.d.mts",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"i18next": ">= 25.6.2",
|
|
76
76
|
"react": ">= 16.8.0",
|
|
77
|
-
"typescript": "^5"
|
|
77
|
+
"typescript": "^5 || ^6"
|
|
78
78
|
},
|
|
79
79
|
"peerDependenciesMeta": {
|
|
80
80
|
"react-dom": {
|