In my code, I have two interfaces as below
export interface Temp{
message : string
}
export interface Temp1{
message1 : string
}
With code like this, useMutation(....) sends a request to the server and requests the result.
const {mutate, isLoading, data} = useMutation(authRepository.Login, {
onSuccess: (value: Temp | Temp1) => {
if(value instanceof Temp){
}
}
});
'Temp' only represents a type, but here it is corrupted by value.
I am curious about a simple way to check Temp and Temp1