aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/i18next.d.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-10-23 23:53:15 +0800
committercrupest <crupest@outlook.com>2022-10-23 23:53:15 +0800
commit83f4fc8ab07a7f4cd3bba8042d600d7a4543bcaf (patch)
tree24a034a5fb23b71c51ea135efaa23ff24f7016a5 /FrontEnd/src/i18next.d.ts
parent4a12e66fcba50cd566a4ab8c072a50ed0751dc0b (diff)
downloadtimeline-83f4fc8ab07a7f4cd3bba8042d600d7a4543bcaf.tar.gz
timeline-83f4fc8ab07a7f4cd3bba8042d600d7a4543bcaf.tar.bz2
timeline-83f4fc8ab07a7f4cd3bba8042d600d7a4543bcaf.zip
It's been a long time not developing this. Still need some time to get
it work again.
Diffstat (limited to 'FrontEnd/src/i18next.d.ts')
-rw-r--r--FrontEnd/src/i18next.d.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/FrontEnd/src/i18next.d.ts b/FrontEnd/src/i18next.d.ts
new file mode 100644
index 00000000..761b22f3
--- /dev/null
+++ b/FrontEnd/src/i18next.d.ts
@@ -0,0 +1,19 @@
+// import the original type declarations
+import "react-i18next";
+// import all namespaces (for the default language, only)
+import admin from "./locales/en/admin.json";
+import translation from "./locales/en/translation.json";
+
+// react-i18next versions higher than 11.11.0
+declare module "i18next" {
+ // and extend them!
+ interface CustomTypeOptions {
+ // custom namespace type if you changed it
+ defaultNS: "translation";
+ // custom resources type
+ resources: {
+ admin: typeof admin;
+ translation: typeof translation;
+ };
+ }
+}