Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix types for use() #912

Merged
merged 1 commit into from
Aug 1, 2019
Merged

fix types for use() #912

merged 1 commit into from
Aug 1, 2019

Conversation

rosskevin
Copy link
Collaborator

@rosskevin rosskevin merged commit 5e41c7a into i18next:master Aug 1, 2019
@rosskevin rosskevin deleted the ts-use branch August 1, 2019 18:18
@rosskevin
Copy link
Collaborator Author

@jamuhl this can be a patch release

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.017% when pulling 9e8c263 on rosskevin:ts-use into aeb8078 on i18next:master.

@jamuhl
Copy link
Member

jamuhl commented Aug 3, 2019

published in react-i18next@10.11.5

@kuzvac
Copy link

kuzvac commented Sep 19, 2019

Hi @rosskevin, today i updated all our i18next dependencies and found that types for t is lost, if i use withTranslation HOC. After short investigation i found that this type of import import * as i18next from 'i18next'; breaks types definition borrowed from i18next.
I use typescript v. 3.4.5
image
201909198ojz8

But if change this import just to import i18next from 'i18next'; everything is working properly.
I can make PR for replace import * as i18next from 'i18next'; to import i18next from 'i18next'; :)

@rosskevin
Copy link
Collaborator Author

@kuzvac please see #931 (comment) or file a new PR with a breaking test case. This is thoroughly tested.

@kuzvac
Copy link

kuzvac commented Sep 19, 2019

@rosskevin thanks. hmmm... react-i18next test is working properly with our tsconfig & tslint files. Looks like it's problem with our code/dependencies :)

@kuzvac
Copy link

kuzvac commented Sep 30, 2019

@rosskevin I found why the error occurs in my case :)
I do clean install, compare version of i18next modules, and found that, in version that doesn't work, i have i18next^15.1.3 and react-i18next^10.12.5
What a mess, shame on me 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants