i18next 25.10.3 → 25.10.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/index.d.ts +3 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
package/dist/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"25.10.
|
|
1
|
+
{"type":"module","version":"25.10.4"}
|
package/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import type {
|
|
|
12
12
|
ResourceLanguage,
|
|
13
13
|
TOptions,
|
|
14
14
|
} from './typescript/options.js';
|
|
15
|
-
import type { KeyPrefix, TFunction, KeyFromSelectorFn } from './typescript/t.js';
|
|
15
|
+
import type { KeyPrefix, TFunction, KeyFromSelectorFn, SelectorKey } from './typescript/t.js';
|
|
16
16
|
|
|
17
17
|
export interface WithT<Ns extends Namespace = DefaultNamespace> {
|
|
18
18
|
// Expose parameterized t in the i18next interface hierarchy
|
|
@@ -200,11 +200,13 @@ export type Callback = (error: any, t: TFunction) => void;
|
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
202
|
* Uses similar args as the t function and returns true if a key exists.
|
|
203
|
+
* Acts as a type guard, narrowing the key to {@link SelectorKey} so it can be passed to `t()`.
|
|
203
204
|
*/
|
|
204
205
|
export interface ExistsFunction<
|
|
205
206
|
TKeys extends string = string,
|
|
206
207
|
TInterpolationMap extends object = $Dictionary,
|
|
207
208
|
> {
|
|
209
|
+
(key: TKeys, options?: TOptions<TInterpolationMap>): key is TKeys & SelectorKey;
|
|
208
210
|
(key: TKeys | TKeys[], options?: TOptions<TInterpolationMap>): boolean;
|
|
209
211
|
}
|
|
210
212
|
|
package/jsr.json
CHANGED