From c9626b119936609cdadd1c6a6720a1ad1e14e78d Mon Sep 17 00:00:00 2001 From: Chris Hubbard Date: Fri, 15 Nov 2024 11:07:33 -0500 Subject: [PATCH] Fix WritingSystem types --- config/index.d.ts | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/config/index.d.ts b/config/index.d.ts index d00704f5..8e386c79 100644 --- a/config/index.d.ts +++ b/config/index.d.ts @@ -92,28 +92,26 @@ export type AudioConfig = { }; export type WritingSystemConfig = { - [key: string]: { - displayNames: { - [key: string]: string; - }; - fontFamily: string; - textDirection: string; + displayNames: { + [key: string]: string; }; + fontFamily: string; + textDirection: string; }; export type DictionaryWritingSystemConfig = WritingSystemConfig & { code: string; type: string; - trait: { + trait?: { [key: string]: string; }; sortingMethod: { type: string; ignoreChars?: string[]; }; - alphabet: string[]; + alphabet?: string[]; inputButtons?: string[]; - reversalFilename: string; + reversalFilename?: string; features?: { [name: string]: boolean; }; @@ -204,7 +202,9 @@ export type AppConfig = { }; interfaceLanguages?: { useSystemLanguage: boolean; - writingSystems: WritingSystemConfig; + writingSystems: { + [key: string]: WritingSystemConfig; + }; }; keys?: string[]; analytics?: { @@ -278,7 +278,9 @@ export type ScriptureConfig = AppConfig & { }; export type DictionaryConfig = AppConfig & { - writingSystems: DictionaryWritingSystemConfig; + writingSystems: { + [key: string]: DictionaryWritingSystemConfig; + }; indexes: { [key: string]: { displayed: boolean;