i18n icon indicating copy to clipboard operation
i18n copied to clipboard

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

Open Maorshl opened this issue 2 years ago • 0 comments

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.

Maorshl avatar Jan 19 '23 06:01 Maorshl