告诉打字稿的正确方法是什么,即函数Variables
参数的接口myMutation
?
interface Variables {
uuid: string;
value: string;
}
const { mutate: myMutation } = useMutation(myGqlMutation);
我想避免像这样使用 myMutation :
myMutation({
uuid: '....',
value: '....',
} as any); // get rid of any here ...