-
-
Notifications
You must be signed in to change notification settings - Fork 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
useMutation expects incorrect mutateOptions as argument on mutate #661
Comments
Can you please specify the exact version, I just tested with 2.4.4 and I don't seem to have anything error |
Update above. It's version 2.4.4 with typescript 2.9.5. |
This is happening to me too. I think it is due to https://github.com/tannerlinsley/react-query/blob/b3e4dda9fd80ec6f0ade49034ae6eeafe2055942/types/index.d.ts#L446 - if strictNullChecks is off, then |
2.4.5 doesn't fix it either |
@youngbob What you're saying is correct. It is best to reverse it so that TVariables extends undefined and not the other way arround. I created a pull request for it. |
With 2.4.6 it's still not fixed for me. |
I don't think the fix was included in 2.4.6: |
🎉 This issue has been resolved in version 2.4.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Describe the bug
Typescript complains about the argument I provide to my mutate function. This is since upgrade to the 2.4.4 version today
To Reproduce
When I call the mutate method like so:
remove('someId');
I get 'Type string has no properties in common with type 'MutateOptions''
The removeSomething function looks like:
The text was updated successfully, but these errors were encountered: