i18next 23.4.0 → 23.4.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 +30 -5
- package/package.json +1 -1
- package/typescript/options.d.ts +2 -2
- package/typescript/t.d.ts +8 -2
- package/typescript/t.v4.d.ts +8 -2
package/dist/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"23.4.
|
|
1
|
+
{"type":"module","version":"23.4.2"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Internal Helpers
|
|
2
|
-
import type { $Dictionary } from 'typescript/helpers';
|
|
2
|
+
import type { $Dictionary } from './typescript/helpers.d.ts';
|
|
3
3
|
import type {
|
|
4
4
|
DefaultNamespace,
|
|
5
5
|
FlatNamespace,
|
|
@@ -11,9 +11,9 @@ import type {
|
|
|
11
11
|
ResourceKey,
|
|
12
12
|
ResourceLanguage,
|
|
13
13
|
TOptions,
|
|
14
|
-
} from 'typescript/options';
|
|
14
|
+
} from './typescript/options.d.ts';
|
|
15
15
|
|
|
16
|
-
import type { KeyPrefix, TFunction } from 'typescript/t';
|
|
16
|
+
import type { KeyPrefix, TFunction } from './typescript/t.d.ts';
|
|
17
17
|
|
|
18
18
|
export interface WithT<Ns extends Namespace = DefaultNamespace> {
|
|
19
19
|
// Expose parameterized t in the i18next interface hierarchy
|
|
@@ -494,8 +494,33 @@ export interface i18n {
|
|
|
494
494
|
emit(eventName: string, ...args: any[]): void;
|
|
495
495
|
}
|
|
496
496
|
|
|
497
|
-
export type * from 'typescript/options';
|
|
498
|
-
export type
|
|
497
|
+
export type * from './typescript/options.d.ts';
|
|
498
|
+
export type {
|
|
499
|
+
FallbackLngObjList,
|
|
500
|
+
FallbackLng,
|
|
501
|
+
InitOptions,
|
|
502
|
+
TypeOptions,
|
|
503
|
+
CustomTypeOptions,
|
|
504
|
+
CustomPluginOptions,
|
|
505
|
+
PluginOptions,
|
|
506
|
+
FormatFunction,
|
|
507
|
+
InterpolationOptions,
|
|
508
|
+
ReactOptions,
|
|
509
|
+
ResourceKey,
|
|
510
|
+
ResourceLanguage,
|
|
511
|
+
Resource,
|
|
512
|
+
TOptions,
|
|
513
|
+
Namespace,
|
|
514
|
+
DefaultNamespace,
|
|
515
|
+
} from './typescript/options.d.ts';
|
|
516
|
+
export type * from './typescript/t.d.ts';
|
|
517
|
+
export type {
|
|
518
|
+
TFunction,
|
|
519
|
+
ParseKeys,
|
|
520
|
+
TFunctionReturn,
|
|
521
|
+
TFunctionDetailedResult,
|
|
522
|
+
KeyPrefix,
|
|
523
|
+
} from './typescript/t.d.ts';
|
|
499
524
|
|
|
500
525
|
declare const i18next: i18n;
|
|
501
526
|
export default i18next;
|
package/package.json
CHANGED
package/typescript/options.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { $MergeBy, $PreservedValue, $Dictionary } from './helpers';
|
|
1
|
+
import type { $MergeBy, $PreservedValue, $Dictionary } from './helpers.d.ts';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* This interface can be augmented by users to add types to `i18next` default TypeOptions.
|
|
@@ -548,7 +548,7 @@ export interface InitOptions<T = object> extends PluginOptions<T> {
|
|
|
548
548
|
overloadTranslationOptionHandler?(args: string[]): TOptions;
|
|
549
549
|
|
|
550
550
|
/**
|
|
551
|
-
* @see https://www.i18next.com/interpolation
|
|
551
|
+
* @see https://www.i18next.com/translation-function/interpolation
|
|
552
552
|
*/
|
|
553
553
|
interpolation?: InterpolationOptions;
|
|
554
554
|
|
package/typescript/t.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import type { $OmitArrayKeys, $PreservedValue, $Dictionary, $SpecialObject } from './helpers';
|
|
2
|
-
import type {
|
|
1
|
+
import type { $OmitArrayKeys, $PreservedValue, $Dictionary, $SpecialObject } from './helpers.d.ts';
|
|
2
|
+
import type {
|
|
3
|
+
TypeOptions,
|
|
4
|
+
Namespace,
|
|
5
|
+
FlatNamespace,
|
|
6
|
+
DefaultNamespace,
|
|
7
|
+
TOptions,
|
|
8
|
+
} from './options.d.ts';
|
|
3
9
|
|
|
4
10
|
type $IsResourcesDefined = [keyof _Resources] extends [never] ? false : true;
|
|
5
11
|
type $ValueIfResourcesDefined<Value, Fallback> = $IsResourcesDefined extends true
|
package/typescript/t.v4.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import type { $OmitArrayKeys, $PreservedValue, $Dictionary, $SpecialObject } from './helpers';
|
|
2
|
-
import type {
|
|
1
|
+
import type { $OmitArrayKeys, $PreservedValue, $Dictionary, $SpecialObject } from './helpers.d.ts';
|
|
2
|
+
import type {
|
|
3
|
+
TypeOptions,
|
|
4
|
+
Namespace,
|
|
5
|
+
FlatNamespace,
|
|
6
|
+
DefaultNamespace,
|
|
7
|
+
TOptions,
|
|
8
|
+
} from './options.d.ts';
|
|
3
9
|
|
|
4
10
|
type $IsResourcesDefined = [keyof _Resources] extends [never] ? false : true;
|
|
5
11
|
type $ValueIfResourcesDefined<Value, Fallback> = $IsResourcesDefined extends true
|