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

Outdated UseTranslationOptions interface for Typescript #777

Closed
logusgraphics opened this issue Mar 11, 2019 · 2 comments
Closed

Outdated UseTranslationOptions interface for Typescript #777

logusgraphics opened this issue Mar 11, 2019 · 2 comments

Comments

@logusgraphics
Copy link
Contributor

logusgraphics commented Mar 11, 2019

Describe the bug
The UseTranslationOptions interface lacks the useSuspense boolean property definition.

Occurs in react-i18next version
10.4.1

To Reproduce
Steps to reproduce the behavior:

  1. Create a react ts app using create-react-app <project_name> --typescript
  2. Install the latest version of i18next and react-i18next npm i -S i18next react-i18next
  3. Use the hook in the code const { t } = useTranslation('ns', {useSuspense: false});
  4. The compiler will throw definition error on the UseTranslationOptions

Expected behaviour
The definition should include the correct translation options for the hook

Screenshots
The documentation states the option property is available

Screen Shot 2019-03-11 at 19 02 17

Typescript compiler throws error

Screen Shot 2019-03-11 at 19 03 30

OS

  • Device: macOS Mojave 10.14.3
  • Browser: Safari 12.0.3, Chrome 72.0.3626.121
@jamuhl
Copy link
Member

jamuhl commented Mar 12, 2019

Feel free to add a PR to add this.

@logusgraphics
Copy link
Contributor Author

#778

@jamuhl jamuhl closed this as completed Mar 18, 2019
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

No branches or pull requests

2 participants