setMutationDefaults and getMutationDefaults typings #5955
Replies: 2 comments 1 reply
-
for
and that's pretty much the same as using a type assertion. Also, in v5, defaults are properly merged, so if you have multiple defaults for multiple layers of keys, there is no way to know on type level what you will get. So it's an unsafe assumption anyways. for |
Beta Was this translation helpful? Give feedback.
-
Hey there, I just stumbled across this same situation where the default mutation wasn't inferring types in the onMutate/Success/Error functions. Using "satisfies" works. Is that the recommended way to add typing to setMutationDefaults? |
Beta Was this translation helpful? Give feedback.
-
Is there any reason why these are typed as:
instead of like this?
I'm currently using satisfies to work around this:
Beta Was this translation helpful? Give feedback.
All reactions