You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want to use generic types for i18next.TranslationFunction
because t functions generic is useful, completion keys of dictionary keys ,
like
typeTKeys='a.messageA'|'a.messageB'this.props.t<TKeys>('a.message',)// can complete 'a.messageA or B'and emit error for not matching TKeys literal types.
@tkow the point is i have never used typescript myself - so more or less all this is "not" javascript for me -> so always depend on reviews from the community.
Is your feature request related to a problem? Please describe.
I want to use generic types for i18next.TranslationFunction
because t functions generic is useful, completion keys of dictionary keys ,
like
Describe the solution you'd like
I want to change index.d.ts like that,
also function short-hand props can override in external modules then, if you want ,this definition can be overridden easily.
Describe alternatives you've considered
Inheritance generic t function prop is ideal , but I can't find solution to do this.
In Addition:
I can add new interface to external module and It may be enough for completion.
Additional context
If you have no idea about what I want, Try do this
The text was updated successfully, but these errors were encountered: