i18n
i18n copied to clipboard
Feature Request: Typing for loaded translations, instead of "string | string[]"
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.