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 commented Aug 1, 2019

Depends on i18next/i18next#1296

@rosskevin rosskevin added the typescript label Aug 1, 2019
@rosskevin rosskevin merged commit 5e41c7a into i18next:master Aug 1, 2019
3 checks passed
3 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
codeclimate All good!
Details
workflow Workflow: workflow
Details
@rosskevin rosskevin deleted the rosskevin:ts-use branch Aug 1, 2019
@rosskevin

This comment has been minimized.

Copy link
Collaborator Author

rosskevin commented Aug 1, 2019

@jamuhl this can be a patch release

@coveralls

This comment has been minimized.

Copy link

coveralls commented Aug 1, 2019

Coverage Status

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

@jamuhl

This comment has been minimized.

Copy link
Member

jamuhl commented Aug 3, 2019

published in react-i18next@10.11.5

@kuzvac

This comment has been minimized.

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

This comment has been minimized.

Copy link
Collaborator Author

rosskevin commented Sep 19, 2019

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

@kuzvac

This comment has been minimized.

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

This comment has been minimized.

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
4 participants
You can’t perform that action at this time.