-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
Shouldn't TVariables default be "any" or "unknown" so you dont have to define it unless its important to you to be defined
that is just because if you write:
const { mutate } = useMutation((values) => axios.post('/test', values), );it is not defined what
valuesshould have for a type. The genericTVariablesdefaults tovoidand that's the error you are getting. If you write a function in typescript:const myFunction = (variables) => console.log(variables)the compiler needs to know what
variableswill be, otherwise, it will be implicitly any.if you take my example where values has a type of
values: Variables, you will see that it works.
Metadata
Metadata
Assignees
Labels
No labels