Skip to content

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

@Maorshl

Description

@Maorshl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions