File tree 1 file changed +6
-4
lines changed 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,13 @@ declare module 'i18next' {
53
53
}
54
54
55
55
// Normalize single namespace
56
- type OmitArrayProps < T > = Exclude < T , keyof any [ ] > ;
57
- type AppendKeys < K1 , K2 > = `${K1 & string } .${OmitArrayProps < K2 > & string } `;
56
+ type AppendKeys < K1 , K2 > = `${ K1 & string } .${ K2 & string } ` ;
57
+ type AppendKeys2 < K1 , K2 > = `${K1 & string } .${Exclude < K2 , keyof any [ ] > & string } `;
58
58
type Normalize2 < T , K = keyof T > = K extends keyof T
59
- ? T [ K ] extends object
60
- ? AppendKeys < K , keyof T [ K ] > | AppendKeys < K , Normalize2 < T [ K ] > >
59
+ ? T [ K ] extends Record < string , any >
60
+ ? T [ K ] extends readonly any [ ]
61
+ ? AppendKeys2 < K , keyof T [ K ] > | AppendKeys2 < K , Normalize2 < T [ K ] > >
62
+ : AppendKeys < K , keyof T [ K ] > | AppendKeys < K , Normalize2 < T [ K ] > >
61
63
: never
62
64
: never ;
63
65
type Normalize < T > = keyof T | Normalize2 < T > ;
You can’t perform that action at this time.
0 commit comments