Skip to content

Fully type t function to get keys values as auto-complete in typescript #49621

@Sboonny

Description

@Sboonny

While using the t function in multiple instances, I had issue with misspelling of keys or its values, this cased small bugs which keys value didn't show, or weird bugs in user validation which broke tests for weird reason.

Looking at the docs, if I am not misunderstanding it, we can have the keys show as auto-complete which can help with developer experience as it will be unlikely to have misleading typos.

https://react.i18next.com/latest/typescript

Here is an example of the files

https://github.com/i18next/react-i18next/tree/master/example/react-typescript/simple-multi-namespaces

Issue with the feature, it may cause lag in auto-complete, because of how big our JSON files are.

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: learnUI side of the client application that needs familiarity with React, Gatsby etc.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions