diff --git a/types/i18next/index.d.ts b/types/i18next/index.d.ts index 61b59b32e1..7674762de6 100644 --- a/types/i18next/index.d.ts +++ b/types/i18next/index.d.ts @@ -493,7 +493,7 @@ declare namespace i18next { /** * Returns rtl or ltr depending on languages read direction. */ - dir(lng?: string): void; + dir(lng?: string): "ltr" | "rtl"; /** * Exposes interpolation.format function added on init. diff --git a/types/i18next/v2/index.d.ts b/types/i18next/v2/index.d.ts index f9bd900e77..b67a5f9423 100644 --- a/types/i18next/v2/index.d.ts +++ b/types/i18next/v2/index.d.ts @@ -128,7 +128,7 @@ declare namespace i18n { loadLanguages(lngs: string[], callback?: () => void): void; - dir(lng?: string): string; + dir(lng?: string): "ltr" | "rtl"; createInstance(options?: Options, callback?: (err: any, t: TranslationFunction) => void): I18n;