i18next 23.4.9 → 23.5.1
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/dist/esm/package.json +1 -1
- package/package.json +1 -1
- package/typescript/helpers.d.ts +1 -1
- package/typescript/options.d.ts +1 -1
- package/typescript/t.d.ts +5 -1
- package/typescript/t.v4.d.ts +4 -1
package/dist/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"23.
|
|
1
|
+
{"type":"module","version":"23.5.1"}
|
package/package.json
CHANGED
package/typescript/helpers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type $MergeBy<T, K> = Omit<T, keyof K> & K;
|
|
2
|
-
export type $Dictionary<T =
|
|
2
|
+
export type $Dictionary<T = unknown> = { [key: string]: T };
|
|
3
3
|
export type $OmitArrayKeys<Arr> = Arr extends readonly any[] ? Omit<Arr, keyof any[]> : Arr;
|
|
4
4
|
export type $PreservedValue<Value, Fallback> = [Value] extends [never] ? Fallback : Value;
|
|
5
5
|
export type $SpecialObject = object | Array<string | object>;
|
package/typescript/options.d.ts
CHANGED
package/typescript/t.d.ts
CHANGED
|
@@ -134,7 +134,10 @@ type ParseInterpolationValues<Ret> =
|
|
|
134
134
|
| (Value extends `${infer ActualValue},${string}` ? ActualValue : Value)
|
|
135
135
|
| ParseInterpolationValues<Rest>
|
|
136
136
|
: never;
|
|
137
|
-
type InterpolationMap<Ret> = Record
|
|
137
|
+
type InterpolationMap<Ret> = Record<
|
|
138
|
+
$PreservedValue<ParseInterpolationValues<Ret>, string>,
|
|
139
|
+
unknown
|
|
140
|
+
>;
|
|
138
141
|
|
|
139
142
|
type ParseTReturnPlural<
|
|
140
143
|
Res,
|
|
@@ -208,6 +211,7 @@ type AppendKeyPrefix<Key, KPrefix> = KPrefix extends string
|
|
|
208
211
|
**************************/
|
|
209
212
|
export interface TFunction<Ns extends Namespace = DefaultNamespace, KPrefix = undefined> {
|
|
210
213
|
$TFunctionBrand: $IsResourcesDefined extends true ? `${$FirstNamespace<Ns>}` : never;
|
|
214
|
+
|
|
211
215
|
<
|
|
212
216
|
const Key extends ParseKeys<Ns, TOpt, KPrefix> | TemplateStringsArray,
|
|
213
217
|
const TOpt extends TOptions,
|
package/typescript/t.v4.d.ts
CHANGED
|
@@ -134,7 +134,10 @@ type ParseInterpolationValues<Ret> =
|
|
|
134
134
|
| (Value extends `${infer ActualValue},${string}` ? ActualValue : Value)
|
|
135
135
|
| ParseInterpolationValues<Rest>
|
|
136
136
|
: never;
|
|
137
|
-
type InterpolationMap<Ret> = Record
|
|
137
|
+
type InterpolationMap<Ret> = Record<
|
|
138
|
+
$PreservedValue<ParseInterpolationValues<Ret>, string>,
|
|
139
|
+
unknown
|
|
140
|
+
>;
|
|
138
141
|
|
|
139
142
|
type ParseTReturnPlural<
|
|
140
143
|
Res,
|