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
It gives no error. I would want the values TranslationValues to be typed so that I can't pass anything, undefined or nothing at all.
The ICU message syntax does not allow optional values—as in render something else if no value—, so the translation function should not accept empty values.
Describe the solution you'd like
IntlMessages should know which values are included in the translated string and require them. Unsure of the complexity if it accept dates and the like, but a string | number should be good enough.
Describe alternatives you've considered
I want typescript error for the developer to catch the mistake, and the build to fail. So I've seen no solution for this.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Given this example:
It gives no error. I would want the values
TranslationValues
to be typed so that I can't pass anything, undefined or nothing at all.The ICU message syntax does not allow optional values—as in render something else if no value—, so the translation function should not accept empty values.
Describe the solution you'd like
IntlMessages
should know which values are included in the translated string and require them. Unsure of the complexity if it accept dates and the like, but astring | number
should be good enough.Describe alternatives you've considered
I want typescript error for the developer to catch the mistake, and the build to fail. So I've seen no solution for this.
The text was updated successfully, but these errors were encountered: