i18next 26.5.2 → 26.5.3

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.
@@ -1 +1 @@
1
- {"type":"module","version":"26.5.2"}
1
+ {"type":"module","version":"26.5.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18next",
3
- "version": "26.5.2",
3
+ "version": "26.5.3",
4
4
  "description": "i18next internationalization framework",
5
5
  "main": "./dist/cjs/i18next.js",
6
6
  "module": "./dist/esm/i18next.js",
package/typescript/t.d.ts CHANGED
@@ -819,19 +819,31 @@ interface TFunctionSelector<Ns extends Namespace, KPrefix, Source> extends Brand
819
819
  ...args: [options?: Opts & $Dictionary]
820
820
  ): DefaultTReturn<Opts>;
821
821
 
822
- // ── Selector(s) with explicit `ns` ───────────────────────────────────────────
822
+ // ── Array of selectors with explicit `ns` ───────────────────────────────────
823
823
  <
824
824
  Target extends ConstrainTarget<Opts>,
825
825
  const NewNs extends NsArg<Ns> & Namespace,
826
826
  const Opts extends SelectorOptions<NewNs>,
827
827
  NewSrc extends GetSource<NewNs, KPrefix>,
828
828
  >(
829
- selector:
830
- | SelectorFn<NewSrc, ApplyTarget<Target, Opts>, Opts>
831
- | readonly SelectorFn<NewSrc, ApplyTarget<Target, Opts>, Opts>[],
829
+ selectors: readonly SelectorFn<NewSrc, ApplyTarget<Target, Opts>, Opts>[],
832
830
  options: Opts & InterpolationMap<Target> & { ns: NewNs },
833
831
  ): SelectorReturn<Target, Opts>;
834
832
 
833
+ // ── Single selector with explicit `ns` ──────────────────────────────────────
834
+ <
835
+ Target extends ConstrainTarget<Opts>,
836
+ const NewNs extends NsArg<Ns> & Namespace,
837
+ const Opts extends SelectorOptions<NewNs>,
838
+ NewSrc extends GetSource<NewNs, KPrefix>,
839
+ >(
840
+ selector: SelectorFn<NewSrc, ApplyTarget<Target, Opts>, Opts>,
841
+ options: Opts &
842
+ InterpolationMap<DeepUnwrapPlural<Target>> & {
843
+ ns: NewNs;
844
+ } & (Target extends PluralValue<string> ? { count: number } : {}),
845
+ ): SelectorReturn<Target, Opts>;
846
+
835
847
  // ── Array of selectors with default `ns` ─────────────────────────────────────
836
848
  // Captures the selector tuple as `const Fns` so TypeScript preserves each
837
849
  // element's exact return type. The union of return types is then extracted