i18next 23.2.0 → 23.2.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/dist/esm/package.json +1 -1
- package/index.d.ts +9 -7
- package/package.json +3 -2
package/dist/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"23.2.
|
|
1
|
+
{"type":"module","version":"23.2.2"}
|
package/index.d.ts
CHANGED
|
@@ -747,7 +747,9 @@ type _KeySeparator = TypeOptions['keySeparator'];
|
|
|
747
747
|
type _NsSeparator = TypeOptions['nsSeparator'];
|
|
748
748
|
type _PluralSeparator = TypeOptions['pluralSeparator'];
|
|
749
749
|
type _DefaultNamespace = TypeOptions['defaultNS'];
|
|
750
|
-
type _FallbackNamespace = TypeOptions['fallbackNS']
|
|
750
|
+
type _FallbackNamespace = TypeOptions['fallbackNS'] extends false
|
|
751
|
+
? TypeOptions['defaultNS']
|
|
752
|
+
: TypeOptions['fallbackNS'];
|
|
751
753
|
type _Resources = TypeOptions['resources'];
|
|
752
754
|
type _JSONFormat = TypeOptions['jsonFormat'];
|
|
753
755
|
type _InterpolationPrefix = TypeOptions['interpolationPrefix'];
|
|
@@ -841,21 +843,21 @@ export type ParseKeys<
|
|
|
841
843
|
Keys extends $Dictionary = KeysByTOptions<TOpt>,
|
|
842
844
|
ActualNS extends Namespace = NsByTOptions<Ns, TOpt>,
|
|
843
845
|
> = $IsResourcesDefined extends true
|
|
844
|
-
? _FallbackNamespace extends
|
|
845
|
-
?
|
|
846
|
-
| ParseKeysByKeyPrefix<Keys[$FirstNamespace<ActualNS>], KPrefix>
|
|
847
|
-
| ParseKeysByNamespaces<ActualNS, Keys>
|
|
848
|
-
: _FallbackNamespace extends Array<infer FallbackNs extends Namespace>
|
|
846
|
+
? _FallbackNamespace extends Array<infer FallbackNs extends Namespace>
|
|
849
847
|
?
|
|
850
848
|
| ParseKeysByKeyPrefix<Keys[$FirstNamespace<ActualNS>], KPrefix>
|
|
851
849
|
| ParseKeysByKeyPrefix<Keys[$FirstNamespace<FallbackNs>], KPrefix>
|
|
852
850
|
| ParseKeysByNamespaces<ActualNS, Keys>
|
|
853
851
|
| ParseKeysByNamespaces<FallbackNs, Keys>
|
|
854
|
-
:
|
|
852
|
+
: _FallbackNamespace extends Namespace
|
|
853
|
+
?
|
|
855
854
|
| ParseKeysByKeyPrefix<Keys[$FirstNamespace<ActualNS>], KPrefix>
|
|
856
855
|
| ParseKeysByKeyPrefix<Keys[$FirstNamespace<_FallbackNamespace>], KPrefix>
|
|
857
856
|
| ParseKeysByNamespaces<ActualNS, Keys>
|
|
858
857
|
| ParseKeysByNamespaces<_FallbackNamespace, Keys>
|
|
858
|
+
:
|
|
859
|
+
| ParseKeysByKeyPrefix<Keys[$FirstNamespace<ActualNS>], KPrefix>
|
|
860
|
+
| ParseKeysByNamespaces<ActualNS, Keys>
|
|
859
861
|
: string;
|
|
860
862
|
|
|
861
863
|
/*********************************************************
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "i18next",
|
|
3
|
-
"version": "23.2.
|
|
3
|
+
"version": "23.2.2",
|
|
4
4
|
"description": "i18next internationalization framework",
|
|
5
5
|
"main": "./dist/cjs/i18next.js",
|
|
6
6
|
"module": "./dist/esm/i18next.js",
|
|
@@ -103,13 +103,14 @@
|
|
|
103
103
|
"watchify": "4.0.0"
|
|
104
104
|
},
|
|
105
105
|
"scripts": {
|
|
106
|
-
"pretest": "npm run test:typescript && npm run test:typescript:customtypes && npm run test:typescript:noninterop",
|
|
106
|
+
"pretest": "npm run test:typescript && npm run test:typescript:customtypes && npm run test:typescript:fallbacktypes && npm run test:typescript:noninterop",
|
|
107
107
|
"lint": "eslint src",
|
|
108
108
|
"test": "npm run lint && npm run test:new && npm run test:compat",
|
|
109
109
|
"test:new": "karma start karma.conf.js --singleRun",
|
|
110
110
|
"test:compat": "karma start karma.backward.conf.js --singleRun",
|
|
111
111
|
"test:typescript": "tslint --project tsconfig.json",
|
|
112
112
|
"test:typescript:customtypes": "tslint --project test/typescript/custom-types/tsconfig.json",
|
|
113
|
+
"test:typescript:fallbacktypes": "tslint --project test/typescript/fallback-types/tsconfig.json",
|
|
113
114
|
"test:typescript:noninterop": "tslint --project tsconfig.nonEsModuleInterop.json",
|
|
114
115
|
"tdd": "karma start karma.conf.js",
|
|
115
116
|
"tdd:compat": "karma start karma.backward.conf.js",
|