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
Make props
argument optional
#590
base: main
Are you sure you want to change the base?
Conversation
|
I don’t think you’re using the type correctly. |
I was following the example from the docs - https://primitives.solidjs.community/package/pagination#createinfinitescroll |
ah nvm I get it |
this? |
It looks like it shouldn’t be typed as a directive if it is meant to be used with both ref and as a directive. because it just doesn’t use the second arg at all. |
Would a new custom type be okay in that case? Something like |
no need to make it a generic helper. |
yes although there is no need in making it generic |
Done! Want me to update this PR or should I just close it? |
It seems that this PR is about something completely different now? |
The signature for the
Directive
doesn't allow it to be used as a ref as shown in the docs. If the props are optional then the function signature matches.