react-i18next 16.6.4 → 16.6.5
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 +4 -0
- package/dist/es/package.json +1 -1
- package/index.d.ts +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
### 16.6.5
|
|
2
|
+
|
|
3
|
+
- fix(types): selector keyPrefix overload in `useTranslation` no longer matches when `keyPrefix` is absent, fixing `defaultNS: false` with explicit `ns` option [2412](https://github.com/i18next/i18next/issues/2412)
|
|
4
|
+
|
|
1
5
|
### 16.6.4
|
|
2
6
|
|
|
3
7
|
- allow TypeScript 6 as peer dependency [1910](https://github.com/i18next/react-i18next/issues/1910)
|
package/dist/es/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"16.6.
|
|
1
|
+
{"type":"module","version":"16.6.5"}
|
package/index.d.ts
CHANGED
|
@@ -238,11 +238,11 @@ interface UseTranslationLegacy {
|
|
|
238
238
|
interface UseTranslationSelector {
|
|
239
239
|
// Overload: selector function as keyPrefix — provides type-safe key narrowing
|
|
240
240
|
<
|
|
241
|
-
const Ns extends FlatNamespace | $Tuple<FlatNamespace> | undefined
|
|
242
|
-
const KPrefix extends KeyPrefixSelector<FallbackNs<Ns
|
|
241
|
+
const Ns extends FlatNamespace | $Tuple<FlatNamespace> | undefined,
|
|
242
|
+
const KPrefix extends KeyPrefixSelector<FallbackNs<Ns>>,
|
|
243
243
|
>(
|
|
244
244
|
ns: Ns,
|
|
245
|
-
options: UseTranslationOptions<KPrefix
|
|
245
|
+
options: UseTranslationOptions<KPrefix> & { keyPrefix: KPrefix },
|
|
246
246
|
): UseTranslationResponse<FallbackNs<Ns>, KPrefix>;
|
|
247
247
|
|
|
248
248
|
// Overload: string or undefined keyPrefix (original behavior)
|