File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,8 +45,9 @@ export type Locale =
4545for validating of other dictionaries have same keys as en dictionary
4646some might be missing, but the shape should be the same
4747*/
48- type DeepPartial < T > =
49- T extends Record < string , unknown > ? { [ K in keyof T ] ?: DeepPartial < T [ K ] > } : T ;
48+ type DeepPartial < T > = T extends Record < string , unknown >
49+ ? { [ K in keyof T ] ?: DeepPartial < T [ K ] > }
50+ : T ;
5051
5152const raw_dict_map : Record < Locale , ( ) => Promise < { dict : DeepPartial < RawDictionary > } > > = {
5253 // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-explicit-any
@@ -95,8 +96,8 @@ const toLocale = (string: string): Locale | undefined =>
9596 string in raw_dict_map
9697 ? ( string as Locale )
9798 : string in LANG_ALIASES
98- ? ( LANG_ALIASES [ string ] as Locale )
99- : undefined ;
99+ ? ( LANG_ALIASES [ string ] as Locale )
100+ : undefined ;
100101
101102interface Settings {
102103 locale : Locale ;
You can’t perform that action at this time.
0 commit comments