Skip to content

Make the translation function fully type-safe#1775

Merged
adrai merged 14 commits into
i18next:masterfrom
pedrodurek:make-translation-type-safe
Oct 19, 2022
Merged

Make the translation function fully type-safe#1775
adrai merged 14 commits into
i18next:masterfrom
pedrodurek:make-translation-type-safe

Conversation

@pedrodurek

@pedrodurek pedrodurek commented May 13, 2022

Copy link
Copy Markdown
Member

Closes #1504
Closes #1811

We'll no longer support typescript below v4.1

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • run tests npm run test
  • tests are included

Checklist (for documentation change)

  • only relevant documentation part is changed (make a diff before you submit the PR)
  • motivation/reason is provided

@pedrodurek

pedrodurek commented May 13, 2022

Copy link
Copy Markdown
Member Author

It's still pending to:

  • Add some tests for the new structure
  • Add some examples
  • Update documentation
  • Specify the breaking changes
  • Make some clean up

@stale

stale Bot commented May 25, 2022

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label May 25, 2022
@pedrodurek

Copy link
Copy Markdown
Member Author

I'll update the remaining work this week

@stale stale Bot removed the stale label May 30, 2022
@stale

stale Bot commented Jun 11, 2022

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Jun 11, 2022
@JohnHallstrom

Copy link
Copy Markdown

Is there an ETA on this?

@stale stale Bot removed the stale label Jun 16, 2022
@pedrodurek

pedrodurek commented Jun 16, 2022

Copy link
Copy Markdown
Member Author

Hey @JohnHallstrom, I'm in the middle of the a moving houses process, but I intend to have everything in place by end of next week. Sorry for the delay ❤️

@JohnHallstrom

Copy link
Copy Markdown

Hey @JohnHallstrom, I'm in the middle of the a moving houses process, but I intend to have everything in place by end of next week. Sorry for the delay ❤️

That sounds great! I hope everything is going well with your move until then. Cheers!

@obritoluis

Copy link
Copy Markdown

This would be great! Any news or ETA?

@stale

stale Bot commented Jul 12, 2022

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale

stale Bot commented Sep 8, 2022

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Sep 8, 2022
@stale

stale Bot commented Sep 30, 2022

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Sep 30, 2022
@CanRau

CanRau commented Sep 30, 2022

Copy link
Copy Markdown

It's still in process Staley, a little more patience please 🙏

@stale stale Bot removed the stale label Sep 30, 2022
@stale

stale Bot commented Oct 12, 2022

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Oct 12, 2022
@CanRau

CanRau commented Oct 12, 2022

Copy link
Copy Markdown

🥺

@CanRau

CanRau commented Oct 14, 2022

Copy link
Copy Markdown

Emoji isn't enough to please you 🤖 ?

@stale stale Bot removed the stale label Oct 14, 2022
@adrai adrai added the pr hold label Oct 14, 2022
@pedrodurek pedrodurek marked this pull request as ready for review October 18, 2022 05:39
@adrai adrai requested a review from rosskevin October 18, 2022 05:43
@pedrodurek

pedrodurek commented Oct 18, 2022

Copy link
Copy Markdown
Member Author

Hey @adrai, it should be a Minor release. It'll probably not have any breaking changes, but I expect some devs to report bugs and/or limitations. I'll add examples later.

Comment thread test/typescript/t.test.ts
Comment thread tsconfig.json
@pedrodurek pedrodurek requested a review from rosskevin October 18, 2022 18:33
@adrai

adrai commented Oct 18, 2022

Copy link
Copy Markdown
Member

I would go with a major bump...
btw: is there something to be done in other repos, like react-i18next or next-i18next?

@rosskevin

Copy link
Copy Markdown
Collaborator

Yes, #1811 is actually about react-i18next, with that code move to this PR. The re-definition of TFunction should be removed there.

@adrai

adrai commented Oct 18, 2022

Copy link
Copy Markdown
Member

So if ok for you, I will merge this PR tomorrow morning and also create a new release.
Would be happy if you could check also for react-i18next and next-i18next afterwards. 🙏

@rosskevin

Copy link
Copy Markdown
Collaborator

@pedrodurek is already on it for react-i18next i18next/react-i18next#1501

I checked next-i18next and it does not need any changes.

@adrai adrai merged commit 1123110 into i18next:master Oct 19, 2022
@adrai

adrai commented Oct 19, 2022

Copy link
Copy Markdown
Member

included in v22.0.0

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TFunction casts no longer work - remove 4.1 typescript workaround? Make the translation function fully type-safe

7 participants