Replies: 4 comments 4 replies
-
|
Hey @boschni @tannerlinsley, are you able to advise on this issue please? I see all other issues got a reply so now I feel excluded 😪 |
Beta Was this translation helpful? Give feedback.
-
|
Hi @mrlubos! Unfortunately I have not been able to fix this issue yet in a backwards compatible way. The variables argument is optional and generic, but could not get the overloads to make a distinction between functions with or without arguments. Suggestions are welcome |
Beta Was this translation helpful? Give feedback.
-
|
@boschni not sure, I can try to check. Thanks! Are you able to fix this at least as a breaking change? If so, how did you do it? This feels like it can really trip people up, I suppose it will be an issue with any non-primitive parameter. |
Beta Was this translation helpful? Give feedback.
-
|
For now, we are not tracking type changes as breaking (otherwise, every type change would result in a new major semver). They are instead tracked as patch versions with the expectation that developers should be locking their typescript projects into a specific version and upgrading when convenient. As for this issue, we're still open to suggestions, but I'm going to move this to a discussion. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
The
mutate()method fromuseMutation()hook has incorrect type definition allowing us to write potentially buggy code.To Reproduce
Steps to reproduce the behaviour:
mutate()without any arguments.Expected behaviour
mutate()should not be allowed to be called with undefined (no arguments) when variables type definition is an object (and potentially ever).Desktop (please complete the following information):
Additional context
Reproducible error in CodeSandbox
Beta Was this translation helpful? Give feedback.
All reactions