-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Wrong generics passed by RxCollection extending RxCollectionBase #6188
Comments
Thanks for investigation. PR is welcomed. I tried to fix the Signal problem some time ago but did not find a solution. |
Fixed in the linked commit. Please test the next release. |
@pubkey the type is better now, thx! as for proper reactivity types looks like it's not possible with the current typescript and requires smth like this to be implemented microsoft/TypeScript#1213 |
@artaommahe Thank you for that link. This helps me a lot because I can now stop looking for how to make it work and just wait for that issue to be resolved. |
RxCollectionBase
has 5 generics withReactivity
as a last one. WhenRxCollection
extendsRxCollectionBase
it passes only 4 of them and instead of passingStaticMethods
as 4th theReactivity
is used.rxdb/src/types/rx-collection.d.ts
Line 83 in 5e603d0
rxdb/src/rx-collection.ts
Line 112 in 5e603d0
This leads to wrong types for
Reactivity
and most likelyStaticMethods
Btw also looks like even after fixing this issue types for reactivity
.$$
will be wrong and always equal passedReactivity
generic value (Signal<unknown>
in the example above)The text was updated successfully, but these errors were encountered: