-
Notifications
You must be signed in to change notification settings - Fork 4
More precise case import error message #1005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
| export type ErrorMessageDescriptor = { | ||
| descriptor: MessageDescriptor; | ||
| values?: Record<string, PrimitiveType>; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| export type ErrorMessageDescriptor = { | |
| descriptor: MessageDescriptor; | |
| values?: Record<string, PrimitiveType>; | |
| }; | |
| export type ErrorMessageDescriptor = { | |
| descriptor: Parameters<IntlShape['formatMessage']>[0]; | |
| values?: Parameters<IntlShape['formatMessage']>[1]; | |
| }; |
Maybe like that to be even more precise ? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok but messageValues from SnackInputs is a :
type FormatValues = Record<string, PrimitiveType | FormatXMLElementFn<string, string>>;
This assignment : https://github.com/gridsuite/commons-ui/pull/1005/changes#diff-3f4e8358f9a84ac3c553c95550bb6dcf620de65fd0ec5f87ab770e52dd549057R55
returns an error. How would you do this cleanly? Shouldn't we use a FormatValues ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type FormatValues = Parameters<IntlShape['formatMessage']>[1] I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok : db6e027
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
|



More precise case import error message (coherent with :