Skip to content

Conversation

@Mathieu-Deharbe
Copy link
Contributor

More precise case import error message (coherent with :

Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
@Mathieu-Deharbe Mathieu-Deharbe self-assigned this Jan 27, 2026
Mathieu-Deharbe and others added 6 commits January 27, 2026 15:28
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>
@ayolab ayolab self-requested a review February 5, 2026 09:15
Comment on lines 82 to 85
export type ErrorMessageDescriptor = {
descriptor: MessageDescriptor;
values?: Record<string, PrimitiveType>;
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 ? :)

Copy link
Contributor Author

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 ?

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok : db6e027

Mathieu-Deharbe and others added 2 commits February 10, 2026 15:14
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
@sonarqubecloud
Copy link

@Mathieu-Deharbe Mathieu-Deharbe merged commit c5ba150 into main Feb 10, 2026
5 checks passed
@Mathieu-Deharbe Mathieu-Deharbe deleted the more-precise-import-case-error-msg branch February 10, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants