i18next 23.4.3 → 23.4.4
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/t.v4.d.ts +3 -2
package/dist/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"23.4.
|
|
1
|
+
{"type":"module","version":"23.4.4"}
|
package/package.json
CHANGED
package/typescript/t.v4.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ type _ReturnNull = TypeOptions['returnNull'];
|
|
|
19
19
|
type _KeySeparator = TypeOptions['keySeparator'];
|
|
20
20
|
type _NsSeparator = TypeOptions['nsSeparator'];
|
|
21
21
|
type _PluralSeparator = TypeOptions['pluralSeparator'];
|
|
22
|
+
type _ContextSeparator = TypeOptions['contextSeparator'];
|
|
22
23
|
type _FallbackNamespace = TypeOptions['fallbackNS'];
|
|
23
24
|
type _Resources = TypeOptions['resources'];
|
|
24
25
|
type _JSONFormat = TypeOptions['jsonFormat'];
|
|
@@ -104,7 +105,7 @@ type ParseKeysByFallbackNs<Keys extends $Dictionary> = _FallbackNamespace extend
|
|
|
104
105
|
: Keys[_FallbackNamespace & string];
|
|
105
106
|
|
|
106
107
|
type FilterKeysByContext<Keys, TOpt extends TOptions> = TOpt['context'] extends string
|
|
107
|
-
? Keys extends `${infer Prefix}
|
|
108
|
+
? Keys extends `${infer Prefix}${_ContextSeparator}${TOpt['context']}${infer Suffix}`
|
|
108
109
|
? `${Prefix}${Suffix}`
|
|
109
110
|
: never
|
|
110
111
|
: Keys;
|
|
@@ -156,7 +157,7 @@ type TReturnOptionalObjects<TOpt extends TOptions> = _ReturnObjects extends true
|
|
|
156
157
|
type DefaultTReturn<TOpt extends TOptions> = TReturnOptionalObjects<TOpt> | TReturnOptionalNull;
|
|
157
158
|
|
|
158
159
|
type KeyWithContext<Key, TOpt extends TOptions> = TOpt['context'] extends string
|
|
159
|
-
? `${Key & string}
|
|
160
|
+
? `${Key & string}${_ContextSeparator}${TOpt['context']}`
|
|
160
161
|
: Key;
|
|
161
162
|
|
|
162
163
|
export type TFunctionReturn<
|