-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[TypeScript] Fix error when using typed args in <WithRecord render>
function
#9552
[TypeScript] Fix error when using typed args in <WithRecord render>
function
#9552
Conversation
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.
Looks good to me!
The linter complains, though... |
Oh, sorry. I've addressed it and updated the pull request accordingly. |
I'm just wondering: what bug does that PR fix? Did you run into an actual problem with the current type, or is it just cosmetic? |
I'm experiencing a similar issue reported in #9102 . The code below produces an error while compiling with the recent react-admin.
The code below as well.
This sandbox is the minimum reproducible code. |
That's clear, thanks! |
WithRecord
and FunctionField
<WithRecord render>
function
This PR aims to align the types used in
FunctionField
andWithRecord
. Currently,FunctionField
utilizesRecord<string, any>
, whereasWithRecord
employsRecord<string, unknown>
. The proposed change seeks to standardize these types.I came across this change (#9092) and noticed that the
WithRecord
prop type hasn't been updated yet.Given the discussion in this comment (#8963 (comment)), maintaining type consistency between
FunctionField
andWithRecord
seems crucial.