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

Typescript section, no interpolation type definition #1423

Closed
adelin-b opened this issue Dec 5, 2021 · 1 comment
Closed

Typescript section, no interpolation type definition #1423

adelin-b opened this issue Dec 5, 2021 · 1 comment

Comments

@adelin-b
Copy link

adelin-b commented Dec 5, 2021

Documentation issue

On this documentation page we know how to extend the default type of translation using declare module react-i18next`
https://react.i18next.com/latest/typescript

However there is no description on how to extend the interpolation. This is doable since there is template literals

And this guy done it : https://stackoverflow.com/a/58308279 (Look at his point n3 )

Motivation

Having a way to have a nice interpolation type associated with every keys.

@pedrodurek
Copy link
Member

pedrodurek commented Dec 5, 2021

Hey @adelin-b, it's not possible to get literal values from JSON files yet. #1193 (comment)

Once it is possible, we can look into it.

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

No branches or pull requests

2 participants