From 909d058486a2673eca4fa60deec9c45bf8ffc90f Mon Sep 17 00:00:00 2001 From: Florian Trayon <26360935+FlorianLeChat@users.noreply.github.com> Date: Mon, 30 Jan 2023 22:40:11 +0100 Subject: [PATCH] Another attempt to fix the TypeScript error for translations Bug tracker: https://github.com/i18next/react-i18next/issues/1601 --- client/@types/i18next.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/@types/i18next.d.ts b/client/@types/i18next.d.ts index 48cba98..b315d71 100644 --- a/client/@types/i18next.d.ts +++ b/client/@types/i18next.d.ts @@ -1,12 +1,15 @@ // Paramètres personnalisés pour le typage de i18next. import "i18next"; +import type common from "@public/locales/en/common.json"; declare module "i18next" { interface CustomTypeOptions { defaultNS: "common"; - resources: I18nNamespaces; + resources: { + common: typeof common; + }; returnNull: false; returnEmptyString: false; }