Skip to content

Commit

Permalink
fix(translations): type StripCountVariants not working in TS strict m…
Browse files Browse the repository at this point in the history
…ode (#6374)

This also removes the unnecessary StripCountVariants utility use for
when NestedKeysStripped<T[K]> is an object
  • Loading branch information
AlessioGr committed May 16, 2024
1 parent 3456b5f commit 1abcdf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/translations/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export type NestedKeysStripped<T> = T extends object
? {
[K in keyof T]-?: K extends string
? T[K] extends object
? `${K}:${StripCountVariants<NestedKeysStripped<T[K]>>}` | null
? `${K}:${NestedKeysStripped<T[K]>}`
: `${StripCountVariants<K>}`
: never
}[keyof T]
Expand Down

0 comments on commit 1abcdf9

Please sign in to comment.