Skip to content

Conversation

nemuvski
Copy link
Contributor

@nemuvski nemuvski commented Aug 21, 2025

Hello,

I have updated to v15.7.0, but I encountered a case where type inference with useTranslation() does not work correctly.

In my project, I am using i18next v25.3.x.
(I am aware that updating to v25.4 would resolve the issue.)

Since enableSelector is not defined in TypeOptions, type inference is failing.

ss-inferred-any

Looking at the peerDependencies, I noticed that "i18next": ">= 23.2.3" is specified.
Considering compatibility, I thought it would be appropriate to handle cases where enableSelector is not present in TypeOptions, so I made this PR.

Thank you for your consideration.

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • run tests npm run test
  • tests are included
  • commit message and code follows the Developer's Certification of Origin

@adrai
Copy link
Member

adrai commented Aug 21, 2025

@ahrjarrett ok for you?

@coveralls
Copy link

Coverage Status

coverage: 95.864%. remained the same
when pulling 73a7260 on nemuvski:fix-enableselector-type
into 1d7ad47 on i18next:master.

@ahrjarrett
Copy link
Member

Ah, good catch. @adrai yep, makes sense to me

@adrai adrai merged commit 641f6e5 into i18next:master Aug 21, 2025
9 checks passed
@adrai
Copy link
Member

adrai commented Aug 21, 2025

Thank you...
included in v15.7.1

@nemuvski nemuvski deleted the fix-enableselector-type branch August 21, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants