We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b7806f commit 8385e0eCopy full SHA for 8385e0e
2 files changed
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "type-locales",
3
- "version": "3.2.2",
+ "version": "3.2.3",
4
"description": "A simple tool for typing your locales and a util for easy manage of i18n with typescript",
5
"main": "build/mod.js",
6
"bin": {
src/index.ts
@@ -2,9 +2,9 @@ import i18n from 'i18n'
import { LocaleKeys } from './keys.js'
type NestedKeyOf<T> = {
- [K in keyof T]: T[K] extends string
- ? T[K]
7
- : `${NestedKeyOf<T[K]>}`
+ [K in keyof T]: T[K] extends string ? T[K]
+ : T[K] extends object ? NestedKeyOf<T[K]>
+ : never
8
}[keyof T]
9
10
interface Translate<T extends LocaleKeys = LocaleKeys> {
0 commit comments