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
The problem here is that the parser will not extract the messages, but the code is still valid TypeScript, so there is no way how I can restrict the usage of this pattern. The fix in code, to get it to work is simple, but should not be both approaches supported?
// This will be extracted by parser
const messages = defineMessages<ItemStatus>({
[ItemStatus.OPENED]: {
defaultMessage: 'Opened',
id: 'app.itemStatus.Opened',
},
[ItemStatus.CLOSED]: {
defaultMessage: 'Closed',
id: 'app.itemStatus.Closed',
},
});
(using typescript-react-intl 0.4.0)
The text was updated successfully, but these errors were encountered:
Messages which are defined using
defineMessages
inside standalone objects are not extracted by the parser. For example:The problem here is that the parser will not extract the messages, but the code is still valid TypeScript, so there is no way how I can restrict the usage of this pattern. The fix in code, to get it to work is simple, but should not be both approaches supported?
(using
typescript-react-intl
0.4.0)The text was updated successfully, but these errors were encountered: