From ba5f8c991240e9cceeb73a20e4213b4eb373dccd Mon Sep 17 00:00:00 2001 From: Alexander Kachkaev Date: Wed, 25 Apr 2018 00:07:44 +0100 Subject: [PATCH] Add tOptions prop to in react-i18next (#25089) --- types/react-i18next/index.d.ts | 2 +- types/react-i18next/src/trans.d.ts | 5 +++++ types/react-i18next/test/react-i18next-tests.tsx | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/types/react-i18next/index.d.ts b/types/react-i18next/index.d.ts index 356418fe2e..5ea0e7cb91 100644 --- a/types/react-i18next/index.d.ts +++ b/types/react-i18next/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-i18next 7.3 +// Type definitions for react-i18next 7.6 // Project: https://github.com/i18next/react-i18next // Definitions by: Giedrius Grabauskas // Simon Baumann diff --git a/types/react-i18next/src/trans.d.ts b/types/react-i18next/src/trans.d.ts index 8b12c81fc9..c5652315c7 100644 --- a/types/react-i18next/src/trans.d.ts +++ b/types/react-i18next/src/trans.d.ts @@ -1,12 +1,17 @@ import * as React from "react"; import { i18n, TranslationFunction } from "i18next"; +export interface TOptions { + [key: string]: any; +} + export interface TransProps { i18nKey?: string; count?: number; parent?: string; i18n?: i18n; t?: TranslationFunction; + tOptions?: TOptions; } export default class Trans extends React.Component { } diff --git a/types/react-i18next/test/react-i18next-tests.tsx b/types/react-i18next/test/react-i18next-tests.tsx index 46d212e680..7f49913c44 100644 --- a/types/react-i18next/test/react-i18next-tests.tsx +++ b/types/react-i18next/test/react-i18next-tests.tsx @@ -119,6 +119,7 @@ loadNamespaces({components: [App], i18n}).then(() => { ; +; type Key = "view" | "nav";