summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorJoe Carstairs <jcarstairs@scottlogic.com>2023-08-04 18:34:42 +0100
committerJoe Carstairs <jcarstairs@scottlogic.com>2023-08-04 18:34:42 +0100
commitc74568bccde457dd089a4df5b7b97edabd95a56e (patch)
tree540f3582b6ab9fc498dbcb73a74f007decd34a7d /frontend
parent4dea89fa67bf52fff2c4031a19244823aec7493e (diff)
Defines TranslationsDictionary type
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/types/TranslationsDictionary.d.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/frontend/src/types/TranslationsDictionary.d.ts b/frontend/src/types/TranslationsDictionary.d.ts
new file mode 100644
index 0000000..7ebb952
--- /dev/null
+++ b/frontend/src/types/TranslationsDictionary.d.ts
@@ -0,0 +1,6 @@
+import type { defaultLocale } from "../i18n/locales";
+import type Locale from "./Locale";
+
+type TranslationsDictionary<Keys> = {
+ [key in Keys]: { [key in Locale]?: string } & { [key in typeof defaultLocale]: string }
+}; \ No newline at end of file