Skip to content

fix: withI18n HOC typescript inference#879

Merged
tricoder42 merged 1 commit into
lingui:mainfrom
mkarachev:fix/withi18n
Nov 22, 2020
Merged

fix: withI18n HOC typescript inference#879
tricoder42 merged 1 commit into
lingui:mainfrom
mkarachev:fix/withi18n

Conversation

@mkarachev
Copy link
Copy Markdown
Contributor

This PR closes #878

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 21, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/lingui-js/js-lingui/5e7seo1ay
✅ Preview: https://js-lingui-git-fix-withi18n.lingui-js.now.sh

@mkarachev mkarachev changed the title [@lingui/react] withI18n HOC now omits passed components i18n prop FIX: withI18n HOC now omits passed components i18n prop Nov 21, 2020
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 21, 2020

Codecov Report

Merging #879 (bcc60e9) into main (a53e12f) will increase coverage by 0.09%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #879      +/-   ##
==========================================
+ Coverage   82.76%   82.85%   +0.09%     
==========================================
  Files          51       51              
  Lines        1427     1435       +8     
  Branches      392      394       +2     
==========================================
+ Hits         1181     1189       +8     
  Misses        145      145              
  Partials      101      101              
Impacted Files Coverage Δ
packages/react/src/I18nProvider.tsx 83.87% <ø> (ø)
...ackages/babel-plugin-extract-messages/src/index.ts 82.11% <50.00%> (-2.24%) ⬇️
packages/core/src/dev/loadLocaleData.ts 100.00% <0.00%> (+100.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b603626...bcc60e9. Read the comment docs.

@mkarachev mkarachev changed the title FIX: withI18n HOC now omits passed components i18n prop Fix withI18n HOC, now it omits passed component's i18n prop Nov 21, 2020
@semoal semoal changed the title Fix withI18n HOC, now it omits passed component's i18n prop fix: withI18n HOC typescript inference Nov 21, 2020
Copy link
Copy Markdown
Contributor

@tricoder42 tricoder42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you 👍

@tricoder42 tricoder42 merged commit 5927d42 into lingui:main Nov 22, 2020
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.

[@lingui/react, Typecript] withI18n HOC should omit i18n property in wrapped components props

2 participants