-
-
Notifications
You must be signed in to change notification settings - Fork 928
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
spread()
doesn't use the children
property when an Accessor
is passed
#2342
Comments
99% this is a types issue. We use this internally where everything is getters. We don't special case functions here I believe. But it probably is worth double checking. |
I remember where After that commit https://github.com/solidjs/solid/releases/tag/v1.6.0 happened. |
(Just to be clear: In my code I have absolutely no need to pass an |
Right, I missed this section.
Not clear what this means though. Is it some external/internal code or a template that outputs this? |
I just tried to use the function as an experiment |
Thanks @mdynnl I think you are correct. I realized that spread as a function was insufficient and changed to only accepting objects. So I think that confirms it is a types thing. |
Describe the bug
The type definition of the
spread()
function states that it also accepts a function that returns an object instead of the object itself, but here it doesn't check ifprops
is a function when accessing thechildren
property.After checking with the playground, it seems that no property works
Your Example Website or App
https://playground.solidjs.com/anonymous/8afd997e-2827-47bf-b670-bcfbd3825315
Steps to Reproduce the Bug or Issue
Just look at the output:
Expected behavior
It should get the properties from the returned object if
props
is a function OR the type definition should be made to match the actual behaviour by disallowingAccessor
sScreenshots or Videos
No response
Platform
Additional context
May be related to #1296
The text was updated successfully, but these errors were encountered: