react-i18next 11.8.4 β†’ 11.8.5

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 CHANGED
@@ -1,3 +1,7 @@
1
+ ### 11.8.5
2
+
3
+ - typescript: fix: Inference for specific keys ts 4.1 [1230](https://github.com/i18next/react-i18next/pull/1230)
4
+
1
5
  ### 11.8.4
2
6
 
3
7
  - typescript: Add workaround to suppress infinite instantiation warning [1227](https://github.com/i18next/react-i18next/pull/1227)
package/README.md CHANGED
@@ -144,6 +144,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
144
144
  <td align="center"><a href="http://twitter.com/jamuhl"><img src="https://avatars3.githubusercontent.com/u/977772?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jan MΓΌhlemann</b></sub></a><br /><a href="https://github.com/i18next/react-i18next/commits?author=jamuhl" title="Code">πŸ’»</a> <a href="#example-jamuhl" title="Examples">πŸ’‘</a> <a href="https://github.com/i18next/react-i18next/commits?author=jamuhl" title="Documentation">πŸ“–</a> <a href="#question-jamuhl" title="Answering Questions">πŸ’¬</a></td>
145
145
  <td align="center"><a href="http://twitter.com/#!/adrirai"><img src="https://avatars0.githubusercontent.com/u/1086194?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adriano Raiano</b></sub></a><br /><a href="https://github.com/i18next/react-i18next/commits?author=adrai" title="Code">πŸ’»</a> <a href="#example-adrai" title="Examples">πŸ’‘</a> <a href="https://github.com/i18next/react-i18next/commits?author=adrai" title="Documentation">πŸ“–</a> <a href="#question-adrai" title="Answering Questions">πŸ’¬</a></td>
146
146
  <td align="center"><a href="https://tigerabrodi.dev/"><img src="https://avatars1.githubusercontent.com/u/49603590?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tiger Abrodi</b></sub></a><br /><a href="#question-tigerabrodi" title="Answering Questions">πŸ’¬</a> <a href="https://github.com/i18next/react-i18next/commits?author=tigerabrodi" title="Code">πŸ’»</a> <a href="https://github.com/i18next/react-i18next/pulls?q=is%3Apr+reviewed-by%3Atigerabrodi" title="Reviewed Pull Requests">πŸ‘€</a></td>
147
+ <td align="center"><a href="https://github.com/pedrodurek"><img src="https://avatars1.githubusercontent.com/u/12190482?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pedro Durek</b></sub></a><br /><a href="https://github.com/i18next/react-i18next/commits?author=pedrodurek" title="Code">πŸ’»</a> <a href="#example-pedrodurek" title="Examples">πŸ’‘</a></td>
147
148
  </tr>
148
149
  </table>
149
150
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-i18next",
3
- "version": "11.8.4",
3
+ "version": "11.8.5",
4
4
  "description": "Internationalization for react done right. Using the i18next i18n ecosystem.",
5
5
  "main": "dist/commonjs/index.js",
6
6
  "types": "src/index.d.ts",
@@ -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>;