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
This (undocumented, for the Trans-component at least, for the t-function see here) feature already works well with the only problem being the type-definitions.
t(["key1","fallbackKey"])// works and gives no TypeScript errors<Transi18nKey={["key1","fallbackKey"]}// ^ Type error: Type 'string[]' is not assignable to type 'string'./>// works otherwise
Expected behavior
The type-definitions for the t-function allow this. Since the Trans-component uses the t-function in order to resolve the message, I would expect to be able to supply fallback keys as if I was using the t-function directly.
t(["key1","fallbackKey"])// works and gives no TypeScript errors<Transi18nKey={["key1","fallbackKey"]}/> // works and gives no TypeScript errors
🐛 Bug Report
The TypeScript definitions for the
Trans
-component don't allow you to specify an array ofi18nKeys
.To Reproduce
codesandbox
This (undocumented, for the
Trans
-component at least, for thet
-function see here) feature already works well with the only problem being the type-definitions.Expected behavior
The type-definitions for the
t
-function allow this. Since theTrans
-component uses thet
-function in order to resolve the message, I would expect to be able to supply fallback keys as if I was using thet
-function directly.Your Environment
The text was updated successfully, but these errors were encountered: