react-i18next 11.11.1 → 11.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/ts4.1/index.d.ts +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
### 11.11.2
|
|
2
|
+
|
|
3
|
+
- feat(typings): support readonly namespaces in TFuncKey [1340](https://github.com/i18next/react-i18next/pull/1340)
|
|
4
|
+
|
|
1
5
|
### 11.11.1
|
|
2
6
|
|
|
3
7
|
- feat(types): allow readonly namespaces in useTranslation [1339](https://github.com/i18next/react-i18next/pull/1339)
|
package/package.json
CHANGED
package/ts4.1/index.d.ts
CHANGED
|
@@ -125,10 +125,9 @@ type NormalizeMultiReturn<T, V> = V extends `${infer N}:${infer R}`
|
|
|
125
125
|
: never
|
|
126
126
|
: never;
|
|
127
127
|
|
|
128
|
-
export type TFuncKey<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
> = N extends (keyof T)[]
|
|
128
|
+
export type TFuncKey<N extends Namespace = DefaultNamespace, T = DefaultResources> = N extends
|
|
129
|
+
| (keyof T)[]
|
|
130
|
+
| Readonly<(keyof T)[]>
|
|
132
131
|
? NormalizeMulti<T, N[number]>
|
|
133
132
|
: N extends keyof T
|
|
134
133
|
? Normalize<T[N]>
|