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

Feature Request: Typing for loaded translations, instead of "string | string[]" #48

Open
Maorshl opened this issue Jan 19, 2023 · 0 comments

Comments

@Maorshl
Copy link

Maorshl commented Jan 19, 2023

Description

Today the i18n object methods that accepts "Scope" as an argument are simply: type Scope = string | string[]

Describe the solution

My solution is making the i18n class generic and the Scope type will be depending on the translations object loaded to i18n.

Alternatives you considered

I have considered making a redeclare in my project, the better solution will be making i18n generic and it will improve the developer experience.

Additional context

I already made the changes locally and waiting for a permission to make a PR.

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

1 participant