From e4cdb512facd62a1bffd023c644f74e09640f3b7 Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Sun, 1 Dec 2024 23:16:39 +0000 Subject: [PATCH] Simplify --- apps/web/src/i18n/types.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/apps/web/src/i18n/types.ts b/apps/web/src/i18n/types.ts index 4ebabb1c1..57531f04d 100644 --- a/apps/web/src/i18n/types.ts +++ b/apps/web/src/i18n/types.ts @@ -1,11 +1,3 @@ import type app from "../../public/locales/en/app.json"; -// Use the actual translation type from the JSON file -export type TxKeyPath = RecursiveKeyOf; - -// Helper type to get all possible paths in dot notation -type RecursiveKeyOf> = { - [TKey in keyof TObj & string]: TObj[TKey] extends Record - ? `${TKey}.${RecursiveKeyOf}` - : TKey; -}[keyof TObj & string]; +export type TxKeyPath = keyof typeof app;