react-i18next 16.6.2 → 16.6.3

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 CHANGED
@@ -1,3 +1,7 @@
1
+ ### 16.6.3
2
+
3
+ - fix(types): merge `TransSelector` overloads into a single signature so `typeof Trans` remains extendable [1909](https://github.com/i18next/react-i18next/issues/1909)
4
+
1
5
  ### 16.6.2
2
6
 
3
7
  - 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)
@@ -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 SelectorFn<GetSource<$NoInfer<Ns>, KPrefix>, ApplyTarget<Target, TOpt>, TOpt>,
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;
@@ -1 +1 @@
1
- {"type":"module","version":"16.6.2"}
1
+ {"type":"module","version":"16.6.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-i18next",
3
- "version": "16.6.2",
3
+ "version": "16.6.3",
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",