react-i18next 11.14.0 → 11.14.1

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
+ ### 11.14.1
2
+
3
+ - Rollback [1402](https://github.com/i18next/react-i18next/pull/1402): Remove generics from Trans component to suppress warning issue [1400](https://github.com/i18next/react-i18next/pull/1400)
4
+
1
5
  ### 11.14.0
2
6
 
3
7
  - Remove generics from Trans component to suppress warning issue [1400](https://github.com/i18next/react-i18next/pull/1400)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-i18next",
3
- "version": "11.14.0",
3
+ "version": "11.14.1",
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.ts",
package/ts4.1/index.d.ts CHANGED
@@ -214,6 +214,7 @@ export interface TFunction<
214
214
 
215
215
  type I18nKeyType<N extends Namespace> = TFuncKey<N> extends infer A ? A : never;
216
216
  export interface TransProps<
217
+ K extends TFuncKey<N> extends infer A ? A : never,
217
218
  N extends Namespace = DefaultNamespace,
218
219
  E extends Element = HTMLDivElement
219
220
  > extends React.HTMLProps<E> {
@@ -222,7 +223,7 @@ export interface TransProps<
222
223
  count?: number;
223
224
  defaults?: string;
224
225
  i18n?: i18n;
225
- i18nKey?: I18nKeyType<N> | I18nKeyType<N>[];
226
+ i18nKey?: K | K[];
226
227
  ns?: N;
227
228
  parent?: string | React.ComponentType<any> | null; // used in React.createElement if not null
228
229
  tOptions?: {};
@@ -230,9 +231,11 @@ export interface TransProps<
230
231
  t?: TFunction<N>;
231
232
  }
232
233
 
233
- export function Trans<N extends Namespace = DefaultNamespace, E extends Element = HTMLDivElement>(
234
- props: TransProps<N, E>,
235
- ): React.ReactElement;
234
+ export function Trans<
235
+ K extends TFuncKey<N> extends infer A ? A : never,
236
+ N extends Namespace = DefaultNamespace,
237
+ E extends Element = HTMLDivElement
238
+ >(props: TransProps<K, N, E>): React.ReactElement;
236
239
 
237
240
  export function useSSR(initialI18nStore: Resource, initialLanguage: string): void;
238
241