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.
useMessages() hook does not get proper typing after declaring IntlMessages.
For example:
declare global {// Use type safe message keys with `next-intl`typeIntlMessages={foo: {bar: string,baz: string,}}}functionMyComponent(){constmessages=useMessages();// expect this to have type IntlMessages}
Describe the solution you'd like
I would like the useMessages() hook to respect the type provided by IntlMessages
Describe alternatives you've considered
I've considered casting in place every time I invoke the hook, but this is error prone.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
useMessages()
hook does not get proper typing after declaringIntlMessages
.For example:
Describe the solution you'd like
I would like the
useMessages()
hook to respect the type provided by IntlMessagesDescribe alternatives you've considered
I've considered casting in place every time I invoke the hook, but this is error prone.
The text was updated successfully, but these errors were encountered: